JBoss.orgCommunity Documentation

IdentityManager

Method Param Return Description
registerIdentityProviders(IdentityProviderPlugin plugin) plugin void Register one or more IdentityProvider through an IdentityProviderPlugin.
getIdentity(String id) id can be a social GlobalId or a raw identity such as in Identity.getId() Identity - null if nothing is found, or the Identity object Get the identity by ID and loads his profile.
getIdentity(String id, boolean loadProfile) id can be a social GlobalId or a raw identity such as in Identity.getId(), loadProfile - the value is true if the profile is loaded and false if not loaded null if nothing is found, or the Identity object Get the identity by loading id of the profile optionally.
deleteIdentity(Identity identity) identiy voidDelete an identity.
addIdentityProvider(IdentityProvider<?> idProvider) idProvider - the id of provider void Add the identity provider.
getOrCreateIdentity(String providerId, String remoteId) providerId - the id of provider, remoteId - the remote id Identity Get the identity by remoteId. If the provider can not find any identity by remoteId, the return value is null. If no identity found by identity provider and that identity is still stored on JCR, the stored identity will be deleted and the return value is null.
getOrCreateIdentity(String providerId, String remoteId, boolean loadProfile) providerId - referring to the name of the Identity provider, remoteId - the identifier that identify the identity in the specific identity provider, loadProfile - true when the profile is loaded null if nothing is found, or the Identity object improves the performance by specifying what needs to be loaded This function returns an Identity object that is specific to a special type. For example, if the type is Linked'In, the identifier will be the URL of profile or if it is a CS contact manager, it will be the UID of the contact. A new identity is created if it does not exist.
getIdentitiesByProfileFilter(String providerId, ProfileFilter profileFilter) throws Exception providerId - the id of provider, profileFilter - the filter of provider Identity Get the identities by a profile filter.
getIdentitiesByProfileFilter(String providerId, ProfileFilter profileFilter, long offset, long limit) throws Exception providerId, profileFilter, offset, limit List<Identity> Get the identities by a profile filter.
getIdentitiesByProfileFilter(ProfileFilter profileFilter) throws Exception profileFilter - the profile filter List<Identity> Get the identities by a profile filter.
getIdentitiesByProfileFilter(ProfileFilter profileFilter, long offset, long limit) throws Exception providerId, profileFilter, offset, limit List<Identity> Get the identities by a profile filter.
getIdentitiesFilterByAlphaBet(String providerId, ProfileFilter profileFilter) throws Exception providerId - the id of provider, profileFilter - the profile filter List<Identity> Get the identities filter by alphabet.
getIdentitiesFilterByAlphaBet(String providerId, ProfileFilter profileFilter, long offset,long limit) throws Exception providerId, profileFilter, offset, limit List<Identity> Get the identities filter by alphabet with offset and limit.
getIdentitiesFilterByAlphaBet(ProfileFilter profileFilter) throws Exception profileFilter - the profile filter List<Identity> Get the identities filter by alphabet.
getIdentity(String providerId, String remoteId, boolean loadProfile) providerId, remoteId, loadProfile Identity Get the identity.
getIdentitiesCount(String providerId) providerId long Get the number of identities.
identityExisted(String providerId, String remoteId) providerId, remoteId boolean Check if the identity is already existed or not.
saveIdentity(Identity identity) identity - the identity void Save the identity.
saveProfile(Profile profile) profile void Save a profile.
addOrModifyProfileProperties(Profile profile) throws Exception profile void Add or modify properties of profile. Profile parameter is a lightweight that contains only the property that you want to add or modify. NOTE: The method will not delete the properties of an old profile when the param profile does not have those keys.
updateAvatar(Profile p) profile void Update the avatar.
updateBasicInfo(Profile p) throws Exception profile void Update the basic information.
updateContactSection(Profile p) throws Exception profile void Update the contact section of the profile.
updateExperienceSection(Profile p)throws Exception profile void Update the experience section of the profile.
updateHeaderSection(Profile p) throws Exception profile void Update the header section of the profile.
getIdentities(String providerId) throws Exception providerId - the id of provider List<Identity> Get the identities by the provider id.
getIdentities(String providerId, boolean loadProfile) providerId - the id of provider, loadProfile - the loaded profile. List<Identity> Get the identities by the provider id. If loadProvider is true, loading the profile will be performed.
getConnections(Identity ownerIdentity) throws Exception ownerIdentity List<Identity> Get connections of an identity. (Since 1.1.1).
getIdentityStorage() N/A IdentityStorage Get the identity storage.
getStorage() N/A IdentityStorage Get the storage. Deprecated: should use method getIdentityStorage().
registerProfileListener(ProfileListener listener) listener void Register the profile listener.
unregisterProfileListener(ProfileListener listener) listener void Unregister the profile listener.
addProfileListener(ProfileListenerPlugin plugin) plugin void Register a profile listener component plug-in.