public class ProfileServiceImpl extends Object implements ProfileService
| Modifier and Type | Field and Description |
|---|---|
static String |
OP_PROFILE_STORAGE |
static String |
PROFILE_BACKUP_EVENT |
static String |
PROFILE_FORMAT_SHOULD_BE_XSD_OR_RNG |
static String |
PROFILE_IDENTIFIER_ALREADY_EXISTS_IN_DATABASE |
static String |
PROFILE_IDENTIFIER_MUST_BE_STRING |
| Constructor and Description |
|---|
ProfileServiceImpl(MongoDbAccessAdminImpl mongoAccess,
VitamCounterService vitamCounterService,
FunctionalBackupService functionalBackupService)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
RequestResponse<ProfileModel> |
createProfiles(List<ProfileModel> profileModelList)
Create a collections of profile After passing the validation steps.
|
javax.ws.rs.core.Response |
downloadProfileFile(String profileIdentifier)
download file corresponding to profileIdentifier
|
ProfileModel |
findByIdentifier(String identifier)
Find profile by identifier
|
RequestResponseOK<ProfileModel> |
findProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl)
find Profile by QueryDsl
|
RequestResponse |
importProfileFile(String profileIdentifier,
InputStream profileFile)
1.
|
RequestResponse<ProfileModel> |
updateProfile(ProfileModel profileModel,
com.fasterxml.jackson.databind.JsonNode jsonDsl)
Update profile
|
RequestResponse<ProfileModel> |
updateProfile(String identifier,
com.fasterxml.jackson.databind.JsonNode jsonDsl)
Update profiles after passing validation steps :
Field modified :
- ActivationDate
- DesactivationDate
- LastUpdate
- Status
|
public static final String OP_PROFILE_STORAGE
public static final String PROFILE_FORMAT_SHOULD_BE_XSD_OR_RNG
public static final String PROFILE_IDENTIFIER_ALREADY_EXISTS_IN_DATABASE
public static final String PROFILE_IDENTIFIER_MUST_BE_STRING
public static final String PROFILE_BACKUP_EVENT
public ProfileServiceImpl(MongoDbAccessAdminImpl mongoAccess, VitamCounterService vitamCounterService, FunctionalBackupService functionalBackupService)
mongoAccess - MongoDB clientvitamCounterService - the vitam counter servicefunctionalBackupService - the functional backup servicepublic RequestResponse<ProfileModel> createProfiles(List<ProfileModel> profileModelList) throws VitamException
ProfileServicecreateProfiles in interface ProfileServiceprofileModelList - the list of profiles to be createdVitamException - if in error occurs while validating contractspublic RequestResponse importProfileFile(String profileIdentifier, InputStream profileFile) throws VitamException
ProfileServiceimportProfileFile in interface ProfileServiceprofileIdentifier - the profile identifierprofileFile - the profile file as an input streamVitamException - thrown if the profiles could not be importedpublic javax.ws.rs.core.Response downloadProfileFile(String profileIdentifier) throws ProfileNotFoundException, InvalidParseOperationException, ReferentialException
ProfileServicedownloadProfileFile in interface ProfileServiceprofileIdentifier - the profile identifierProfileNotFoundException - thrown if the profile could not be foundInvalidParseOperationException - thrown if the query could not be executedReferentialException - thrown if the query could not be executedpublic RequestResponse<ProfileModel> updateProfile(String identifier, com.fasterxml.jackson.databind.JsonNode jsonDsl) throws VitamException
ProfileServiceupdateProfile in interface ProfileServiceidentifier - identifier of the profile to updatejsonDsl - the given profile dsl for updateVitamException - if in error occurs while validating contractspublic RequestResponse<ProfileModel> updateProfile(ProfileModel profileModel, com.fasterxml.jackson.databind.JsonNode jsonDsl) throws VitamException
ProfileServiceupdateProfile in interface ProfileServiceprofileModel - the updated ProfileModeljsonDsl - the query as a jsonVitamException - thrown if the update could not be executedpublic ProfileModel findByIdentifier(String identifier) throws ReferentialException, InvalidParseOperationException
ProfileServicefindByIdentifier in interface ProfileServiceidentifier - the Profile identifierReferentialException - thrown if the query could not be executedInvalidParseOperationException - thrown if the query could not be executedpublic RequestResponseOK<ProfileModel> findProfiles(com.fasterxml.jackson.databind.JsonNode queryDsl) throws ReferentialException, InvalidParseOperationException
ProfileServicefindProfiles in interface ProfileServicequeryDsl - the query as a json to be executedReferentialException - thrown if the query could not be executedInvalidParseOperationException - thrown if the query could not be executedpublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseableCopyright © 2018 Vitam. All rights reserved.