Class GNClientExtension
- java.lang.Object
-
- org.gcube.spatial.data.geonetwork.extension.GNClientExtension
-
- All Implemented Interfaces:
it.geosolutions.geonetwork.GNClient
public class GNClientExtension extends Object implements it.geosolutions.geonetwork.GNClient
-
-
Constructor Summary
Constructors Constructor Description GNClientExtension(ServerAccess access)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignOwnership(List<Long> toTransferIds, Integer targetUserId, Integer targetGroupId)voidcreateGroup(String name, String description, String mail, Integer id)voidcreateUser(String name, String password, User.Profile profile, Collection<Integer> groups)voiddeleteMetadata(long id)voideditUser(User toAdd, Collection<Integer> groups)org.jdom.Elementget(Long id)org.jdom.Elementget(String uuid)it.geosolutions.geonetwork.util.HTTPUtilsgetConnection()Set<Group>getGroups()Set<Integer>getGroupsByUser(Integer userId)it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfogetInfo(Long id)it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfogetInfo(String uuid)StringgetMetadataOwners()StringgetPossibleOwnershipTransfer(Integer userId)Set<User>getUsers()longinsertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration cfg, File metadataFile)longinsertRequest(File requestFile)booleanping()it.geosolutions.geonetwork.util.GNSearchResponsesearch(it.geosolutions.geonetwork.util.GNSearchRequest searchRequest)it.geosolutions.geonetwork.util.GNSearchResponsesearch(File fileRequest)voidsetPrivileges(long metadataId, it.geosolutions.geonetwork.util.GNPrivConfiguration cfg)voidtransferOwnership(Integer sourceUserId, Integer sourceGroupId, Integer targetUserId, Integer targetGroupId)voidupdateMetadata(long id, File metadataFile)voidupdateMetadata(long id, File metadataFile, String encoding)
-
-
-
Constructor Detail
-
GNClientExtension
public GNClientExtension(ServerAccess access)
-
-
Method Detail
-
createGroup
public void createGroup(String name, String description, String mail, Integer id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
getGroups
public Set<Group> getGroups() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
getUsers
public Set<User> getUsers() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
createUser
public void createUser(String name, String password, User.Profile profile, Collection<Integer> groups) throws it.geosolutions.geonetwork.exception.GNServerException, it.geosolutions.geonetwork.exception.GNLibException
- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionit.geosolutions.geonetwork.exception.GNLibException
-
editUser
public void editUser(User toAdd, Collection<Integer> groups) throws it.geosolutions.geonetwork.exception.GNServerException, it.geosolutions.geonetwork.exception.GNLibException
- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionit.geosolutions.geonetwork.exception.GNLibException
-
getGroupsByUser
public Set<Integer> getGroupsByUser(Integer userId) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
assignOwnership
public void assignOwnership(List<Long> toTransferIds, Integer targetUserId, Integer targetGroupId) throws it.geosolutions.geonetwork.exception.GNServerException, it.geosolutions.geonetwork.exception.GNLibException
- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionit.geosolutions.geonetwork.exception.GNLibException
-
getPossibleOwnershipTransfer
public String getPossibleOwnershipTransfer(Integer userId) throws it.geosolutions.geonetwork.exception.GNServerException, it.geosolutions.geonetwork.exception.GNLibException
- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionit.geosolutions.geonetwork.exception.GNLibException
-
getMetadataOwners
public String getMetadataOwners() throws it.geosolutions.geonetwork.exception.GNServerException, it.geosolutions.geonetwork.exception.GNLibException
- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionit.geosolutions.geonetwork.exception.GNLibException
-
transferOwnership
public void transferOwnership(Integer sourceUserId, Integer sourceGroupId, Integer targetUserId, Integer targetGroupId) throws it.geosolutions.geonetwork.exception.GNServerException, it.geosolutions.geonetwork.exception.GNLibException
- Throws:
it.geosolutions.geonetwork.exception.GNServerExceptionit.geosolutions.geonetwork.exception.GNLibException
-
ping
public boolean ping()
- Specified by:
pingin interfaceit.geosolutions.geonetwork.GNClient
-
insertMetadata
public long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration cfg, File metadataFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException- Specified by:
insertMetadatain interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
insertRequest
public long insertRequest(File requestFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Specified by:
insertRequestin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
setPrivileges
public void setPrivileges(long metadataId, it.geosolutions.geonetwork.util.GNPrivConfiguration cfg) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException- Specified by:
setPrivilegesin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
search
public it.geosolutions.geonetwork.util.GNSearchResponse search(it.geosolutions.geonetwork.util.GNSearchRequest searchRequest) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException- Specified by:
searchin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
search
public it.geosolutions.geonetwork.util.GNSearchResponse search(File fileRequest) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Specified by:
searchin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
get
public org.jdom.Element get(Long id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Specified by:
getin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
get
public org.jdom.Element get(String uuid) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Specified by:
getin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
deleteMetadata
public void deleteMetadata(long id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException- Specified by:
deleteMetadatain interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
updateMetadata
public void updateMetadata(long id, File metadataFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException- Specified by:
updateMetadatain interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
updateMetadata
public void updateMetadata(long id, File metadataFile, String encoding) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException- Specified by:
updateMetadatain interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
getInfo
public it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfo getInfo(Long id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Specified by:
getInfoin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
getInfo
public it.geosolutions.geonetwork.op.gn3.GN3MetadataGetInfo.MetadataInfo getInfo(String uuid) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException
- Specified by:
getInfoin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerException
-
getConnection
public it.geosolutions.geonetwork.util.HTTPUtils getConnection() throws it.geosolutions.geonetwork.exception.GNLibException- Specified by:
getConnectionin interfaceit.geosolutions.geonetwork.GNClient- Throws:
it.geosolutions.geonetwork.exception.GNLibException
-
-