Class ProfiledMongoManager

  • All Implemented Interfaces:
    MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>

    public class ProfiledMongoManager
    extends MongoManager
    implements MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
    The Class ProfiledMongoManager.
    Author:
    Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Apr 26, 2023
    • Constructor Summary

      Constructors 
      Constructor Description
      ProfiledMongoManager​(String profileId)
      Instantiates a new profiled mongo manager.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(String id, boolean force, Boolean ignoreErrors)
      Delete.
      org.gcube.application.geoportal.common.model.document.Project deleteFileSet​(String id, String path, Boolean force, Boolean ignore_errors)
      Delete file set.
      org.gcube.application.geoportal.common.model.document.Project deleteRelation​(String id, String relation, String targetUCD, String targetId)
      Delete relation.
      Iterable<org.gcube.application.geoportal.common.model.document.Project> filter​(org.gcube.application.geoportal.common.model.rest.QueryRequest queryRequest)
      Filter.
      org.gcube.application.geoportal.common.model.document.Project forceUnlock​(String id)
      Force unlock.
      org.gcube.application.geoportal.common.model.document.Project getByID​(String id)
      Gets the by ID.
      org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration()
      Gets the configuration.
      protected org.gcube.application.geoportal.common.model.document.Project lock​(String id, String op)
      Lock.
      protected String mongoIDFieldName()
      Mongo ID field name.
      org.gcube.application.geoportal.common.model.document.Project patch​(String id, org.bson.Document toSet)
      Patch.
      org.gcube.application.geoportal.common.model.document.Project performStep​(String id, String step, org.bson.Document options)
      Perform step.
      Iterable<org.bson.Document> query​(org.gcube.application.geoportal.common.model.rest.QueryRequest queryRequest)
      Query.
      org.gcube.application.geoportal.common.model.document.Project registerFileSet​(String id, org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest request)
      NB Put at path : Path Examples artifact images images[1] layers[?(@.name = 'myName')].fileset
      org.gcube.application.geoportal.common.model.document.Project registerNew​(org.bson.Document toRegisterDoc)
      Register new.
      org.gcube.application.geoportal.common.model.document.Project setAccessPolicy​(String id, org.gcube.application.geoportal.common.model.document.access.Access access)
      Sets the access policy.
      org.gcube.application.geoportal.common.model.document.Project setRelation​(String id, String relation, String targetUCD, String targetId)
      Sets the relation.
      protected org.gcube.application.geoportal.common.model.document.Project unlock​(org.gcube.application.geoportal.common.model.document.Project proj)
      Unlock.
      protected org.gcube.application.geoportal.common.model.document.Project unlockAndPatch​(org.gcube.application.geoportal.common.model.document.Project proj)
      Unlock and patch.
      protected org.gcube.application.geoportal.common.model.document.Project unlockAndUpdate​(org.gcube.application.geoportal.common.model.document.Project proj)
      Unlock and update.
      org.gcube.application.geoportal.common.model.document.Project update​(String id, org.bson.Document toSet)
      Update.
    • Constructor Detail

      • ProfiledMongoManager

        public ProfiledMongoManager​(String profileId)
                             throws org.gcube.application.geoportal.common.model.rest.ConfigurationException,
                                    org.gcube.application.cms.implementations.faults.RegistrationException
        Instantiates a new profiled mongo manager.
        Parameters:
        profileId - the profile id
        Throws:
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
        org.gcube.application.cms.implementations.faults.RegistrationException - the registration exception
    • Method Detail

      • lock

        protected org.gcube.application.geoportal.common.model.document.Project lock​(String id,
                                                                                     String op)
                                                                              throws org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                     org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                     com.fasterxml.jackson.core.JsonProcessingException,
                                                                                     org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                     org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Lock.
        Parameters:
        id - the id
        op - the op
        Returns:
        the project
        Throws:
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • unlockAndUpdate

        protected org.gcube.application.geoportal.common.model.document.Project unlockAndUpdate​(org.gcube.application.geoportal.common.model.document.Project proj)
                                                                                         throws org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                                org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                                com.fasterxml.jackson.core.JsonProcessingException,
                                                                                                org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                                org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Unlock and update.
        Parameters:
        proj - the proj
        Returns:
        the project
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • unlockAndPatch

        protected org.gcube.application.geoportal.common.model.document.Project unlockAndPatch​(org.gcube.application.geoportal.common.model.document.Project proj)
                                                                                        throws org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                               org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                               com.fasterxml.jackson.core.JsonProcessingException,
                                                                                               org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                               org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Unlock and patch.
        Parameters:
        proj - the proj
        Returns:
        the project
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • unlock

        protected org.gcube.application.geoportal.common.model.document.Project unlock​(org.gcube.application.geoportal.common.model.document.Project proj)
                                                                                throws org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                       org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                       org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                       org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Unlock.
        Parameters:
        proj - the proj
        Returns:
        the project
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • registerNew

        public org.gcube.application.geoportal.common.model.document.Project registerNew​(org.bson.Document toRegisterDoc)
                                                                                  throws IOException,
                                                                                         org.gcube.application.cms.implementations.faults.InvalidUserRoleException
        Register new.
        Specified by:
        registerNew in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        toRegisterDoc - the to register doc
        Returns:
        the project
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
      • update

        public org.gcube.application.geoportal.common.model.document.Project update​(String id,
                                                                                    org.bson.Document toSet)
                                                                             throws IOException,
                                                                                    org.gcube.application.cms.plugins.faults.EventException,
                                                                                    org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                    org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                    org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                    org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                    org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Update.
        Specified by:
        update in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        toSet - the to set
        Returns:
        the project
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.gcube.application.cms.plugins.faults.EventException - the event exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • patch

        public org.gcube.application.geoportal.common.model.document.Project patch​(String id,
                                                                                   org.bson.Document toSet)
                                                                            throws IOException,
                                                                                   org.gcube.application.cms.plugins.faults.EventException,
                                                                                   org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                   org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                   org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                   org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                   org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Patch.
        Specified by:
        patch in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        toSet - the to set
        Returns:
        the project
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.gcube.application.cms.plugins.faults.EventException - the event exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • setRelation

        public org.gcube.application.geoportal.common.model.document.Project setRelation​(String id,
                                                                                         String relation,
                                                                                         String targetUCD,
                                                                                         String targetId)
                                                                                  throws IOException,
                                                                                         org.gcube.application.cms.plugins.faults.EventException,
                                                                                         org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                         org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                         org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                         org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                         org.gcube.application.cms.implementations.faults.UnauthorizedAccess,
                                                                                         org.gcube.application.cms.implementations.faults.RegistrationException,
                                                                                         org.gcube.application.geoportal.common.model.rest.ConfigurationException
        Sets the relation.
        Specified by:
        setRelation in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        relation - the relation
        targetUCD - the target UCD
        targetId - the target id
        Returns:
        the project
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.gcube.application.cms.plugins.faults.EventException - the event exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
        org.gcube.application.cms.implementations.faults.RegistrationException - the registration exception
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
      • deleteRelation

        public org.gcube.application.geoportal.common.model.document.Project deleteRelation​(String id,
                                                                                            String relation,
                                                                                            String targetUCD,
                                                                                            String targetId)
                                                                                     throws IOException,
                                                                                            org.gcube.application.cms.plugins.faults.EventException,
                                                                                            org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                            org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                            org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                            org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                            org.gcube.application.cms.implementations.faults.UnauthorizedAccess,
                                                                                            org.gcube.application.cms.implementations.faults.RegistrationException,
                                                                                            org.gcube.application.geoportal.common.model.rest.ConfigurationException
        Delete relation.
        Specified by:
        deleteRelation in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        relation - the relation
        targetUCD - the target UCD
        targetId - the target id
        Returns:
        the project
        Throws:
        IOException - Signals that an I/O exception has occurred.
        org.gcube.application.cms.plugins.faults.EventException - the event exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
        org.gcube.application.cms.implementations.faults.RegistrationException - the registration exception
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
      • delete

        public void delete​(String id,
                           boolean force,
                           Boolean ignoreErrors)
                    throws org.gcube.application.cms.implementations.faults.DeletionException,
                           org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                           org.gcube.application.cms.implementations.faults.ProjectLockedException,
                           org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                           org.gcube.application.cms.implementations.faults.UnauthorizedAccess,
                           com.fasterxml.jackson.core.JsonProcessingException,
                           org.gcube.application.cms.implementations.faults.InvalidLockException
        Delete.
        Specified by:
        delete in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        force - the force
        ignoreErrors - the ignore errors
        Throws:
        org.gcube.application.cms.implementations.faults.DeletionException - the deletion exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception Updated by Francesco Mangiacrapa
      • getByID

        public org.gcube.application.geoportal.common.model.document.Project getByID​(String id)
                                                                              throws org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                     org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                     org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Gets the by ID.
        Specified by:
        getByID in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        Returns:
        the by ID
        Throws:
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • query

        public Iterable<org.bson.Document> query​(org.gcube.application.geoportal.common.model.rest.QueryRequest queryRequest)
                                          throws org.gcube.application.cms.implementations.faults.InvalidUserRoleException
        Query.
        Specified by:
        query in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        queryRequest - the query request
        Returns:
        the iterable
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
      • filter

        public Iterable<org.gcube.application.geoportal.common.model.document.Project> filter​(org.gcube.application.geoportal.common.model.rest.QueryRequest queryRequest)
                                                                                       throws org.gcube.application.cms.implementations.faults.InvalidUserRoleException
        Filter.
        Specified by:
        filter in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        queryRequest - the query request
        Returns:
        the iterable
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
      • performStep

        public org.gcube.application.geoportal.common.model.document.Project performStep​(String id,
                                                                                         String step,
                                                                                         org.bson.Document options)
                                                                                  throws org.gcube.application.cms.plugins.faults.StepException,
                                                                                         com.fasterxml.jackson.core.JsonProcessingException,
                                                                                         org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                         org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                         org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                         org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                         org.gcube.application.cms.implementations.faults.UnauthorizedAccess,
                                                                                         org.gcube.application.geoportal.common.model.rest.ConfigurationException,
                                                                                         org.gcube.application.cms.plugins.faults.InsufficientPrivileges
        Perform step.
        Specified by:
        performStep in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        step - the step
        options - the options
        Returns:
        the project
        Throws:
        org.gcube.application.cms.plugins.faults.StepException - the step exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
        org.gcube.application.cms.plugins.faults.InsufficientPrivileges - the insufficient privileges
      • registerFileSet

        public org.gcube.application.geoportal.common.model.document.Project registerFileSet​(String id,
                                                                                             org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest request)
                                                                                      throws org.gcube.application.geoportal.common.model.rest.ConfigurationException,
                                                                                             org.gcube.common.storagehub.model.exceptions.StorageHubException,
                                                                                             org.gcube.application.geoportal.common.faults.StorageException,
                                                                                             com.fasterxml.jackson.core.JsonProcessingException,
                                                                                             org.gcube.application.cms.plugins.faults.EventException,
                                                                                             org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                             org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                             org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                             org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                             org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        NB Put at path : Path Examples artifact images images[1] layers[?(@.name = 'myName')].fileset
        Specified by:
        registerFileSet in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        request - the request
        Returns:
        the project
        Throws:
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
        org.gcube.common.storagehub.model.exceptions.StorageHubException - the storage hub exception
        org.gcube.application.geoportal.common.faults.StorageException - the storage exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.plugins.faults.EventException - the event exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • deleteFileSet

        public org.gcube.application.geoportal.common.model.document.Project deleteFileSet​(String id,
                                                                                           String path,
                                                                                           Boolean force,
                                                                                           Boolean ignore_errors)
                                                                                    throws org.gcube.application.geoportal.common.model.rest.ConfigurationException,
                                                                                           org.gcube.common.storagehub.model.exceptions.StorageHubException,
                                                                                           com.fasterxml.jackson.core.JsonProcessingException,
                                                                                           org.gcube.application.cms.implementations.faults.DeletionException,
                                                                                           org.gcube.application.cms.plugins.faults.EventException,
                                                                                           org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                           org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                           org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                           org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                           org.gcube.application.cms.implementations.faults.UnauthorizedAccess
        Delete file set.
        Specified by:
        deleteFileSet in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        path - the path
        force - the force
        ignore_errors - the ignore errors
        Returns:
        the project
        Throws:
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
        org.gcube.common.storagehub.model.exceptions.StorageHubException - the storage hub exception
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.DeletionException - the deletion exception
        org.gcube.application.cms.plugins.faults.EventException - the event exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
      • forceUnlock

        public org.gcube.application.geoportal.common.model.document.Project forceUnlock​(String id)
                                                                                  throws org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                         org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                         org.gcube.application.cms.implementations.faults.UnauthorizedAccess,
                                                                                         com.fasterxml.jackson.core.JsonProcessingException,
                                                                                         org.gcube.application.cms.implementations.faults.InvalidLockException
        Force unlock.
        Specified by:
        forceUnlock in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        Returns:
        the project
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
      • setAccessPolicy

        public org.gcube.application.geoportal.common.model.document.Project setAccessPolicy​(String id,
                                                                                             org.gcube.application.geoportal.common.model.document.access.Access access)
                                                                                      throws org.gcube.application.cms.implementations.faults.InvalidUserRoleException,
                                                                                             org.gcube.application.cms.implementations.faults.ProjectLockedException,
                                                                                             org.gcube.application.cms.implementations.faults.ProjectNotFoundException,
                                                                                             org.gcube.application.cms.implementations.faults.UnauthorizedAccess,
                                                                                             com.fasterxml.jackson.core.JsonProcessingException,
                                                                                             org.gcube.application.cms.implementations.faults.InvalidLockException,
                                                                                             org.gcube.application.cms.plugins.faults.EventException
        Sets the access policy.
        Specified by:
        setAccessPolicy in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Parameters:
        id - the id
        access - the access
        Returns:
        the project
        Throws:
        org.gcube.application.cms.implementations.faults.InvalidUserRoleException - the invalid user role exception
        org.gcube.application.cms.implementations.faults.ProjectLockedException - the project locked exception
        org.gcube.application.cms.implementations.faults.ProjectNotFoundException - the project not found exception
        org.gcube.application.cms.implementations.faults.UnauthorizedAccess - the unauthorized access
        com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
        org.gcube.application.cms.implementations.faults.InvalidLockException - the invalid lock exception
        org.gcube.application.cms.plugins.faults.EventException - the event exception
      • getConfiguration

        public org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration()
                                                                                                  throws org.gcube.application.geoportal.common.model.rest.ConfigurationException
        Gets the configuration.
        Specified by:
        getConfiguration in interface MongoManagerI<org.gcube.application.geoportal.common.model.document.Project>
        Returns:
        the configuration
        Throws:
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception