Class IdentityHome
java.lang.Object
fr.paris.lutece.plugins.identitystore.business.identity.IdentityHome
This class provides instances management methods (create, find, ...) for Identity objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddIdentityChangeHistory(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChange identityChange) add an identity change event in history tablestatic voidcancelMerge(Identity identity) static IdentityCreate an instance of the identity classstatic voiddeleteAttributeHistory(int identityId) Delete all attribute history of the identity's provided id.findAll()Select AllIdentityfindByAttributeExisting(List<Integer> idAttributeList, int nbFilledAttributes, boolean notMerged, boolean notSuspicious, int rulePriority) Find all identities that have all attributes specified in the list in parameters.
Identities MUST have all those attributes in order to be returned.findByAttributesValueForApiSearch(List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchAttribute> searchAttributes, int max) Find all identities matching one of the values defined on each of the selected Attributes.static IdentityfindByConnectionId(String strConnectionId) Find by connection IDstatic IdentityfindByCustomerId(String strCustomerId) Find by customer IDstatic IdentityfindByCustomerIdNoAttributes(String strCustomerId) Find by customer ID.static IdentityfindByPrimaryKey(int nKey) Returns an instance of a identity whose identifier is specified in parameterfindExpiredNotMergedAndNotConnectedIdentities(int limit, boolean withGuidOnly) Search for identities that are not connected, and have a past expirationDate.static List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChange>findHistoryByCustomerId(String strCustomerId) Find history by customer IDstatic List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChange>findHistoryBySearchParameters(String strCustomerId, String clientCode, String authorName, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChangeType changeType, String changeStatus, String authorType, Date modificationDate, Map<String, String> metadata, Integer nbDaysFrom, org.apache.commons.lang3.tuple.Pair<Date, Date> modificationDateInterval, int max) Find history by customer search parametersstatic intfindIdByCustomerId(String strCustomerId) Find an identity ID from the specified customer IDstatic IdentityfindMasterIdentityByConnectionId(String strConnectionId) Find by connection IDstatic IdentityfindMasterIdentityByCustomerId(String strCustomerId) Find by customer IDfindMergedIdentities(int identityId) Search for identities that are merged to the provided identity ID.findNotMergedNotConnectedWithNonCertifiedAttributeCustomerIds(String attributeKey, String certProcess, int limit) Search for identity customer IDs that are not connected, not merged, and have the specified attribute non-certified.static List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.UpdatedIdentityDto>findUpdatedIdentities(Integer days, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChangeType> identityChangeTypes, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchUpdatedAttribute> updatedAttributes, Integer max) get identities that have been updated during the previous `days`.findUpdatedIdentityIds(Integer days, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChangeType> identityChangeTypes, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchUpdatedAttribute> updatedAttributes, Integer max) get identity IDs that have been updated during the previous `days`.static List<IndicatorsActionsType>getActionsTypesDuringInterval(int interval) static IntegergetCountActiveMonParisdentities(boolean monParisActive) Count All identities that has been connected or not.Count how many attributes each entity has.static IntegergetCountDeletedIdentities(boolean deleted) Count All identities that has been deleted or not.static IntegerCount All Identities.static Integerstatic Integerstatic IntegergetCountMergedIdentities(boolean merged) Count All identities that has been merged or not.static IntegerCount how many attributes has no attribute and isn't merged.static TimestampgetMasterIdentityLastUpdateDate(String customerId) Get the master identity last update date coresponding to the given customer IDstatic IdentitygetMasterIdentityNoAttributesByConnectionId(String connectionId) Get the master identity without attributes coresponding to the given connection IDstatic List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.UpdatedIdentityDto>getUpdatedIdentitiesFromIds(List<Integer> identityIds) get updated identities from their IDs.static voidhardRemove(int nIdentityId) Remove the identity whose identifier is specified in parameterstatic IdentityArchive identities which have been merge as secondarystatic voidsoftRemove(String strCuid) static IdentityUpdate of the identity which is specified in parameter
-
Method Details
-
create
Create an instance of the identity class- Parameters:
identity- The instance of the Identity which contains the informations to store- Returns:
- The instance of identity which has been created with its primary key.
-
update
Update of the identity which is specified in parameter- Parameters:
identity- The instance of the Identity which contains the data to store- Returns:
- The instance of the identity which has been updated
-
merge
Archive identities which have been merge as secondary- Parameters:
identity-- Returns:
-
cancelMerge
-
hardRemove
public static void hardRemove(int nIdentityId) Remove the identity whose identifier is specified in parameter- Parameters:
nIdentityId- The identity Id
-
softRemove
-
findIdByCustomerId
Find an identity ID from the specified customer ID- Parameters:
strCustomerId- the customer ID- Returns:
- the identity ID
-
findByPrimaryKey
Returns an instance of a identity whose identifier is specified in parameter- Parameters:
nKey- The identity primary key- Returns:
- an instance of Identity
-
findAll
Select AllIdentity- Returns:
- The Identity
-
findByConnectionId
Find by connection ID- Parameters:
strConnectionId- The connection ID- Returns:
- The Identity
-
findHistoryByCustomerId
public static List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChange> findHistoryByCustomerId(String strCustomerId) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException Find history by customer ID- Parameters:
strCustomerId- The customer ID- Returns:
- The Identity
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
findHistoryBySearchParameters
public static List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChange> findHistoryBySearchParameters(String strCustomerId, String clientCode, String authorName, fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChangeType changeType, String changeStatus, String authorType, Date modificationDate, Map<String, String> metadata, Integer nbDaysFrom, org.apache.commons.lang3.tuple.Pair<Date, throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreExceptionDate> modificationDateInterval, int max) Find history by customer search parameters- Parameters:
strCustomerId- The customer ID- Returns:
- The Identity
- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
findByCustomerId
Find by customer ID- Parameters:
strCustomerId- The customer ID- Returns:
- The Identity
-
findByCustomerIdNoAttributes
Find by customer ID. Does not load the attributes.- Parameters:
strCustomerId- The customer ID- Returns:
- The Identity without attributes
-
findMasterIdentityByCustomerId
Find by customer ID- Parameters:
strCustomerId- The customer ID- Returns:
- The Identity
-
getMasterIdentityLastUpdateDate
Get the master identity last update date coresponding to the given customer ID- Parameters:
customerId- the customer ID- Returns:
- the last update date or null if the identity doesn't exist for the provided CUID
-
findMasterIdentityByConnectionId
Find by connection ID- Parameters:
strConnectionId- The customer ID- Returns:
- The Identity
-
getMasterIdentityNoAttributesByConnectionId
Get the master identity without attributes coresponding to the given connection ID- Parameters:
connectionId- the connection ID- Returns:
- the identity or null if the identity doesn't exist for the provided connection ID
-
findByAttributesValueForApiSearch
public static List<Identity> findByAttributesValueForApiSearch(List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchAttribute> searchAttributes, int max) Find all identities matching one of the values defined on each of the selected Attributes. One value must be found for all selected attributes. Always performs an exact search.- Parameters:
mapAttributes- A map that associates the id of each attributes selected with the list of values- Returns:
- list of Identity
-
findByAttributeExisting
public static List<String> findByAttributeExisting(List<Integer> idAttributeList, int nbFilledAttributes, boolean notMerged, boolean notSuspicious, int rulePriority) Find all identities that have all attributes specified in the list in parameters.
Identities MUST have all those attributes in order to be returned.- Parameters:
idAttributeList- the attributes idnotMerged- if the returned identities have to be not mergednotSuspicious- if the returned identities have to not be suspiciousnbFilledAttributes- minimum number of filled attributes over idAttributeList- Returns:
- A list of matching customer IDs
-
addIdentityChangeHistory
public static void addIdentityChangeHistory(fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChange identityChange) throws fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException add an identity change event in history table- Parameters:
identityChange- identity change event- Throws:
fr.paris.lutece.plugins.identitystore.web.exception.IdentityStoreException
-
findUpdatedIdentities
public static List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.UpdatedIdentityDto> findUpdatedIdentities(Integer days, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChangeType> identityChangeTypes, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchUpdatedAttribute> updatedAttributes, Integer max) get identities that have been updated during the previous `days`.- Parameters:
days- max number of days since the last updateidentityChangeTypes- filters on specific change typesupdatedAttributes- filters on specific updated attributes- Returns:
- the list of identities
-
findUpdatedIdentityIds
public static List<Integer> findUpdatedIdentityIds(Integer days, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.history.IdentityChangeType> identityChangeTypes, List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.search.SearchUpdatedAttribute> updatedAttributes, Integer max) get identity IDs that have been updated during the previous `days`.- Parameters:
days- max number of days since the last updateidentityChangeTypes- filters on specific change typesupdatedAttributes- filters on specific updated attributes- Returns:
- the list of identities
-
getUpdatedIdentitiesFromIds
public static List<fr.paris.lutece.plugins.identitystore.v3.web.rs.dto.crud.UpdatedIdentityDto> getUpdatedIdentitiesFromIds(List<Integer> identityIds) get updated identities from their IDs.- Parameters:
identityIds- list of desired identity IDs- Returns:
- the list of identities
-
findExpiredNotMergedAndNotConnectedIdentities
public static List<Identity> findExpiredNotMergedAndNotConnectedIdentities(int limit, boolean withGuidOnly) Search for identities that are not connected, and have a past expirationDate.- Parameters:
limit- the max number of returned results- Returns:
- a list of expired
Identity
-
findNotMergedNotConnectedWithNonCertifiedAttributeCustomerIds
public static List<String> findNotMergedNotConnectedWithNonCertifiedAttributeCustomerIds(String attributeKey, String certProcess, int limit) Search for identity customer IDs that are not connected, not merged, and have the specified attribute non-certified.- Parameters:
attributeKey- the attribute key to be present and non-certifiedlimit- the max number of returned identities- Returns:
- a list of customer IDs
-
findMergedIdentities
Search for identities that are merged to the provided identity ID.- Parameters:
identityId- the 'master' identity ID- Returns:
- a list of
Identity
-
deleteAttributeHistory
public static void deleteAttributeHistory(int identityId) Delete all attribute history of the identity's provided id.- Parameters:
identityId- the identity id
-
getCountIdentities
Count All Identities. -
getCountDeletedIdentities
Count All identities that has been deleted or not.- Parameters:
deleted- define if the dao count deleted or not deleted identities
-
getCountMergedIdentities
Count All identities that has been merged or not.- Parameters:
merged- define if the dao count merged or not merged identities
-
getCountActiveMonParisdentities
Count All identities that has been connected or not.- Parameters:
monParisActive- define if the dao count connected or not connected identities
-
getCountAttributesByIdentities
Count how many attributes each entity has. -
getCountUnmergedIdentitiesWithoutAttributes
Count how many attributes has no attribute and isn't merged. -
getCountIndexEligibleIdentities
-
getCountIndexNotEligibleIdentities
-
getActionsTypesDuringInterval
-
getHistoryStatusList
-