Package com.sun.identity.idm.remote
Class IdRemoteServicesImpl
- java.lang.Object
-
- com.sun.identity.idm.remote.IdRemoteServicesImpl
-
- All Implemented Interfaces:
IdServices
- Direct Known Subclasses:
IdRemoteCachedServicesImpl
public class IdRemoteServicesImpl extends Object implements IdServices
-
-
Field Summary
Fields Modifier and Type Field Description static StringAMSR_ATTRSstatic StringAMSR_CODEstatic StringAMSR_RESULTSprotected static DebugDEBUGprotected static StringSDK_SERVICE
-
Constructor Summary
Constructors Modifier Constructor Description protectedIdRemoteServicesImpl()
-
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 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)AMIdentitycreate(SSOToken token, IdType type, String name, Map attrMap, String amOrgName)voiddelete(SSOToken token, IdType type, String name, String orgName, String amsdkDN)SetgetAssignedServices(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 org)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)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)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)protected voidprocessException(Exception exception)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
-
SDK_SERVICE
protected static final String SDK_SERVICE
- See Also:
- Constant Field Values
-
DEBUG
protected static final Debug DEBUG
-
AMSR_RESULTS
public static final String AMSR_RESULTS
- See Also:
- Constant Field Values
-
AMSR_CODE
public static final String AMSR_CODE
- See Also:
- Constant Field Values
-
AMSR_ATTRS
public static final String AMSR_ATTRS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
protected static IdServices getInstance()
-
processException
protected void processException(Exception exception) throws SSOException, IdRepoException
- Throws:
SSOExceptionIdRepoException
-
authenticate
public boolean authenticate(String orgName, Callback[] credentials)
Returnstrueif the data store has successfully authenticated the identity with the 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
-
authenticate
public boolean authenticate(String orgName, Callback[] credentials, IdType idType)
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
-
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
-
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.
-
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
-
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
-
getAssignedServices
public Set getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getAssignedServicesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
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
-
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.
-
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
-
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
-
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
-
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
-
getSupportedOperations
public Set getSupportedOperations(SSOToken token, IdType type, String amOrgName) throws IdRepoException, SSOException
- Specified by:
getSupportedOperationsin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getSupportedTypes
public Set getSupportedTypes(SSOToken token, String amOrgName) throws IdRepoException, SSOException
- Specified by:
getSupportedTypesin 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
-
clearIdRepoPlugins
public void clearIdRepoPlugins(String orgName, String serviceComponent, int type)
- Specified by:
clearIdRepoPluginsin interfaceIdServices
-
clearIdRepoPlugins
public void clearIdRepoPlugins()
- Specified by:
clearIdRepoPluginsin interfaceIdServices
-
reloadIdRepoServiceSchema
public void reloadIdRepoServiceSchema()
- Specified by:
reloadIdRepoServiceSchemain interfaceIdServices
-
reinitialize
public void reinitialize()
- Specified by:
reinitializein interfaceIdServices
-
getFullyQualifiedNames
public Set getFullyQualifiedNames(SSOToken token, IdType type, String name, String org) throws IdRepoException, SSOException
- Specified by:
getFullyQualifiedNamesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
getSpecialIdentities
public IdSearchResults getSpecialIdentities(SSOToken token, IdType type, String orgName) throws IdRepoException, SSOException
- Specified by:
getSpecialIdentitiesin interfaceIdServices- Throws:
IdRepoExceptionSSOException
-
-