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 String
AMSR_ATTRS
static String
AMSR_CODE
static String
AMSR_RESULTS
protected static Debug
DEBUG
protected static String
SDK_SERVICE
-
Constructor Summary
Constructors Modifier Constructor Description protected
IdRemoteServicesImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap, String amOrgName, String amsdkDN)
boolean
authenticate(String orgName, Callback[] credentials)
Returnstrue
if the data store has successfully authenticated the identity with the provided credentials.boolean
authenticate(String orgName, Callback[] credentials, IdType idType)
Returnstrue
if the data store has successfully authenticated the identity with the specific type and provided credentials.void
changePassword(SSOToken token, IdType type, String name, String oldPassword, String newPassword, String amOrgName, String amsdkDN)
void
clearIdRepoPlugins()
void
clearIdRepoPlugins(String orgName, String serviceComponent, int type)
AMIdentity
create(SSOToken token, IdType type, String name, Map attrMap, String amOrgName)
void
delete(SSOToken token, IdType type, String name, String orgName, String amsdkDN)
Set
getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN)
Map
getAttributes(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN)
Map
getAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN, boolean isString)
Map
getBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)
Set
getFullyQualifiedNames(SSOToken token, IdType type, String name, String org)
protected static IdServices
getInstance()
Set
getMembers(SSOToken token, IdType type, String name, String amOrgName, IdType membersType, String amsdkDN)
Set
getMemberships(SSOToken token, IdType type, String name, IdType membershipType, String amOrgName, String amsdkDN)
Map
getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN)
Map
getServiceAttributesAscending(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.IdSearchResults
getSpecialIdentities(SSOToken token, IdType type, String orgName)
Set
getSupportedOperations(SSOToken token, IdType type, String amOrgName)
Set
getSupportedTypes(SSOToken token, String amOrgName)
boolean
isActive(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN)
boolean
isExists(SSOToken token, IdType type, String name, String amOrgName)
void
modifyMemberShip(SSOToken token, IdType type, String name, Set members, IdType membersType, int operation, String amOrgName)
void
modifyService(SSOToken token, IdType type, String name, String serviceName, SchemaType stype, Map attrMap, String amOrgName, String amsdkDN)
protected void
processException(Exception exception)
void
reinitialize()
void
reloadIdRepoServiceSchema()
void
removeAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN)
IdSearchResults
search(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).void
setActiveStatus(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN, boolean active)
void
setAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd, String amOrgName, String amsdkDN, boolean isString)
void
unassignService(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:
SSOException
IdRepoException
-
authenticate
public boolean authenticate(String orgName, Callback[] credentials)
Returnstrue
if 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 theIdRepoException
exception.- Specified by:
authenticate
in interfaceIdServices
- Parameters:
orgName
- realm name to which the identity would be authenticatedcredentials
- Array of callback objects containing information such as username and password.- Returns:
true
if data store authenticates the identity; elsefalse
-
authenticate
public boolean authenticate(String orgName, Callback[] credentials, IdType idType)
Description copied from interface:IdServices
Returnstrue
if 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 theIdRepoException
exception.- Specified by:
authenticate
in 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:
true
if 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:
create
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
delete
public void delete(SSOToken token, IdType type, String name, String orgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
delete
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getAttributes
public Map getAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN, boolean isString) throws IdRepoException, SSOException
- Specified by:
getAttributes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getAttributes
public Map getAttributes(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getAttributes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
removeAttributes
public void removeAttributes(SSOToken token, IdType type, String name, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
removeAttributes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
search
public IdSearchResults search(SSOToken token, IdType type, IdSearchControl ctrl, String amOrgName, CrestQuery crestQuery) throws IdRepoException, SSOException
Description copied from interface:IdServices
By passing in a CrestQuery object, we now support searching by id (via _queryId) or by filter (_queryFilter).- Specified by:
search
in 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:
setAttributes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
changePassword
public void changePassword(SSOToken token, IdType type, String name, String oldPassword, String newPassword, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
changePassword
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
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:
assignService
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getAssignedServices
public Set getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServiceNamesAndOCs, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getAssignedServices
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getServiceAttributes
public Map getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getServiceAttributes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getBinaryServiceAttributes
public Map getBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getBinaryServiceAttributes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
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:
getServiceAttributesAscending
in 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:
unassignService
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
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:
modifyService
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getMembers
public Set getMembers(SSOToken token, IdType type, String name, String amOrgName, IdType membersType, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getMembers
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getMemberships
public Set getMemberships(SSOToken token, IdType type, String name, IdType membershipType, String amOrgName, String amsdkDN) throws IdRepoException, SSOException
- Specified by:
getMemberships
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
modifyMemberShip
public void modifyMemberShip(SSOToken token, IdType type, String name, Set members, IdType membersType, int operation, String amOrgName) throws IdRepoException, SSOException
- Specified by:
modifyMemberShip
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getSupportedOperations
public Set getSupportedOperations(SSOToken token, IdType type, String amOrgName) throws IdRepoException, SSOException
- Specified by:
getSupportedOperations
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getSupportedTypes
public Set getSupportedTypes(SSOToken token, String amOrgName) throws IdRepoException, SSOException
- Specified by:
getSupportedTypes
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
isExists
public boolean isExists(SSOToken token, IdType type, String name, String amOrgName) throws SSOException, IdRepoException
- Specified by:
isExists
in interfaceIdServices
- Throws:
SSOException
IdRepoException
-
isActive
public boolean isActive(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN) throws SSOException, IdRepoException
- Specified by:
isActive
in interfaceIdServices
- Throws:
SSOException
IdRepoException
-
setActiveStatus
public void setActiveStatus(SSOToken token, IdType type, String name, String amOrgName, String amsdkDN, boolean active) throws SSOException, IdRepoException
- Specified by:
setActiveStatus
in interfaceIdServices
- Throws:
SSOException
IdRepoException
-
clearIdRepoPlugins
public void clearIdRepoPlugins(String orgName, String serviceComponent, int type)
- Specified by:
clearIdRepoPlugins
in interfaceIdServices
-
clearIdRepoPlugins
public void clearIdRepoPlugins()
- Specified by:
clearIdRepoPlugins
in interfaceIdServices
-
reloadIdRepoServiceSchema
public void reloadIdRepoServiceSchema()
- Specified by:
reloadIdRepoServiceSchema
in interfaceIdServices
-
reinitialize
public void reinitialize()
- Specified by:
reinitialize
in interfaceIdServices
-
getFullyQualifiedNames
public Set getFullyQualifiedNames(SSOToken token, IdType type, String name, String org) throws IdRepoException, SSOException
- Specified by:
getFullyQualifiedNames
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
getSpecialIdentities
public IdSearchResults getSpecialIdentities(SSOToken token, IdType type, String orgName) throws IdRepoException, SSOException
- Specified by:
getSpecialIdentities
in interfaceIdServices
- Throws:
IdRepoException
SSOException
-
-