public class GeoNetwork extends Object implements GeoNetworkAdministration
| Modifier and Type | Method and Description |
|---|---|
void |
assignOwnership(List<Long> toTransferIds,
Integer targetUserId,
Integer targetGroupId) |
Group |
createGroup(String name,
String description,
String mail,
Integer id) |
User |
createUsers(String username,
String password,
User.Profile profile,
Collection<Integer> groups) |
void |
deleteMetadata(long id) |
static GeoNetworkAdministration |
get() |
static GeoNetworkAdministration |
get(Configuration config) |
String |
getAvailableOwnershipTransfer(Integer userId) |
org.opengis.metadata.Metadata |
getById(long id) |
org.opengis.metadata.Metadata |
getById(String UUID) |
String |
getByIdAsRawString(String UUID) |
Configuration |
getConfiguration() |
it.geosolutions.geonetwork.util.GNInsertConfiguration |
getCurrentUserConfiguration(String category,
String styleSheet) |
Set<Group> |
getGroups() |
String |
getMetadataOwners() |
it.geosolutions.geonetwork.util.GNInsertConfiguration |
getUserConfiguration(String category,
String styleSheet,
ScopeConfiguration configuration,
LoginLevel lvl) |
Set<User> |
getUsers() |
long |
insertAndPromoteMetadata(File requestFile) |
long |
insertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
File metadataFile) |
long |
insertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
org.opengis.metadata.Metadata meta) |
long |
insertAndPromoteMetadata(org.opengis.metadata.Metadata meta) |
long |
insertMetadata(File requestFile) |
long |
insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
File metadataFile) |
long |
insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
org.opengis.metadata.Metadata meta) |
long |
insertMetadata(org.opengis.metadata.Metadata meta) |
void |
login(LoginLevel lvl) |
void |
logout() |
it.geosolutions.geonetwork.util.GNSearchResponse |
query(File fileRequest) |
it.geosolutions.geonetwork.util.GNSearchResponse |
query(it.geosolutions.geonetwork.util.GNSearchRequest request) |
void |
registerXMLAdapter(XMLAdapter adapter) |
void |
setPrivileges(long metadataId,
it.geosolutions.geonetwork.util.GNPrivConfiguration cfg) |
void |
transferOwnership(Integer sourceUserId,
Integer sourceGroupId,
Integer targetUserId,
Integer targetGroupId) |
void |
updateMetadata(long id,
File metadataFile) |
void |
updateMetadata(long id,
org.opengis.metadata.Metadata meta) |
public static GeoNetworkAdministration get() throws Exception
Exceptionpublic static GeoNetworkAdministration get(Configuration config) throws MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, AuthorizationException, MissingConfigurationException
MissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionAuthorizationExceptionMissingConfigurationExceptionpublic Configuration getConfiguration()
getConfiguration in interface GeoNetworkReaderpublic void login(LoginLevel lvl) throws AuthorizationException, MissingServiceEndpointException, MissingConfigurationException
login in interface GeoNetworkReaderAuthorizationExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionpublic void logout()
throws MissingServiceEndpointException
logout in interface GeoNetworkReaderMissingServiceEndpointExceptionpublic it.geosolutions.geonetwork.util.GNSearchResponse query(it.geosolutions.geonetwork.util.GNSearchRequest request)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
query in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic it.geosolutions.geonetwork.util.GNSearchResponse query(File fileRequest) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
query in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic org.opengis.metadata.Metadata getById(long id)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
JAXBException,
MissingServiceEndpointException
getById in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionJAXBExceptionMissingServiceEndpointExceptionpublic org.opengis.metadata.Metadata getById(String UUID) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, JAXBException, MissingServiceEndpointException
getById in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionJAXBExceptionMissingServiceEndpointExceptionpublic String getByIdAsRawString(String UUID) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, JAXBException, MissingServiceEndpointException
getByIdAsRawString in interface GeoNetworkReaderit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionJAXBExceptionMissingServiceEndpointExceptionpublic void setPrivileges(long metadataId,
it.geosolutions.geonetwork.util.GNPrivConfiguration cfg)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
setPrivileges in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
File metadataFile)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException,
MissingConfigurationException,
InvalidInsertConfigurationException,
AuthorizationException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationExceptionpublic long insertMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException,
MissingConfigurationException,
InvalidInsertConfigurationException,
AuthorizationException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationExceptionpublic long insertMetadata(File requestFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, MissingConfigurationException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionpublic long insertMetadata(org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException,
MissingConfigurationException
insertMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionpublic long insertAndPromoteMetadata(File requestFile) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, MissingConfigurationException
insertAndPromoteMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionpublic long insertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
File metadataFile)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException,
MissingConfigurationException,
InvalidInsertConfigurationException,
AuthorizationException
insertAndPromoteMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationExceptionpublic long insertAndPromoteMetadata(it.geosolutions.geonetwork.util.GNInsertConfiguration configuration,
org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException,
MissingConfigurationException,
InvalidInsertConfigurationException,
AuthorizationException
insertAndPromoteMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionInvalidInsertConfigurationExceptionAuthorizationExceptionpublic long insertAndPromoteMetadata(org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException,
MissingConfigurationException
insertAndPromoteMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionMissingConfigurationExceptionpublic void updateMetadata(long id,
File metadataFile)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
updateMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic void updateMetadata(long id,
org.opengis.metadata.Metadata meta)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
IOException,
JAXBException,
MissingServiceEndpointException
updateMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionIOExceptionJAXBExceptionMissingServiceEndpointExceptionpublic void deleteMetadata(long id)
throws it.geosolutions.geonetwork.exception.GNLibException,
it.geosolutions.geonetwork.exception.GNServerException,
MissingServiceEndpointException
deleteMetadata in interface GeoNetworkPublisherit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic it.geosolutions.geonetwork.util.GNInsertConfiguration getCurrentUserConfiguration(String category, String styleSheet) throws AuthorizationException, GeoNetworkException
getCurrentUserConfiguration in interface GeoNetworkPublisherAuthorizationExceptionGeoNetworkExceptionpublic it.geosolutions.geonetwork.util.GNInsertConfiguration getUserConfiguration(String category, String styleSheet, ScopeConfiguration configuration, LoginLevel lvl) throws AuthorizationException, GeoNetworkException
public Group createGroup(String name, String description, String mail, Integer id) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
createGroup in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic Set<Group> getGroups() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
getGroups in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic String getAvailableOwnershipTransfer(Integer userId) throws it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException
getAvailableOwnershipTransfer in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionpublic String getMetadataOwners() throws it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException
getMetadataOwners in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionpublic Set<User> getUsers() throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
getUsers in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic User createUsers(String username, String password, User.Profile profile, Collection<Integer> groups) throws it.geosolutions.geonetwork.exception.GNLibException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException
createUsers in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNLibExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionpublic void assignOwnership(List<Long> toTransferIds, Integer targetUserId, Integer targetGroupId) throws AuthorizationException, it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException
assignOwnership in interface GeoNetworkAdministrationAuthorizationExceptionit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionpublic void transferOwnership(Integer sourceUserId, Integer sourceGroupId, Integer targetUserId, Integer targetGroupId) throws it.geosolutions.geonetwork.exception.GNServerException, MissingServiceEndpointException, it.geosolutions.geonetwork.exception.GNLibException
transferOwnership in interface GeoNetworkAdministrationit.geosolutions.geonetwork.exception.GNServerExceptionMissingServiceEndpointExceptionit.geosolutions.geonetwork.exception.GNLibExceptionpublic void registerXMLAdapter(XMLAdapter adapter)
registerXMLAdapter in interface GeoNetworkPublisherCopyright © 2016. All Rights Reserved.