public class ServiceContractService extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateIdentity(String clientCode) |
boolean |
canDeleteIdentity(String clientCode) |
boolean |
canModifyConnectedIdentity(String clientCode) |
boolean |
canUncertifyIdentity(String clientCode) |
boolean |
canUpdateIdentity(String clientCode) |
ServiceContract |
close(ServiceContract serviceContract)
Closes an existing
ServiceContract (if possible) and adds it to cache if active. |
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 clientCode)
Get the active
ServiceContract associated to the given ClientApplication |
List<String> |
getClientCodesFromAppCode(String appCode)
get Client Code list From AppCode
|
int |
getDataRetentionPeriodInMonths(String clientCode) |
List<String> |
getMandatoryAttributes(String clientCode,
List<AttributeKey> sharedMandatoryAttributeList) |
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 clientCode)
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 clientCode)
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 clientCode)
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 clientCode,
boolean checkContract)
Validates the
IdentitySearchRequest against the ServiceContract associated to the ClientApplication requesting the search. |
public static ServiceContractService instance()
public ServiceContract getActiveServiceContract(String clientCode) throws ServiceContractNotFoundException
ServiceContract associated to the given ClientApplicationclientCode - 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 clientCode)
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 attributesclientCode - 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 clientCode)
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 attributesclientCode - 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 clientCode)
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 attributesclientCode - 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 clientCode,
boolean checkContract)
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 attributesclientCode - code of the ClientApplication requesting the searchServiceContractNotFoundExceptionpublic List<String> getMandatoryAttributes(String clientCode, List<AttributeKey> sharedMandatoryAttributeList) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic boolean canModifyConnectedIdentity(String clientCode) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic boolean canCreateIdentity(String clientCode) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic boolean canUpdateIdentity(String clientCode) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic boolean canUncertifyIdentity(String clientCode) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic boolean canDeleteIdentity(String clientCode) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic int getDataRetentionPeriodInMonths(String clientCode) throws ServiceContractNotFoundException
ServiceContractNotFoundExceptionpublic ServiceContract create(ServiceContract serviceContract, Integer applicationId) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
ServiceContract (if possible) and adds it to cache if active. The contract can be created if:
serviceContract - applicationId - fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionpublic ServiceContract update(ServiceContract serviceContract, Integer applicationId) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
ServiceContract (if possible) and adds it to cache if active. The contract can be updated if:
serviceContract - applicationId - fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionpublic ServiceContract close(ServiceContract serviceContract) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
ServiceContract (if possible) and adds it to cache if active.serviceContract - fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionpublic void delete(Integer id)
ServiceContract by its id in the databaseid - public void deleteApplication(ClientApplication clientApplication) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
ClientApplication and all the related ServiceContractclientApplication - fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionCopyright © 2023 City of Paris. All rights reserved.