public class ServiceContractService extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
canModifyIdentity(boolean connected,
String applicationCode) |
ServiceContract |
create(ServiceContract serviceContract,
Integer applicationId)
Creates a new
ServiceContract (if possible) and adds it to cache if active. |
void |
delete(Integer id)
Deletes a
ServiceContract by its id in the database |
void |
deleteApplication(ClientApplication clientApplication)
Deletes a
ClientApplication and all the related ServiceContract |
ServiceContract |
getActiveServiceContract(String applicationCode)
Get the active
ServiceContract associated to the given ClientApplication |
static ServiceContractService |
instance() |
boolean |
isInRange(Date testedDate,
Date min,
Date max) |
ServiceContract |
update(ServiceContract serviceContract,
Integer applicationId)
Update an existing
ServiceContract (if possible) and adds it to cache if active. |
fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse |
validateIdentityChange(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest identityChangeRequest,
String applicationCode)
Validates the
IdentityChangeRequest against the ServiceContract associated to the ClientApplication requesting the change. |
fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse |
validateIdentityImport(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest identityChangeRequest,
String applicationCode)
Validates the
IdentityChangeRequest against the ServiceContract associated to the ClientApplication requesting the change. |
fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeResponse |
validateIdentityMerge(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeRequest identityMergeRequest,
String applicationCode)
Validates the
IdentityMergeRequest against the ServiceContract associated to the ClientApplication requesting the change. |
fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchResponse |
validateIdentitySearch(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchRequest identitySearchRequest,
String applicationCode)
Validates the
IdentitySearchRequest against the ServiceContract associated to the ClientApplication requesting the search. |
public static ServiceContractService instance()
public ServiceContract getActiveServiceContract(String applicationCode) throws ServiceContractNotFoundException
ServiceContract associated to the given ClientApplicationapplicationCode - code of the ClientApplication requesting the changeServiceContractServiceContractNotFoundExceptionpublic fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse validateIdentityChange(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest identityChangeRequest,
String applicationCode)
throws ServiceContractNotFoundException,
IdentityAttributeNotFoundException
IdentityChangeRequest against the ServiceContract associated to the ClientApplication requesting the change. Each
violation is listed in the IdentityChangeResponse with a status by attribute key. The following rules are verified: identityChangeRequest - IdentityChangeRequest with list of attributesapplicationCode - code of the ClientApplication requesting the changeIdentityChangeResponse containing the execution statusServiceContractNotFoundExceptionIdentityAttributeNotFoundExceptionpublic fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeResponse validateIdentityMerge(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.merge.IdentityMergeRequest identityMergeRequest,
String applicationCode)
throws ServiceContractNotFoundException
IdentityMergeRequest against the ServiceContract associated to the ClientApplication requesting the change. Each
violation is listed in the IdentityMergeResponse with a status by attribute key. The following rules are verified: ClientApplication must be authorized to perform the mergeidentityMergeRequest - IdentityMergeRequest with list of attributesapplicationCode - code of the ClientApplication requesting the changeIdentityMergeResponse containing the execution statusServiceContractNotFoundExceptionpublic fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeResponse validateIdentityImport(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.IdentityChangeRequest identityChangeRequest,
String applicationCode)
throws ServiceContractNotFoundException,
IdentityAttributeNotFoundException
IdentityChangeRequest against the ServiceContract associated to the ClientApplication requesting the change. Each
violation is listed in the IdentityChangeResponse with a status by attribute key. The following rules are verified: ClientApplication must be authorized to perform the importidentityChangeRequest - IdentityMergeRequest with list of attributesapplicationCode - code of the ClientApplication requesting the changeIdentityMergeResponse containing the execution statusServiceContractNotFoundExceptionIdentityAttributeNotFoundExceptionpublic fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchResponse validateIdentitySearch(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.IdentitySearchRequest identitySearchRequest,
String applicationCode)
throws ServiceContractNotFoundException
IdentitySearchRequest against the ServiceContract associated to the ClientApplication requesting the search. Each
violation is listed in the response with a status by attribute key. The following rules are verified: identitySearchRequest - IdentitySearchRequest with list of attributesapplicationCode - code of the ClientApplication requesting the searchServiceContractNotFoundExceptionpublic boolean canModifyIdentity(boolean connected,
String applicationCode)
throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic ServiceContract create(ServiceContract serviceContract, Integer applicationId) throws ServiceContractDefinitionException
ServiceContract (if possible) and adds it to cache if active. The contract can be created if:
serviceContract - applicationId - ServiceContractDefinitionExceptionpublic ServiceContract update(ServiceContract serviceContract, Integer applicationId) throws ServiceContractDefinitionException
ServiceContract (if possible) and adds it to cache if active. The contract can be updated if:
serviceContract - applicationId - ServiceContractDefinitionExceptionpublic void delete(Integer id)
ServiceContract by its id in the databaseid - public void deleteApplication(ClientApplication clientApplication)
ClientApplication and all the related ServiceContractclientApplication - Copyright © 2023 City of Paris. All rights reserved.