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 AccessInternalModule
jsonQuery
- 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 nullVitamDBException
public com.fasterxml.jackson.databind.JsonNode selectUnitbyId(com.fasterxml.jackson.databind.JsonNode jsonQuery, String idUnit) throws IllegalArgumentException, InvalidParseOperationException, AccessInternalExecutionException
selectUnitbyId
in interface AccessInternalModule
jsonQuery
- 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
AccessInternalModule
selectObjectGroupById
in interface AccessInternalModule
jsonQuery
- 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
AccessInternalModule
getOneObjectFromObjectGroup
in interface AccessInternalModule
idObjectGroup
- 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
AccessInternalModule
getAccessLog
in interface AccessInternalModule
params
- a json containing query on StartDate or EndDateAccessInternalExecutionException
StorageNotFoundException
ParseException
public com.fasterxml.jackson.databind.JsonNode updateUnitbyId(com.fasterxml.jackson.databind.JsonNode queryJson, String idUnit, String requestId) throws MetaDataNotFoundException, IllegalArgumentException, InvalidParseOperationException, AccessInternalExecutionException, UpdatePermissionException, AccessInternalRuleExecutionException
AccessInternalModule
updateUnitbyId
in interface AccessInternalModule
queryJson
- 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 checkUpdatePermissionException
public void checkAndUpdateRuleQuery(UpdateParserMultiple updateParser) throws AccessInternalRuleExecutionException, AccessInternalExecutionException
public javax.ws.rs.core.Response findDIPByOperationId(String id) throws AccessInternalExecutionException
AccessInternalModule
findDIPByOperationId
in interface AccessInternalModule
id
- operation idAccessInternalExecutionException
public com.fasterxml.jackson.databind.JsonNode selectObjects(com.fasterxml.jackson.databind.JsonNode jsonQuery) throws IllegalArgumentException, InvalidParseOperationException, AccessInternalExecutionException, VitamDBException
selectObjects
in interface AccessInternalModule
jsonQuery
- 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 nullVitamDBException
public void checkClassificationLevel(com.fasterxml.jackson.databind.JsonNode query) throws IllegalArgumentException, InvalidParseOperationException
AccessInternalModule
checkClassificationLevel
in interface AccessInternalModule
query
- queryIllegalArgumentException
- IllegalArgumentExceptionInvalidParseOperationException
- InvalidParseOperationExceptionpublic com.fasterxml.jackson.databind.JsonNode selectUnitsWithInheritedRules(com.fasterxml.jackson.databind.JsonNode jsonQuery) throws IllegalArgumentException, InvalidParseOperationException, AccessInternalExecutionException
AccessInternalModule
selectUnitsWithInheritedRules
in interface AccessInternalModule
jsonQuery
- the query DSLIllegalArgumentException
- Throw if json format is not correctInvalidParseOperationException
AccessInternalExecutionException
- Throw if error occurs when send Unit to databaseCopyright © 2018 Vitam. All rights reserved.