Package com.fifa.connectid.sdk
Class RegistrationFacade
- java.lang.Object
-
- com.fifa.connectid.sdk.RegistrationFacade
-
public class RegistrationFacade extends Object
-
-
Constructor Summary
Constructors Constructor Description RegistrationFacade(ConnectIdEnvironment connectIdEnvironment, com.fifa.connectservicebus.sdk.authentication.ClientCredentials clientCredentials, com.fifa.connectservicebus.sdk.encryption.PrivateKeyStorage privateKeyStorage, RegistrationFacadeSettings settings, com.fifa.connectservicebus.sdk.logging.Logger logger)RegistrationFacade(ConnectIdEnvironment connectIdEnvironment, com.fifa.connectservicebus.sdk.authentication.ClientCredentials clientCredentials, com.fifa.connectservicebus.sdk.encryption.PrivateKeyStorage privateKeyStorage, RegistrationFacadeSettings settings, com.fifa.connectservicebus.sdk.logging.Logger logger, boolean useEncryption)RegistrationFacade(ConnectIdEnvironment connectIdEnvironment, com.fifa.connectservicebus.sdk.authentication.ClientCredentials clientCredentials, com.fifa.connectservicebus.sdk.encryption.PrivateKeyStorage privateKeyStorage, com.fifa.connectservicebus.sdk.logging.Logger logger)RegistrationFacade(FifaConnectIdClient connectIdClient, com.fifa.connectservicebus.sdk.FifaConnectServiceBusClient serviceBusClient, RegistrationFacadeSettings settings, com.fifa.connectservicebus.sdk.logging.Logger logger, boolean useEncryption)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BackgroundListenerconfigureListener(PersonDetailsProvider provider)Configures listener for handling messages received from Connect Service BusBackgroundListenerconfigureListener(PersonDetailsProvider provider, Collection<MessageHandler> messageHandlers)Configures listener for handling messages received from Connect Service BusBackgroundListenerconfigureListener(PersonDetailsProvider provider, Collection<MessageHandler> messageHandlers, CacheCleanJob cleanJob)Configures listener for handling messages received from Connect Service BusStringforceRegisterPerson(PersonData personData)Registers a new person even if possible duplicates are found.StringforceRegisterPerson(PersonData personData, String personLocalId)Registers a new person even if possible duplicates are found.PersonTypeforceUpdatePerson(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth)Updates person data even if possible duplicates are foundPersonTypeforceUpdatePerson(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth, String gender)Updates person data even if possible duplicates are foundFifaConnectIdClientgetConnectIdClient()Collection<PersonDuplicateWithDetails>getDuplicates(PersonData personData, long timeoutMilliseconds)Checks for duplicates of a person.Collection<PersonDuplicateWithDetails>getDuplicates(PersonData personData, long timeoutMilliseconds, List<String> organisationsIds)Checks for duplicates of a person.Collection<PersonDuplicateWithDetails>getDuplicatesAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds)Deprecated.Collection<PersonDuplicateWithDetails>getDuplicatesAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds, List<String> organisationsIds)Deprecated.DuplicatesOfRegisteredPersongetDuplicatesExceptTrustedKnownDuplicates(String personFifaId, List<String> trustedOrganisationsIds, long timeoutInMilliseconds)Checks for duplicates of a person.com.fifa.connectservicebus.sdk.FifaConnectServiceBusClientgetServiceBusClient()RegistrationResultregisterPersonAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds)Registers a new person and assigns FIFA Unique Identifier.RegistrationResultregisterPersonAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds, String personLocalId)Registers a new person and assigns FIFA Unique Identifier.StringsendRequestForDetailsAndWaitForThem(String uniqueFifaId, long timeoutMilliseconds)Sends request to given recipient for person details (with uniqueFifaId) and returns XML string.StringsendRequestForDetailsAndWaitForThem(String uniqueFifaId, long timeoutMilliseconds, String recipientId)HashMap<String,PersonDuplicateWithDetails>sendRequestsForDetails(List<PersonDuplicateType> duplicates)Sends requests for duplicates detailsHashMap<String,PersonDuplicateWithDetails>sendRequestsForDetailsAndWaitForThem(List<PersonDuplicateType> duplicates, long timeoutMilliseconds)Sends requests for duplicates detailsUpdateResultupdatePersonAndWaitForDetailsInCaseOfDuplicates(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth, long timeoutMilliseconds)Updates a person If duplicates are found the person is not updated.UpdateResultupdatePersonAndWaitForDetailsInCaseOfDuplicates(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth, String gender, long timeoutMilliseconds)Updates a person If duplicates are found the person is not updated.
-
-
-
Constructor Detail
-
RegistrationFacade
public RegistrationFacade(FifaConnectIdClient connectIdClient, com.fifa.connectservicebus.sdk.FifaConnectServiceBusClient serviceBusClient, RegistrationFacadeSettings settings, com.fifa.connectservicebus.sdk.logging.Logger logger, boolean useEncryption)
-
RegistrationFacade
public RegistrationFacade(ConnectIdEnvironment connectIdEnvironment, com.fifa.connectservicebus.sdk.authentication.ClientCredentials clientCredentials, com.fifa.connectservicebus.sdk.encryption.PrivateKeyStorage privateKeyStorage, RegistrationFacadeSettings settings, com.fifa.connectservicebus.sdk.logging.Logger logger, boolean useEncryption)
-
RegistrationFacade
public RegistrationFacade(ConnectIdEnvironment connectIdEnvironment, com.fifa.connectservicebus.sdk.authentication.ClientCredentials clientCredentials, com.fifa.connectservicebus.sdk.encryption.PrivateKeyStorage privateKeyStorage, RegistrationFacadeSettings settings, com.fifa.connectservicebus.sdk.logging.Logger logger)
-
RegistrationFacade
public RegistrationFacade(ConnectIdEnvironment connectIdEnvironment, com.fifa.connectservicebus.sdk.authentication.ClientCredentials clientCredentials, com.fifa.connectservicebus.sdk.encryption.PrivateKeyStorage privateKeyStorage, com.fifa.connectservicebus.sdk.logging.Logger logger)
-
-
Method Detail
-
getConnectIdClient
public FifaConnectIdClient getConnectIdClient()
-
getServiceBusClient
public com.fifa.connectservicebus.sdk.FifaConnectServiceBusClient getServiceBusClient()
-
configureListener
public BackgroundListener configureListener(PersonDetailsProvider provider)
Configures listener for handling messages received from Connect Service Bus- Parameters:
provider- - object providing detailed person data
-
configureListener
public BackgroundListener configureListener(PersonDetailsProvider provider, Collection<MessageHandler> messageHandlers)
Configures listener for handling messages received from Connect Service Bus- Parameters:
provider- - object providing detailed person datamessageHandlers- - custom handlers for messages coming from Service Bus
-
configureListener
public BackgroundListener configureListener(PersonDetailsProvider provider, Collection<MessageHandler> messageHandlers, CacheCleanJob cleanJob)
Configures listener for handling messages received from Connect Service Bus- Parameters:
provider- - object providing detailed person datamessageHandlers- - custom handlers for messages coming from Service BuscleanJob- - job responsible for the removal of old messages
-
sendRequestsForDetails
public HashMap<String,PersonDuplicateWithDetails> sendRequestsForDetails(List<PersonDuplicateType> duplicates) throws com.fifa.connectservicebus.sdk.FifaConnectServiceBusException
Sends requests for duplicates details- Parameters:
duplicates- - Collection of person duplicates- Throws:
com.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedException
-
sendRequestsForDetailsAndWaitForThem
public HashMap<String,PersonDuplicateWithDetails> sendRequestsForDetailsAndWaitForThem(List<PersonDuplicateType> duplicates, long timeoutMilliseconds) throws com.fifa.connectservicebus.sdk.FifaConnectServiceBusException
Sends requests for duplicates details- Parameters:
duplicates- - Collection of person duplicatestimeoutMilliseconds- - Time to wait for duplicates details in milliseconds- Throws:
com.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedException
-
forceRegisterPerson
public String forceRegisterPerson(PersonData personData) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.AuthenticationException, UnauthorizedException, ValidationException
Registers a new person even if possible duplicates are found. Uses 'PersonLocalType' as defined in FIFA Data Standard.- Parameters:
personData- - object containing information about local and international names of the person, as well as the date of birth.- Throws:
InvalidClientDataExceptionFifaConnectIdExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
forceRegisterPerson
public String forceRegisterPerson(PersonData personData, String personLocalId) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.AuthenticationException, UnauthorizedException, ValidationException
Registers a new person even if possible duplicates are found. Uses 'PersonLocalType' as defined in FIFA Data Standard.- Parameters:
personData- - object containing information about local and international names of the person, as well as the date of birth.personLocalId- - Local identifier of person- Throws:
InvalidClientDataExceptionFifaConnectIdExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
registerPersonAndWaitForDetailsInCaseOfDuplicates
public RegistrationResult registerPersonAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Registers a new person and assigns FIFA Unique Identifier. If duplicates are found the person is not registered. Uses 'PersonLocalType' as defined in FIFA Data Standard.- Parameters:
personData- - Object containing information about local and international names of the person, as well as the date of birth.timeoutMilliseconds- - Time to wait for duplicates details.- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
registerPersonAndWaitForDetailsInCaseOfDuplicates
public RegistrationResult registerPersonAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds, String personLocalId) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Registers a new person and assigns FIFA Unique Identifier. If duplicates are found the person is not registered. Uses 'PersonLocalType' as defined in FIFA Data Standard.- Parameters:
personData- - Object containing information about local and international names of the person, as well as the date of birth.timeoutMilliseconds- - Time to wait for duplicates details.personLocalId- - Local identifier of person- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
getDuplicatesAndWaitForDetailsInCaseOfDuplicates
@Deprecated public Collection<PersonDuplicateWithDetails> getDuplicatesAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Deprecated.Checks for duplicates of a person. If duplicates are found, the details are requested by Connect Service Bus.- Parameters:
personData- - Object containing information about local and international names of the person, as well as the date of birth.timeoutMilliseconds- - Time to wait for duplicates details.- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
getDuplicatesAndWaitForDetailsInCaseOfDuplicates
@Deprecated public Collection<PersonDuplicateWithDetails> getDuplicatesAndWaitForDetailsInCaseOfDuplicates(PersonData personData, long timeoutMilliseconds, List<String> organisationsIds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Deprecated.Checks for duplicates of a person. If duplicates are found, the details are requested by Connect Service Bus.- Parameters:
personData- - Object containing information about local and international names of the person, as well as the date of birth.timeoutMilliseconds- - Time to wait for duplicates details.organisationsIds- - organisations' FIFA Unique Identifiers- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
getDuplicates
public Collection<PersonDuplicateWithDetails> getDuplicates(PersonData personData, long timeoutMilliseconds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Checks for duplicates of a person. If duplicates are found, the details are requested by Connect Service Bus.- Parameters:
personData- - Object containing information about local and international names of the person, as well as the date of birth.timeoutMilliseconds- - Time to wait for duplicates details.- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
getDuplicates
public Collection<PersonDuplicateWithDetails> getDuplicates(PersonData personData, long timeoutMilliseconds, List<String> organisationsIds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Checks for duplicates of a person. If duplicates are found, the details are requested by Connect Service Bus.- Parameters:
personData- - Object containing information about local and international names of the person, as well as the date of birth.timeoutMilliseconds- - Time to wait for duplicates details.organisationsIds- - organisations' FIFA Unique Identifiers- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
getDuplicatesExceptTrustedKnownDuplicates
public DuplicatesOfRegisteredPerson getDuplicatesExceptTrustedKnownDuplicates(String personFifaId, List<String> trustedOrganisationsIds, long timeoutInMilliseconds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Checks for duplicates of a person. If duplicates are found, the details are requested by Connect Service Bus. Duplicates marked as known duplicate by trusted organisations would not be returned.- Parameters:
personFifaId- - Person FIFA Unique Identifier.trustedOrganisationsIds- - Trusted organisations' FIFA Unique IdentifierstimeoutInMilliseconds- - Time to wait for duplicates details.- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
forceUpdatePerson
public PersonType forceUpdatePerson(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth) throws com.fifa.connectservicebus.sdk.AuthenticationException, FifaConnectIdException, UnauthorizedException, ValidationException
Updates person data even if possible duplicates are found- Parameters:
personId- Fifa Identifier of personnames- Person names that need to be updated. Null if names are not changeddateOfBirth- Person date of birth that need to be updated. Null if birth date not changed- Throws:
InvalidClientDataExceptionFifaConnectIdExceptionFifaEntityNotFoundExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
forceUpdatePerson
public PersonType forceUpdatePerson(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth, String gender) throws com.fifa.connectservicebus.sdk.AuthenticationException, FifaConnectIdException, UnauthorizedException, ValidationException
Updates person data even if possible duplicates are found- Parameters:
personId- Fifa Identifier of personnames- Person names that need to be updated. Null if names are not changeddateOfBirth- Person date of birth that need to be updated. Null if birth date not changedgender- Sex of a person- Throws:
InvalidClientDataExceptionFifaConnectIdExceptionFifaEntityNotFoundExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
updatePersonAndWaitForDetailsInCaseOfDuplicates
public UpdateResult updatePersonAndWaitForDetailsInCaseOfDuplicates(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth, long timeoutMilliseconds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Updates a person If duplicates are found the person is not updated.- Parameters:
personId- Fifa Identifier of personnames- Person names that need to be updated. Null if names are not changeddateOfBirth- Person date of birth that need to be updated. Null if birth date not changedtimeoutMilliseconds- - Time to wait for duplicates details.- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
updatePersonAndWaitForDetailsInCaseOfDuplicates
public UpdateResult updatePersonAndWaitForDetailsInCaseOfDuplicates(String personId, List<PersonName> names, org.joda.time.LocalDate dateOfBirth, String gender, long timeoutMilliseconds) throws FifaConnectIdException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, ValidationException
Updates a person If duplicates are found the person is not updated.- Parameters:
personId- Fifa Identifier of personnames- Person names that need to be updated. Null if names are not changeddateOfBirth- Person date of birth that need to be updated. Null if birth date not changedtimeoutMilliseconds- - Time to wait for duplicates details.gender- Sex of a person- Throws:
FifaConnectIdExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionInvalidClientDataExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionValidationException
-
sendRequestForDetailsAndWaitForThem
public String sendRequestForDetailsAndWaitForThem(String uniqueFifaId, long timeoutMilliseconds) throws IOException, IllegalStateException, UnauthorizedException, com.fifa.connectservicebus.sdk.AuthenticationException, PlayerRegistrationLevelRestrictionException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, MemberAssociationDoesNotRespondException, PersonDetailsNotReceivedException, FifaConnectIdException, ValidationException
Sends request to given recipient for person details (with uniqueFifaId) and returns XML string. In case when no recipientId is given, it will be resolved based on person's registrations.- Parameters:
uniqueFifaId- Identifier of a person whose details will be returned.timeoutMilliseconds- Time to wait for person details.- Returns:
- String that contains XML complaint with FIFA Data Standard
- Throws:
InvalidClientDataExceptionFifaEntityNotFoundExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionUnauthorizedExceptionFifaPersonMergedExceptionIllegalStateExceptionPlayerRegistrationLevelRestrictionExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionMemberAssociationDoesNotRespondExceptionPersonDetailsNotReceivedExceptionFifaConnectIdExceptionValidationExceptionIOException
-
sendRequestForDetailsAndWaitForThem
public String sendRequestForDetailsAndWaitForThem(String uniqueFifaId, long timeoutMilliseconds, String recipientId) throws IOException, UnauthorizedException, com.fifa.connectservicebus.sdk.AuthenticationException, PlayerRegistrationLevelRestrictionException, com.fifa.connectservicebus.sdk.FifaConnectServiceBusException, MemberAssociationDoesNotRespondException, PersonDetailsNotReceivedException, FifaConnectIdException
- Throws:
IOExceptionUnauthorizedExceptioncom.fifa.connectservicebus.sdk.AuthenticationExceptionPlayerRegistrationLevelRestrictionExceptioncom.fifa.connectservicebus.sdk.FifaConnectServiceBusExceptionMemberAssociationDoesNotRespondExceptionPersonDetailsNotReceivedExceptionFifaConnectIdException
-
-