Interface LegacyIdentityServiceStore
public interface LegacyIdentityServiceStore
This allows reading and writing service config which is related to a specific identity.
Long term, usages of this should be replaced with methods like
AnnotatedServiceRegistry.getIdentitySingleton(Class, org.forgerock.am.config.ConfigIdentity)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assignService
(Identity identity, String serviceName, org.forgerock.openam.sm.ConfigurationAttributes attributes) Assigns the service and service related attributes to the identity.getAssignableServices
(Identity identity) Returns all services which can be assigned to this entity.getAssignedServices
(Identity identity) Returns the set of services already assigned to this identity.getServiceAttributes
(Identity identity, String serviceName) Returns attributes related to a service, if the service is assigned to the identity.getServiceAttributesAscending
(Identity identity, String serviceName) Returns attributes related to a service, if the service is assigned to the identity.void
modifyService
(Identity identity, String serviceName, org.forgerock.openam.sm.ConfigurationAttributes attrMap) Set attributes related to a specific service.void
removeServiceAttributes
(Identity identity, String serviceName, Set<String> attrNames) Removes attributes value related to a specific service by setting it to empty.void
unassignService
(Identity identity, String serviceName) Removes a service from the identity.
-
Method Details
-
getAssignedServices
Returns the set of services already assigned to this identity.This method is only valid for Identity object of type User.
- Returns:
- Set of serviceNames
- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
getAssignableServices
Returns all services which can be assigned to this entity.This method is only valid for Identity object of type User.
- Returns:
- Set of service names
- Throws:
IdRepoException
- if there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
assignService
void assignService(Identity identity, String serviceName, org.forgerock.openam.sm.ConfigurationAttributes attributes) throws IdRepoException, SSOException Assigns the service and service related attributes to the identity.This method is only valid for Identity object of type User.
- Parameters:
identity
- The identity to perform the update on.serviceName
- Name of service to be assignedattributes
- Map of attribute-values- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
unassignService
Removes a service from the identity.This method is only valid for Identity object of type User.
- Parameters:
identity
- The identity to perform the update on.serviceName
- Name of service to be removed- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
getServiceAttributes
Map<String,Set<String>> getServiceAttributes(Identity identity, String serviceName) throws IdRepoException, SSOException Returns attributes related to a service, if the service is assigned to the identity.This method is only valid for Identity object of type User.
- Parameters:
serviceName
- Name of the service- Returns:
- Map of attribute-values
- Throws:
IdRepoException
- if there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
getServiceAttributesAscending
Map<String,Set<String>> getServiceAttributesAscending(Identity identity, String serviceName) throws IdRepoException, SSOException Returns attributes related to a service, if the service is assigned to the identity.This method is only valid for Identity object of type User.
- Parameters:
serviceName
- Name of the service- Returns:
- Map of attribute-values
- Throws:
IdRepoException
- if there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
modifyService
void modifyService(Identity identity, String serviceName, org.forgerock.openam.sm.ConfigurationAttributes attrMap) throws IdRepoException, SSOException Set attributes related to a specific service. The assumption is that the service is already assigned to the identity. The attributes for the service are validated against the service schema.This method is only valid for Identity object of type User.
- Parameters:
identity
- The identity to perform the update on.serviceName
- Name of the serviceattrMap
- Map of attribute-values- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-
removeServiceAttributes
void removeServiceAttributes(Identity identity, String serviceName, Set<String> attrNames) throws IdRepoException, SSOException Removes attributes value related to a specific service by setting it to empty. The assumption is that the service is already assigned to the identity. The attributes for the service are validated against the service schema.This method is only valid for
UniversalId
object of type User.- Parameters:
identity
- The identity to perform the update on.serviceName
- Name of the serviceattrNames
- Set of attributes name- Throws:
IdRepoException
- If there are repository related error conditionsSSOException
- If user's single sign on token is invalid
-