Interface MongoManagerI<T>
-
- Type Parameters:
T- the generic type
- All Known Implementing Classes:
ProfiledMongoManager
public interface MongoManagerI<T>The Interface MongoManagerI.- Author:
- Fabio Sinibaldi, maintainer: Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Apr 18, 2023
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(String id, boolean force, Boolean ignoreErrors)Delete.TdeleteFileSet(String id, String path, Boolean force, Boolean ignore_errors)Delete file set.TdeleteRelation(String id, String relation, String targetUCD, String targetId)Delete relation.Iterable<T>filter(org.gcube.application.geoportal.common.model.rest.QueryRequest request)Filter.TforceUnlock(String id)Force unlock.TgetByID(String id)Gets the by ID.org.gcube.application.geoportal.common.model.configuration.ConfigurationgetConfiguration()Gets the configuration.Tpatch(String id, org.bson.Document toSet)Patch.TperformStep(String id, String step, org.bson.Document options)Perform step.Iterable<org.bson.Document>query(org.gcube.application.geoportal.common.model.rest.QueryRequest request)Query.TregisterFileSet(String id, org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest request)Register file set.TregisterNew(org.bson.Document toRegister)Register new.TsetAccessPolicy(String id, org.gcube.application.geoportal.common.model.document.access.Access access)Sets the access policy.TsetRelation(String id, String relation, String targetUCD, String targetId)Sets the relation.Tupdate(String id, org.bson.Document toSetDocument)Update.
-
-
-
Method Detail
-
registerNew
T registerNew(org.bson.Document toRegister) throws IOException, org.gcube.application.cms.plugins.faults.StepException, org.gcube.application.cms.plugins.faults.EventException, org.gcube.application.cms.implementations.faults.InvalidUserRoleException
Register new.- Parameters:
toRegister- the to register- Returns:
- the t
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.plugins.faults.StepException- the step exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exception
-
update
T update(String id, org.bson.Document toSetDocument) throws IOException, org.gcube.application.cms.plugins.faults.StepException, 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.- Parameters:
id- the idtoSetDocument- the to set document- Returns:
- the t
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.plugins.faults.StepException- the step exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized access
-
patch
T 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.- Parameters:
id- the idtoSet- the to set- Returns:
- the t
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized access
-
setRelation
T setRelation(String id, String relation, String targetUCD, String targetId) throws IOException, org.gcube.application.cms.plugins.faults.StepException, 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.- Parameters:
id- the idrelation- the relationtargetUCD- the target UCDtargetId- the target id- Returns:
- the t
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.plugins.faults.StepException- the step exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized accessorg.gcube.application.cms.implementations.faults.RegistrationException- the registration exceptionorg.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exception
-
deleteRelation
T deleteRelation(String id, String relation, String targetUCD, String targetId) throws IOException, org.gcube.application.cms.plugins.faults.StepException, 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.- Parameters:
id- the idrelation- the relationtargetUCD- the target UCDtargetId- the target id- Returns:
- the t
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.plugins.faults.StepException- the step exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized accessorg.gcube.application.cms.implementations.faults.RegistrationException- the registration exceptionorg.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exception
-
delete
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.- Parameters:
id- the idforce- the forceignoreErrors- the ignore errors- Throws:
org.gcube.application.cms.implementations.faults.DeletionException- the deletion exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized accesscom.fasterxml.jackson.core.JsonProcessingException- the json processing exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exception
-
getByID
T getByID(String id) throws IOException, 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.- Parameters:
id- the id- Returns:
- the by ID
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized access
-
query
Iterable<org.bson.Document> query(org.gcube.application.geoportal.common.model.rest.QueryRequest request) throws org.gcube.application.cms.implementations.faults.InvalidUserRoleException
Query.- Parameters:
request- the request- Returns:
- the iterable
- Throws:
org.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exception
-
filter
Iterable<T> filter(org.gcube.application.geoportal.common.model.rest.QueryRequest request) throws org.gcube.application.cms.implementations.faults.InvalidUserRoleException
Filter.- Parameters:
request- the request- Returns:
- the iterable
- Throws:
org.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exception
-
performStep
T performStep(String id, String step, org.bson.Document options) throws IOException, org.gcube.application.cms.plugins.faults.StepException, 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.- Parameters:
id- the idstep- the stepoptions- the options- Returns:
- the t
- Throws:
IOException- Signals that an I/O exception has occurred.org.gcube.application.cms.plugins.faults.StepException- the step exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized accessorg.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exceptionorg.gcube.application.cms.plugins.faults.InsufficientPrivileges- the insufficient privileges
-
registerFileSet
T 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, org.gcube.application.cms.plugins.faults.StepException, 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
Register file set.- Parameters:
id- the idrequest- the request- Returns:
- the t
- Throws:
org.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exceptionorg.gcube.common.storagehub.model.exceptions.StorageHubException- the storage hub exceptionorg.gcube.application.geoportal.common.faults.StorageException- the storage exceptionorg.gcube.application.cms.plugins.faults.StepException- the step exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exceptionorg.gcube.application.cms.implementations.faults.DeletionException- the deletion exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized access
-
deleteFileSet
T 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.- Parameters:
id- the iddestination- the destinationforce- the forceignore_errors- the ignore errors- Returns:
- the t
- Throws:
org.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exceptionorg.gcube.common.storagehub.model.exceptions.StorageHubException- the storage hub exceptionorg.gcube.application.geoportal.common.faults.StorageException- the storage exceptionorg.gcube.application.cms.plugins.faults.StepException- the step exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exceptionorg.gcube.application.cms.implementations.faults.DeletionException- the deletion exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized access
-
forceUnlock
T 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.- Parameters:
id- the id- Returns:
- the t
- Throws:
org.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized accesscom.fasterxml.jackson.core.JsonProcessingException- the json processing exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exception
-
setAccessPolicy
T 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.- Parameters:
id- the idaccess- the access- Returns:
- the t
- Throws:
org.gcube.application.cms.implementations.faults.InvalidUserRoleException- the invalid user role exceptionorg.gcube.application.cms.implementations.faults.ProjectLockedException- the project locked exceptionorg.gcube.application.cms.implementations.faults.ProjectNotFoundException- the project not found exceptionorg.gcube.application.cms.implementations.faults.UnauthorizedAccess- the unauthorized accesscom.fasterxml.jackson.core.JsonProcessingException- the json processing exceptionorg.gcube.application.cms.implementations.faults.InvalidLockException- the invalid lock exceptionorg.gcube.application.cms.plugins.faults.EventException- the event exception
-
getConfiguration
org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration() throws org.gcube.application.geoportal.common.model.rest.ConfigurationExceptionGets the configuration.- Returns:
- the configuration
- Throws:
org.gcube.application.geoportal.common.model.rest.ConfigurationException- the configuration exception
-
-