public class AccessInternalModuleImpl extends Object implements AccessInternalModule
| Constructor and Description |
|---|
AccessInternalModuleImpl()
AccessModuleImpl constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkAndUpdateRuleQuery(UpdateParserMultiple updateParser) |
void |
checkClassificationLevel(com.fasterxml.jackson.databind.JsonNode query)
check ClassificationLevel in update Unit
|
javax.ws.rs.core.Response |
findDIPByOperationId(String id)
retrieve a DIP file according to an operationId
|
javax.ws.rs.core.Response |
getAccessLog(com.fasterxml.jackson.databind.JsonNode params)
Retrieve all accessLog by the concatenation of all accesslog files as InputStream
|
javax.ws.rs.core.Response |
getOneObjectFromObjectGroup(String idObjectGroup,
String qualifier,
int version,
String idUnit)
Retrieve an object as InputStream based on the associated ObjectGroupId and qualifier + version requested
|
com.fasterxml.jackson.databind.JsonNode |
selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode jsonQuery,
String idObjectGroup)
Retrieve an ObjectGroup by its id with results fields filtered based on given query
|
com.fasterxml.jackson.databind.JsonNode |
selectObjects(com.fasterxml.jackson.databind.JsonNode jsonQuery)
select Object
|
com.fasterxml.jackson.databind.JsonNode |
selectUnit(com.fasterxml.jackson.databind.JsonNode jsonQuery)
select Unit
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitbyId(com.fasterxml.jackson.databind.JsonNode jsonQuery,
String idUnit)
select Unit by Id
|
com.fasterxml.jackson.databind.JsonNode |
selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode jsonQuery)
Select units by DSL and computes inherited rules for matching units
|
com.fasterxml.jackson.databind.JsonNode |
updateUnitbyId(com.fasterxml.jackson.databind.JsonNode queryJson,
String idUnit,
String requestId)
update Unit by id
|
public AccessInternalModuleImpl()
public com.fasterxml.jackson.databind.JsonNode selectUnit(com.fasterxml.jackson.databind.JsonNode jsonQuery)
throws IllegalArgumentException,
InvalidParseOperationException,
AccessInternalExecutionException,
VitamDBException
selectUnit in interface AccessInternalModulejsonQuery - as String { $query : query}InvalidParseOperationException - Throw if json format is not correctAccessInternalExecutionException - Throw if error occurs when send Unit to databaseIllegalArgumentException - if json query is nullVitamDBExceptionpublic com.fasterxml.jackson.databind.JsonNode selectUnitbyId(com.fasterxml.jackson.databind.JsonNode jsonQuery,
String idUnit)
throws IllegalArgumentException,
InvalidParseOperationException,
AccessInternalExecutionException
selectUnitbyId in interface AccessInternalModulejsonQuery - as String { $query : query}idUnit - as StringIllegalArgumentException - Throw if json format is not correctAccessInternalExecutionException - Throw if error occurs when send Unit to databaseInvalidParseOperationException - Throw if json format is not correctpublic com.fasterxml.jackson.databind.JsonNode selectObjectGroupById(com.fasterxml.jackson.databind.JsonNode jsonQuery,
String idObjectGroup)
throws InvalidParseOperationException,
AccessInternalExecutionException
AccessInternalModuleselectObjectGroupById in interface AccessInternalModulejsonQuery - the query DSL as a Json nodeidObjectGroup - the id of the ObjectGroup asInvalidParseOperationException - thrown if json query is not syntactically correctAccessInternalExecutionException - in case of access failurepublic javax.ws.rs.core.Response getOneObjectFromObjectGroup(String idObjectGroup, String qualifier, int version, String idUnit) throws StorageNotFoundException, AccessInternalExecutionException, InvalidParseOperationException
AccessInternalModulegetOneObjectFromObjectGroup in interface AccessInternalModuleidObjectGroup - The Object Group Idqualifier - the qualifier to be retrieve (ie: Dissemination etc.)version - the version number to getidUnit - identifier of the parent archiveunit used to have access to the objectStorageNotFoundException - If the object is not found in storageAccessInternalExecutionException - For other technical errorsInvalidParseOperationException - when a query is badly structuredpublic javax.ws.rs.core.Response getAccessLog(com.fasterxml.jackson.databind.JsonNode params)
throws AccessInternalExecutionException,
StorageNotFoundException,
ParseException
AccessInternalModulegetAccessLog in interface AccessInternalModuleparams - a json containing query on StartDate or EndDateAccessInternalExecutionExceptionStorageNotFoundExceptionParseExceptionpublic com.fasterxml.jackson.databind.JsonNode updateUnitbyId(com.fasterxml.jackson.databind.JsonNode queryJson,
String idUnit,
String requestId)
throws MetaDataNotFoundException,
IllegalArgumentException,
InvalidParseOperationException,
AccessInternalExecutionException,
UpdatePermissionException,
AccessInternalRuleExecutionException
AccessInternalModuleupdateUnitbyId in interface AccessInternalModulequeryJson - json update queryidUnit - as StringrequestId - the request idMetaDataNotFoundException - Throw if unit is not foundIllegalArgumentException - Throw if error occurs when checking argumentInvalidParseOperationException - Throw if json format is not correctAccessInternalExecutionException - Throw if error occurs when send Unit to databaseAccessInternalRuleExecutionException - Throw When error occures on rules update checkUpdatePermissionExceptionpublic void checkAndUpdateRuleQuery(UpdateParserMultiple updateParser) throws AccessInternalRuleExecutionException, AccessInternalExecutionException
public javax.ws.rs.core.Response findDIPByOperationId(String id) throws AccessInternalExecutionException
AccessInternalModulefindDIPByOperationId in interface AccessInternalModuleid - operation idAccessInternalExecutionExceptionpublic com.fasterxml.jackson.databind.JsonNode selectObjects(com.fasterxml.jackson.databind.JsonNode jsonQuery)
throws IllegalArgumentException,
InvalidParseOperationException,
AccessInternalExecutionException,
VitamDBException
selectObjects in interface AccessInternalModulejsonQuery - as String { $query : query}InvalidParseOperationException - Throw if json format is not correctAccessInternalExecutionException - Throw if error occurs when send Object to databaseIllegalArgumentException - if json query is nullVitamDBExceptionpublic void checkClassificationLevel(com.fasterxml.jackson.databind.JsonNode query)
throws IllegalArgumentException,
InvalidParseOperationException
AccessInternalModulecheckClassificationLevel in interface AccessInternalModulequery - queryIllegalArgumentException - IllegalArgumentExceptionInvalidParseOperationException - InvalidParseOperationExceptionpublic com.fasterxml.jackson.databind.JsonNode selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode jsonQuery)
throws IllegalArgumentException,
InvalidParseOperationException,
AccessInternalExecutionException
AccessInternalModuleselectUnitsWithInheritedRules in interface AccessInternalModulejsonQuery - the query DSLIllegalArgumentException - Throw if json format is not correctInvalidParseOperationExceptionAccessInternalExecutionException - Throw if error occurs when send Unit to databaseCopyright © 2018 Vitam. All rights reserved.