Package fr.gouv.vitam.common.client
Class ClientMockResultHelper
java.lang.Object
fr.gouv.vitam.common.client.ClientMockResultHelper
Results for client mock
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AccessContractModel
static final List<AccessContractModel>
static final String
static final String
static final AccessContractModel
static final String
static final String
static final String
static final List<OntologyModel>
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic RequestResponse
static RequestResponse
static RequestResponse
static RequestResponse
createResponse
(String s, int statuscode, Class clazz) static <T> RequestResponse<T>
createResponse
(String s, Class<T> clasz) static <T> RequestResponse<T>
createResponse
(List<T> entries) static <T> RequestResponse<T>
createResponse
(T response) static RequestResponse
static RequestResponse
getAccessContractOrDefault
(String identifier) static RequestResponse
static RequestResponse
static RequestResponse
static RequestResponse
static RequestResponse
getArchiveUnitProfiles
(int statusCode) method to get mocked archive unit profiles with the givel status codestatic RequestResponse<com.fasterxml.jackson.databind.JsonNode>
static RequestResponse
static RequestResponse
getContexts
(int statusCode) static RequestResponse
static RequestResponse
static RequestResponse
static RequestResponse
static RequestResponse<IngestContractModel>
static ItemStatus
getItemStatus
(String id) static com.fasterxml.jackson.databind.JsonNode
static com.fasterxml.jackson.databind.JsonNode
static com.fasterxml.jackson.databind.JsonNode
static RequestResponse
static RequestResponse
static com.fasterxml.jackson.databind.JsonNode
static RequestResponse
static RequestResponse
static RequestResponse<com.fasterxml.jackson.databind.JsonNode>
static RequestResponse<com.fasterxml.jackson.databind.JsonNode>
static javax.ws.rs.core.Response
static RequestResponse
getOntologies
(int statusCode) method to get mocked ontologies with the given status codestatic RequestResponse
static RequestResponse
getProfiles
(int statusCode) static RequestResponse
getRule()
static RequestResponse
static RequestResponse
getRuleList
(String ruleId) static RequestResponse
static RequestResponse
static void
static void
setOntologies
(List<OntologyModel> ontologies)
-
Field Details
-
UNIT_RAW
- See Also:
-
GOT_RAW
- See Also:
-
INGEST_CONTRACTS
- See Also:
-
DEFAULT_ACCESS_CONTRACT
-
ACCESS_CONTRACT_NO_DOWNLOAD
-
ACCESS_CONTRACTS
-
MANAGEMENT_CONTRACTS
- See Also:
-
PROFILES
- See Also:
-
ARCHIVE_UNIT_PROFILES
- See Also:
-
CONTEXTS
- See Also:
-
SECURITY_PROFILES
- See Also:
-
ONTOLOGIES
-
-
Method Details
-
getLogbookResults
public static com.fasterxml.jackson.databind.JsonNode getLogbookResults() throws InvalidParseOperationException- Returns:
- a default Logbook Result
- Throws:
InvalidParseOperationException
-
getLogbooksRequestResponse
- Returns:
- a default Logbook response Result
- Throws:
InvalidParseOperationException
-
getLogbookRequestResponse
- Returns:
- one default Logbook response
- Throws:
InvalidParseOperationException
-
getLogbookRequestResponseWithObId
public static RequestResponse getLogbookRequestResponseWithObId() throws InvalidParseOperationException- Returns:
- one default Logbook response
- Throws:
InvalidParseOperationException
-
getLogbookOperation
public static com.fasterxml.jackson.databind.JsonNode getLogbookOperation() throws InvalidParseOperationException- Returns:
- a default Logbook Operation
- Throws:
InvalidParseOperationException
-
getLogbookLifecycle
public static com.fasterxml.jackson.databind.JsonNode getLogbookLifecycle() throws InvalidParseOperationException- Returns:
- a default Logbook Operation
- Throws:
InvalidParseOperationException
-
getMetaDataResult
public static RequestResponse<com.fasterxml.jackson.databind.JsonNode> getMetaDataResult() throws InvalidParseOperationException- Throws:
InvalidParseOperationException
-
getArchiveUnitRawResult
public static RequestResponse<com.fasterxml.jackson.databind.JsonNode> getArchiveUnitRawResult() throws InvalidParseOperationException- Throws:
InvalidParseOperationException
-
getObjectGroupRawResult
public static RequestResponse<com.fasterxml.jackson.databind.JsonNode> getObjectGroupRawResult() throws InvalidParseOperationException- Throws:
InvalidParseOperationException
-
getLogbookOperationWithObId
public static com.fasterxml.jackson.databind.JsonNode getLogbookOperationWithObId() throws InvalidParseOperationException- Returns:
- a default Logbook Operation
- Throws:
InvalidParseOperationException
-
createResponse
- Parameters:
response
- the original object to be included in response- Returns:
- a default response
-
createEmptyReponse
-
createVitamError
-
createResponse
- Parameters:
s
- the original object to be included in response- Returns:
- a default response
- Throws:
InvalidParseOperationException
-
createResponse
public static <T> RequestResponse<T> createResponse(String s, Class<T> clasz) throws InvalidParseOperationException - Type Parameters:
T
-- Parameters:
s
- the original object to be included in response- Returns:
- a default response
- Throws:
InvalidParseOperationException
-
createResponse
public static <T> RequestResponse<T> createResponse(List<T> entries) throws InvalidParseOperationException - Type Parameters:
T
-- Parameters:
entries
- the original object to be included in response- Returns:
- a default response
- Throws:
InvalidParseOperationException
-
createResponse
public static RequestResponse createResponse(String s, int statuscode, Class clazz) throws InvalidParseOperationException - Parameters:
s
- the original object to be included in responsestatuscode
- status to be returned- Returns:
- a default response
- Throws:
InvalidParseOperationException
-
getAccessionRegisterSummary
- Returns:
- a default Access Register Summary
- Throws:
InvalidParseOperationException
-
getAccessionRegisterDetail
- Returns:
- a default Access Register Detail
- Throws:
InvalidParseOperationException
-
getFormat
- Returns:
- a default Format
- Throws:
InvalidParseOperationException
-
getRule
- Returns:
- a default Rule
- Throws:
InvalidParseOperationException
-
getAgency
- Returns:
- a default agency
- Throws:
InvalidParseOperationException
-
getIngestContracts
public static RequestResponse<IngestContractModel> getIngestContracts() throws InvalidParseOperationException- Returns:
- a RequestResponse containing contracts json
- Throws:
InvalidParseOperationException
-
getAccessContractOrDefault
public static RequestResponse getAccessContractOrDefault(String identifier) throws InvalidParseOperationException - Returns:
- a RequestResponse containing access contracts json
- Throws:
InvalidParseOperationException
-
getManagementContracts
- Returns:
- a RequestResponse containing management contracts json
- Throws:
InvalidParseOperationException
-
getContexts
- Returns:
- context json
- Throws:
InvalidParseOperationException
-
getProfiles
- Throws:
InvalidParseOperationException
-
getFormatList
- Returns:
- a default list of Formats
- Throws:
InvalidParseOperationException
-
getAgenciesList
- Returns:
- a default list of Formats
- Throws:
InvalidParseOperationException
-
getRuleList
- Returns:
- a default list of Rules
- Throws:
InvalidParseOperationException
-
getRuleList
- Throws:
InvalidParseOperationException
-
getEmptyResult
- Returns:
- a default list of Rules
- Throws:
InvalidParseOperationException
-
getArchiveUnitResult
- Returns:
- a default ArchiveUnit result
- Throws:
InvalidParseOperationException
-
getObjectStream
public static javax.ws.rs.core.Response getObjectStream()- Returns:
- a default ArchiveUnit result
- Throws:
InvalidParseOperationException
-
getItemStatus
- Parameters:
id
-- Returns:
- a default ArchiveUnit result
- Throws:
InvalidParseOperationException
-
getOperationTraceabilityDetails
public static RequestResponse getOperationTraceabilityDetails() throws InvalidParseOperationException- Returns:
- a default operation traceability
- Throws:
InvalidParseOperationException
-
checkOperationTraceability
- Throws:
InvalidParseOperationException
-
getTraceabilityOperationMock
- Throws:
InvalidParseOperationException
-
getSecurityProfiles
- Throws:
InvalidParseOperationException
-
getDipInfo
- Throws:
InvalidParseOperationException
-
getArchiveUnitProfiles
public static RequestResponse getArchiveUnitProfiles(int statusCode) throws InvalidParseOperationException method to get mocked archive unit profiles with the givel status code- Parameters:
statusCode
-- Returns:
- a mock of response for ArchiveUnitProfiles
- Throws:
InvalidParseOperationException
-
getOntologies
method to get mocked ontologies with the given status code- Parameters:
statusCode
-- Returns:
- a mock of response for Ontologies
- Throws:
InvalidParseOperationException
-
setOntologies
-
resetOntologies
public static void resetOntologies()
-