public class AccessInternalModuleImpl extends Object implements AccessInternalModule
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_CONTRACT
Access contract
|
Constructor and Description |
---|
AccessInternalModuleImpl(AccessInternalConfiguration configuration)
AccessModuleImpl constructor
|
Modifier and Type | Method and Description |
---|---|
void |
checkAndUpdateRuleQuery(UpdateParserMultiple updateParser)
check and update rule queries
|
javax.ws.rs.core.Response |
findDIPByOperationId(String id)
retrieve a DIP file according to an operationId
|
javax.ws.rs.core.Response |
getOneObjectFromObjectGroup(String idObjectGroup,
String qualifier,
int version)
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 |
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 |
updateUnitbyId(com.fasterxml.jackson.databind.JsonNode queryJson,
String idUnit,
String requestId)
update Unit by id
|
public static final String ACCESS_CONTRACT
public AccessInternalModuleImpl(AccessInternalConfiguration configuration)
configuration
- of mongoDB accesspublic com.fasterxml.jackson.databind.JsonNode selectUnit(com.fasterxml.jackson.databind.JsonNode jsonQuery) throws IllegalArgumentException, InvalidParseOperationException, AccessInternalExecutionException, VitamDBException, MetaDataDocumentSizeException, MetaDataExecutionException, MetaDataClientServerException
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
MetaDataDocumentSizeException
MetaDataExecutionException
MetaDataClientServerException
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) throws MetaDataNotFoundException, 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 getMetaDataNotFoundException
- If the ObjectGroup could not be findStorageNotFoundException
- If the object is not found in storageAccessInternalExecutionException
- For other technical errorsInvalidParseOperationException
- when a query is badly structuredpublic com.fasterxml.jackson.databind.JsonNode updateUnitbyId(com.fasterxml.jackson.databind.JsonNode queryJson, String idUnit, String requestId) throws MetaDataNotFoundException, IllegalArgumentException, InvalidParseOperationException, AccessInternalExecutionException, 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 checkpublic void checkAndUpdateRuleQuery(UpdateParserMultiple updateParser) throws AccessInternalRuleExecutionException, AccessInternalExecutionException, InvalidParseOperationException
updateParser
- the parser to be handledAccessInternalRuleExecutionException
AccessInternalExecutionException
InvalidParseOperationException
public javax.ws.rs.core.Response findDIPByOperationId(String id) throws AccessInternalExecutionException
AccessInternalModule
findDIPByOperationId
in interface AccessInternalModule
id
- operation idAccessInternalExecutionException
Copyright © 2018 Vitam. All rights reserved.