|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.identity.idm.IdRepo
public abstract class IdRepo
This interface defines the methods which need to be implemented by plugins.
Two plugins are supported, ldap
and remote
.
Field Summary | |
---|---|
static int |
ADDMEMBER
The constants used to define membership operations. |
static int |
AND_MOD
|
Map |
configMap
|
static int |
NO_MOD
|
static int |
OR_MOD
|
static int |
REMOVEMEMBER
|
Constructor Summary | |
---|---|
IdRepo()
|
Method Summary | |
---|---|
abstract int |
addListener(SSOToken token,
IdRepoListener listener)
Adds a listener for changes in the repository |
abstract void |
assignService(SSOToken token,
IdType type,
String name,
String serviceName,
com.sun.identity.sm.SchemaType stype,
Map attrMap)
This method is used to assign a service to the given identity. |
boolean |
authenticate(Callback[] credentials)
Returns true if the data store successfully authenticates
the identity with the provided credentials. |
void |
changePassword(SSOToken token,
IdType type,
String name,
String attrName,
String oldPassword,
String newPassword)
Changes password of identity. |
abstract String |
create(SSOToken token,
IdType type,
String name,
Map attrMap)
Creates an identity. |
abstract void |
delete(SSOToken token,
IdType type,
String name)
Deletes an identity. |
abstract Set |
getAssignedServices(SSOToken token,
IdType type,
String name,
Map mapOfServicesAndOCs)
Returns the set of services assigned to this identity. |
abstract Map |
getAttributes(SSOToken token,
IdType type,
String name)
Returns all attributes and values of name object |
abstract Map |
getAttributes(SSOToken token,
IdType type,
String name,
Set attrNames)
Returns requested attributes and values of name object. |
abstract Map |
getBinaryAttributes(SSOToken token,
IdType type,
String name,
Set attrNames)
Returns requested binary attributes as an array of bytes. |
abstract Map |
getBinaryServiceAttributes(SSOToken token,
IdType type,
String name,
String serviceName,
Set attrNames)
Returns the requested binary attribute values of the service attributes as an array of bytes. |
Map |
getConfiguration()
Return the configuration map |
String |
getFullyQualifiedName(SSOToken token,
IdType type,
String name)
Returns the fully qualified name for the identity. |
abstract Set |
getMembers(SSOToken token,
IdType type,
String name,
IdType membersType)
Returns members of an identity. |
abstract Set |
getMemberships(SSOToken token,
IdType type,
String name,
IdType membershipType)
Returns the memberships of an identity. |
abstract Map |
getServiceAttributes(SSOToken token,
IdType type,
String name,
String serviceName,
Set attrNames)
Returns the attribute values of the service attributes. |
Set |
getSupportedOperations(IdType type)
Return supported operations for a given IdType |
Set |
getSupportedTypes()
|
void |
initialize(Map configParams)
Initialization paramters as configred for a given plugin. |
boolean |
isActive(SSOToken token,
IdType type,
String name)
Returns true if the name object is active. |
abstract boolean |
isExists(SSOToken token,
IdType type,
String name)
Returns true if the name object exists in the data store. |
abstract void |
modifyMemberShip(SSOToken token,
IdType type,
String name,
Set members,
IdType membersType,
int operation)
Modify membership of the identity. |
abstract void |
modifyService(SSOToken token,
IdType type,
String name,
String serviceName,
com.sun.identity.sm.SchemaType sType,
Map attrMap)
Modifies the attribute values of the service attributes. |
abstract void |
removeAttributes(SSOToken token,
IdType type,
String name,
Set attrNames)
Removes the attributes from the identity. |
abstract void |
removeListener()
Removes the listener added using addListener method. |
abstract RepoSearchResults |
search(SSOToken token,
IdType type,
String pattern,
int maxTime,
int maxResults,
Set returnAttrs,
boolean returnAllAttrs,
int filterOp,
Map avPairs,
boolean recursive)
Search for specific type of identities. |
abstract void |
setActiveStatus(SSOToken token,
IdType type,
String name,
boolean active)
Sets the object's status to active . |
abstract void |
setAttributes(SSOToken token,
IdType type,
String name,
Map attributes,
boolean isAdd)
Set the values of attributes of the identity. |
abstract void |
setBinaryAttributes(SSOToken token,
IdType type,
String name,
Map attributes,
boolean isAdd)
Set the values of binary attributes the identity. |
void |
shutdown()
This method is invoked just before the plugin is removed from the IdRepo cache of plugins. |
boolean |
supportsAuthentication()
Returns true if the data store supports authentication of
identities. |
abstract void |
unassignService(SSOToken token,
IdType type,
String name,
String serviceName,
Map attrMap)
If the service is already assigned to the identity then this method unassigns the service and removes the related attributes from the entry. |
Field Detail |
---|
public static final int ADDMEMBER
public static final int REMOVEMEMBER
public Map configMap
public static final int NO_MOD
public static final int OR_MOD
public static final int AND_MOD
Constructor Detail |
---|
public IdRepo()
Method Detail |
---|
public void initialize(Map configParams)
configParams
- public void shutdown()
public Set getSupportedOperations(IdType type)
type
- Identity type
public Set getSupportedTypes()
public abstract boolean isExists(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
name
object exists in the data store.
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.
true
if name object is in data store
else false
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public boolean isActive(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
name
object is active.
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.
true
if name object is in active
else false
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void setActiveStatus(SSOToken token, IdType type, String name, boolean active) throws IdRepoException, SSOException
active
.
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.active
- true if setting to active; false otherwise.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Map getAttributes(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Map getAttributes(SSOToken token, IdType type, String name, Set attrNames) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to be read
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Map getBinaryAttributes(SSOToken token, IdType type, String name, Set attrNames) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to be read
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract String create(SSOToken token, IdType type, String name, Map attrMap) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrMap
- Map of attribute-values assoicated with this object.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void delete(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void setAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attributes
- Map of attribute-values to set or add.isAdd
- if true
add the attribute-values; otherwise
replaces the attribute-values.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void setBinaryAttributes(SSOToken token, IdType type, String name, Map attributes, boolean isAdd) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attributes
- Map of binary attribute-values to set or add.isAdd
- if true
add the attribute-values; otherwise
replaces the attribute-values.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public void changePassword(SSOToken token, IdType type, String name, String attrName, String oldPassword, String newPassword) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- identity type of this object.name
- name of the object of interest.attrName
- password attribute nameoldPassword
- old passwordnewPassword
- new password
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void removeAttributes(SSOToken token, IdType type, String name, Set attrNames) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.attrNames
- Set of attribute names to remove.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract RepoSearchResults search(SSOToken token, IdType type, String pattern, int maxTime, int maxResults, Set returnAttrs, boolean returnAllAttrs, int filterOp, Map avPairs, boolean recursive) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.pattern
- pattern to search for.maxTime
- maximum wait time for search.maxResults
- maximum records to return.returnAttrs
- Set of attribute names to return.returnAllAttrs
- return all attributesfilterOp
- filter condition.avPairs
- additional search conditions.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void modifyMemberShip(SSOToken token, IdType type, String name, Set members, IdType membersType, int operation) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.members
- Set of names to be added as members of namemembersType
- IdType of members.operation
- operations to perform on members ADDMEMBER or REMOVEMEMBER.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Set getMembers(SSOToken token, IdType type, String name, IdType membersType) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.membersType
- IdType of members of name object.
name
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Set getMemberships(SSOToken token, IdType type, String name, IdType membershipType) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.membershipType
- IdType of memberships to return.
name
is a member of.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void assignService(SSOToken token, IdType type, String name, String serviceName, com.sun.identity.sm.SchemaType stype, Map attrMap) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- service to assignstype
- attrMap
- Map of attribute-values.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Set getAssignedServices(SSOToken token, IdType type, String name, Map mapOfServicesAndOCs) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.mapOfServicesAndOCs
-
name
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void unassignService(SSOToken token, IdType type, String name, String serviceName, Map attrMap) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Service name to remove.attrMap
- Map of attribute-values to remove
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Map getServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrNames
- Set of attribute names.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract Map getBinaryServiceAttributes(SSOToken token, IdType type, String name, String serviceName, Set attrNames) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.attrNames
- Set of attribute names.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void modifyService(SSOToken token, IdType type, String name, String serviceName, com.sun.identity.sm.SchemaType sType, Map attrMap) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.type
- Identity type of this object.name
- Name of the object of interest.serviceName
- Name of service.sType
- attrMap
- map of attribute-values.
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract int addListener(SSOToken token, IdRepoListener listener) throws IdRepoException, SSOException
token
- Single sign on token of identity performing the task.listener
-
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public abstract void removeListener()
addListener
method. This
is called by the IdRepo framework when the plugin is being shutdown due
to configuration change, so that a new instance can be created with the
new configuration map.
public Map getConfiguration()
public String getFullyQualifiedName(SSOToken token, IdType type, String name) throws IdRepoException, SSOException
token
- administrator SSOToken that can be used by the datastore to
determine the fully qualified nametype
- type of the identityname
- name of the identity
IdRepoException
- If there are repository related error conditions.
SSOException
- If identity's single sign on token is invalid.public boolean supportsAuthentication()
true
if the data store supports authentication of
identities. Used by IdRepo framework to authenticate identities.
true
if data store supports authentication of of
identities; else false
public boolean authenticate(Callback[] credentials) throws IdRepoException
true
if the data store successfully authenticates
the identity with the provided credentials. In case the data store
requires additional credentials, the list would be returned via the
IdRepoException
exception.
credentials
- Array of callback objects containing information such as
username and password.
true
if data store authenticates the identity;
else false
IdRepoException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |