Package com.sun.identity.idm.server
Class IdServicesImpl
- java.lang.Object
-
- com.sun.identity.idm.server.IdServicesImpl
-
- All Implemented Interfaces:
IdServices
- Direct Known Subclasses:
IdCachedServicesImpl
public class IdServicesImpl extends Object implements IdServices
-
-
Field Summary
Fields Modifier and Type Field Description protected static DebugDEBUGprotected IdSearchResultsemptyUserIdentitiesprotected static booleanshutdownCalledprotected IdSearchResultsspecialIdentitiesprotected SetspecialIdentityNames
-
Constructor Summary
Constructors Modifier Constructor Description protectedIdServicesImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap, String amOrgName, String amsdkDN)booleanauthenticate(String orgName, Callback[] credentials)Returnstrueif the data store has successfully authenticated the identity with the specific type and provided credentials.booleanauthenticate(String orgName, Callback[] credentials, IdType idType)Returnstrueif the data store has successfully authenticated the identity with the specific type and provided credentials.voidchangePassword(SSOToken token, IdType type, String name, String oldPassword, String newPassword, String amOrgName, String amsdkDN)voidclearIdRepoPlugins()voidclearIdRepoPlugins(String orgName, String serviceComponent, int type)protected voidclearSpecialIdentityCache()AMIdentitycreate(SSOToken token, IdType type, String name, Map attrMap, String amOrgName)voiddelete(SSOToken token, IdType type, String name, String orgName, String amsdkDN)Set<String>getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN)MapgetAttributes(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN)MapgetAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN, boolean isString)MapgetBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)SetgetFullyQualifiedNames(SSOToken token, IdType type, String name, String orgName)Returns the set of fully qualified names for the identity.protected static IdServicesgetInstance()SetgetMembers(SSOToken token, IdType type, String name, String amOrgName, IdType membersType, String amsdkDN)SetgetMemberships(SSOToken token, IdType type, String name, IdType membershipType, String amOrgName, String amsdkDN)MapgetServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)MapgetServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN, boolean isString)MapgetServiceAttributesAscending(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)Non-javadoc, non-public methods Get the service attributes of the name identity.IdSearchResultsgetSpecialIdentities(SSOToken token, IdType type, String orgName)SetgetSupportedOperations(SSOToken token, IdType type, String amOrgName)SetgetSupportedTypes(SSOToken token, String amOrgName)booleanisActive(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN)booleanisExists(SSOToken token, IdType type, String name, String amOrgName)static booleanisShutdownCalled()protected booleanisSpecialIdentity(SSOToken token, String name, IdType type, String orgName)voidmodifyMemberShip(SSOToken token, IdType type, String name, Set members, IdType membersType, int operation, String amOrgName)voidmodifyService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap, String amOrgName, String amsdkDN)voidreinitialize()voidreloadIdRepoServiceSchema()voidremoveAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN)IdSearchResultssearch(SSOToken token, IdType type, IdSearchControl ctrl, String amOrgName, CrestQuery crestQuery)By passing in a CrestQuery object, we now support searching by id (via _queryId) or by filter (_queryFilter).voidsetActiveStatus(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN, boolean active)voidsetAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString)voidunassignService(SSOToken token, IdType type, String name, String serviceName, Map attrMap, String amOrgName, String amsdkDN)
-
-
-
Field Detail
-
DEBUG
protected static final Debug DEBUG
-
specialIdentityNames
protected Set specialIdentityNames
-
specialIdentities
protected IdSearchResults specialIdentities
-
emptyUserIdentities
protected IdSearchResults emptyUserIdentities
-
shutdownCalled
protected static volatile boolean shutdownCalled
-
-
Method Detail
-
getInstance
protected static IdServices getInstance()
-
reinitialize
public void reinitialize()
- Specified by:
reinitializein interfaceIdServices
-
isShutdownCalled
public static boolean isShutdownCalled()
-
getFullyQualifiedNames
public Set getFullyQualifiedNames(SSOToken token, IdType type, String name, String orgName) throws IdRepoException, SSOException
Returns the set of fully qualified names for the identity. The fully qualified names would be unique for a given datastore.- Specified by:
getFullyQualifiedNamesin interfaceIdServices- Parameters:
token- SSOToken that can be used by the datastore to determine the fully qualified nametype- type of the identityname- name of the identity- Returns:
- fully qualified names for the identity
- Throws:
IdRepoException- If there are repository related error conditionsSSOException- If identity's single sign on token is invalid
-
authenticate
public boolean authenticate(String orgName, Callback[] credentials) throws IdRepoException, AuthLoginException
Description copied from interface:IdServicesReturnstrueif the data store has successfully authenticated the identity with the specific type and provided credentials. In case the data store requires additional credentials, the list would be returned via theIdRepoExceptionexception.- Specified by:
authenticatein interfaceIdServices- Parameters:
orgName- realm name to which the identity would be authenticatedcredentials- Array of callback objects containing information such as username and password.- Returns:
trueif data store authenticates the identity; elsefalse- Throws:
IdRepoExceptionAuthLoginException
-
authenticate
public boolean authenticate(String orgName, Callback[] credentials, IdType idType) throws IdRepoException, AuthLoginException
Description copied from interface:IdServicesReturnstrueif the data store has successfully authenticated the identity with the specific type and provided credentials. In case the data store requires additional credentials, the list would be returned via theIdRepoExceptionexception.- Specified by:
authenticatein interfaceIdServices- Parameters:
orgName- realm name to which the identity would be authenticatedcredentials- Array of callback objects containing information such as username and password.idType- The type of identity, or null for any.- Returns:
trueif data store authenticates the identity; elsefalse- Throws:
IdRepoExceptionAuthLoginException
-
create
public AMIdentity create(SSOToken token, IdType type, String name, Map attrMap, String amOrgName) throws IdRepoException, SSOException
- Specified by:
createin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
delete
public void delete(SSOToken token, IdType type, String name, String orgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
deletein interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getAttributes
public Map getAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN, boolean isString) throws IdRepoException, SSOException
- Specified by:
getAttributesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getAttributes
public Map getAttributes(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getAttributesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getMembers
public Set getMembers(SSOToken token, IdType type, String name, String amOrgName, IdType membersType, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getMembersin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getMemberships
public Set getMemberships(SSOToken token, IdType type, String name, IdType membershipType, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getMembershipsin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
isExists
public boolean isExists(SSOToken token, IdType type, String name, String amOrgName) throws SSOException, IdRepoException
- Specified by:
isExistsin interfaceIdServices- Throws:
SSOExceptionIdRepoException
-
isActive
public boolean isActive(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN) throws SSOException, IdRepoException
- Specified by:
isActivein interfaceIdServices- Throws:
SSOExceptionIdRepoException
-
setActiveStatus
public void setActiveStatus(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN, boolean active) throws SSOException, IdRepoException
- Specified by:
setActiveStatusin interfaceIdServices- Throws:
SSOExceptionIdRepoException
-
modifyMemberShip
public void modifyMemberShip(SSOToken token, IdType type, String name, Set members, IdType membersType, int operation, String amOrgName) throws IdRepoException, SSOException
- Specified by:
modifyMemberShipin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
removeAttributes
public void removeAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
removeAttributesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
search
public IdSearchResults search(SSOToken token, IdType type, IdSearchControl ctrl, String amOrgName, CrestQuery crestQuery) throws IdRepoException, SSOException
Description copied from interface:IdServicesBy passing in a CrestQuery object, we now support searching by id (via _queryId) or by filter (_queryFilter).- Specified by:
searchin interfaceIdServices- Parameters:
token- is the sso token of the person performing this operation.type- is the identity type of the name parameter.ctrl- the search controlamOrgName- is the orgname.crestQuery- encapsulates _queryId or _queryFilter from the CREST endpoint.- Throws:
IdRepoException- if there are repository related error conditions.SSOException- if user's single sign on token is invalid.
-
getSpecialIdentities
public IdSearchResults getSpecialIdentities(SSOToken token, IdType type, String orgName) throws IdRepoException, SSOException
- Specified by:
getSpecialIdentitiesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
isSpecialIdentity
protected boolean isSpecialIdentity(SSOToken token, String name, IdType type, String orgName) throws IdRepoException, SSOException
- Throws:
IdRepoExceptionSSOException
-
setAttributes
public void setAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString) throws IdRepoException, SSOException
- Specified by:
setAttributesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
changePassword
public void changePassword(SSOToken token, IdType type, String name, String oldPassword, String newPassword, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
changePasswordin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getAssignedServices
public Set<String> getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getAssignedServicesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
assignService
public void assignService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
assignServicein interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
unassignService
public void unassignService(SSOToken token, IdType type, String name, String serviceName, Map attrMap, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
unassignServicein interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getServiceAttributesAscending
public Map getServiceAttributesAscending(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
Non-javadoc, non-public methods Get the service attributes of the name identity. Traverse to the global configuration if necessary until all attributes are found or reached the global area whichever occurs first.- Specified by:
getServiceAttributesAscendingin interfaceIdServices- Parameters:
token- is the sso token of the person performing this operation.type- is the identity type of the name parameter.name- is the identity we are interested in.serviceName- is the service we are interested inattrNames- are the name of the attributes wer are interested in.amOrgName- is the orgname.amsdkDN- is the amsdkDN.- Throws:
IdRepoException- if there are repository related error conditions.SSOException- if user's single sign on token is invalid.
-
getServiceAttributes
public Map getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getServiceAttributesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getBinaryServiceAttributes
public Map getBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getBinaryServiceAttributesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getServiceAttributes
public Map getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN, boolean isString) throws IdRepoException, SSOException
- Throws:
IdRepoExceptionSSOException
-
modifyService
public void modifyService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
modifyServicein interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getSupportedTypes
public Set getSupportedTypes(SSOToken token, String amOrgName) throws IdRepoException, SSOException
- Specified by:
getSupportedTypesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getSupportedOperations
public Set getSupportedOperations(SSOToken token, IdType type, String amOrgName) throws IdRepoException, SSOException
- Specified by:
getSupportedOperationsin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
clearSpecialIdentityCache
protected void clearSpecialIdentityCache()
-
clearIdRepoPlugins
public void clearIdRepoPlugins()
- Specified by:
clearIdRepoPluginsin interfaceIdServices
-
clearIdRepoPlugins
public void clearIdRepoPlugins(String orgName, String serviceComponent, int type)
- Specified by:
clearIdRepoPluginsin interfaceIdServices
-
reloadIdRepoServiceSchema
public void reloadIdRepoServiceSchema()
- Specified by:
reloadIdRepoServiceSchemain interfaceIdServices
-
-