Class GNClientExtension

  • All Implemented Interfaces:
    it.geosolutions.geonetwork.GNClient

    public class GNClientExtension
    extends Object
    implements it.geosolutions.geonetwork.GNClient
    • 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.GNLibException
        it.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.GNLibException
        it.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.GNLibException
        it.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.GNServerException
        it.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.GNServerException
        it.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.GNLibException
        it.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.GNServerException
        it.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.GNServerException
        it.geosolutions.geonetwork.exception.GNLibException
      • getMetadataOwners

        public String getMetadataOwners()
                                 throws it.geosolutions.geonetwork.exception.GNServerException,
                                        it.geosolutions.geonetwork.exception.GNLibException
        Throws:
        it.geosolutions.geonetwork.exception.GNServerException
        it.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.GNServerException
        it.geosolutions.geonetwork.exception.GNLibException
      • ping

        public boolean ping()
        Specified by:
        ping in interface it.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:
        insertMetadata in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.geosolutions.geonetwork.exception.GNServerException
      • insertRequest

        public long insertRequest​(File requestFile)
                           throws it.geosolutions.geonetwork.exception.GNLibException,
                                  it.geosolutions.geonetwork.exception.GNServerException
        Specified by:
        insertRequest in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        setPrivileges in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        search in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        search in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        get in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        get in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.geosolutions.geonetwork.exception.GNServerException
      • deleteMetadata

        public void deleteMetadata​(long id)
                            throws it.geosolutions.geonetwork.exception.GNLibException,
                                   it.geosolutions.geonetwork.exception.GNServerException
        Specified by:
        deleteMetadata in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        updateMetadata in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        updateMetadata in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        getInfo in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.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:
        getInfo in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException
        it.geosolutions.geonetwork.exception.GNServerException
      • getConnection

        public it.geosolutions.geonetwork.util.HTTPUtils getConnection()
                                                                throws it.geosolutions.geonetwork.exception.GNLibException
        Specified by:
        getConnection in interface it.geosolutions.geonetwork.GNClient
        Throws:
        it.geosolutions.geonetwork.exception.GNLibException