Package com.sun.identity.sm
Class SMSObject
- java.lang.Object
-
- com.sun.identity.sm.SMSObject
-
- Direct Known Subclasses:
SMSJAXRPCObject
,SMSObjectDB
public abstract class SMSObject extends Object
Abstract class that needs to be implemented to store configuration data in a data store. An implementation of this can be configured viaAMConfig.properties
by setting the propertycom.sun.identity.sm.sms_object_class_name
to the fully qualified class name (i.e., including the package name) without the.class
extension. Only one instance of this class will be instantiated within a single JVM, hence the function must be reentrant. The implementation of this class must provide an empty constructor that will be used to create an instance of this class.
-
-
Constructor Summary
Constructors Constructor Description SMSObject()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
cacheResults()
abstract void
create(SSOToken token, String objName, Map attributes)
Creates an entry in the persistent store.Debug
debug()
abstract void
delete(SSOToken token, String objName)
Delete the entry in the datastore.void
deregisterCallbackHandler(String listenerID)
De-Registration of Notification Callbacksabstract boolean
entryExists(SSOToken token, String objName)
Checks if the provided DN exists.abstract String
getAMSdkBaseDN()
Returns the AMSDK BaseDN for the UM objects.String[]
getAttributeNames()
Returns all the SMS attribute namesString
getNamingAttribute()
Returns the naming attributeString
getOrgNamingAttribute()
Returns the organization naming attributeabstract String
getRootSuffix()
Returns the root suffix (i.e., base DN) for the SMS objects.String
getSearchFilter()
Returns search (LDAP) filter to search for SMS objectsString
getServiceIdSearchFilter()
Returns search (LDAP) filter to search for SMS objectsvoid
initialize(Map initParams)
Initialization parameters that are configured via system properties or can be dynamically set during run-time.abstract void
modify(SSOToken token, String objName, ModificationItem[] mods)
Modifies the attributes to the object.abstract Map<String,Set<String>>
read(SSOToken token, String objName)
Reads in the object from persistent store.void
registerCallbackHandler(SMSObjectListener changeListener)
Registration of Notification Callbacksabstract Set<String>
schemaSubEntries(SSOToken token, String dn, String filter, String sidFilter, int numOfEntries, boolean sortResults, boolean ascendingOrder)
Returns the sub-entries.abstract Set<String>
search(SSOToken token, String startDN, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder)
Searchs the data store for objects that match the filterabstract Iterator<SMSDataEntry>
search(SSOToken token, String startDN, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder, Set<String> excludes)
Searchs the data store for objects that match the filterabstract Set<String>
searchOrganizationNames(SSOToken token, String dn, int numOfEntries, boolean sortResults, boolean ascendingOrder, String serviceName, String attrName, Set values)
Returns the organization names.abstract Set<String>
searchSubOrgNames(SSOToken token, String dn, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder, boolean recursive)
Returns the suborganization names.void
shutdown()
abstract Set<String>
subEntries(SSOToken token, String dn, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder)
Returns the sub-entries.
-
-
-
Method Detail
-
initialize
public void initialize(Map initParams) throws SMSException
Initialization parameters that are configured via system properties or can be dynamically set during run-time.- Throws:
SMSException
-
read
public abstract Map<String,Set<String>> read(SSOToken token, String objName) throws SMSException, SSOException
Reads in the object from persistent store. It assumes the object name and the ssoToken are valid. If the entry does not exist the method should returnnull
- Throws:
SMSException
SSOException
-
create
public abstract void create(SSOToken token, String objName, Map attributes) throws SMSException, SSOException
Creates an entry in the persistent store. Throws an exception if the entry already exists- Throws:
SMSException
SSOException
-
modify
public abstract void modify(SSOToken token, String objName, ModificationItem[] mods) throws SMSException, SSOException
Modifies the attributes to the object.- Throws:
SMSException
SSOException
-
delete
public abstract void delete(SSOToken token, String objName) throws SMSException, SSOException
Delete the entry in the datastore. This should delete sub-entries also- Throws:
SMSException
SSOException
-
searchSubOrgNames
public abstract Set<String> searchSubOrgNames(SSOToken token, String dn, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder, boolean recursive) throws SMSException, SSOException
Returns the suborganization names. Returns a set of SMSEntry objects that are suborganization names. The paramternumOfEntries
identifies the number of entries to return, if0
returns all the entries.- Throws:
SMSException
SSOException
-
searchOrganizationNames
public abstract Set<String> searchOrganizationNames(SSOToken token, String dn, int numOfEntries, boolean sortResults, boolean ascendingOrder, String serviceName, String attrName, Set values) throws SMSException, SSOException
Returns the organization names. Returns a set of SMSEntry objects that are organization names. The paramternumOfEntries
identifies the number of entries to return, if0
returns all the entries.- Throws:
SMSException
SSOException
-
subEntries
public abstract Set<String> subEntries(SSOToken token, String dn, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws SMSException, SSOException
Returns the sub-entries. Returns a set of SMSEntry objects that are sub-entries. The paramternumOfEntries
identifies the number of entries to return, if0
returns all the entries.- Throws:
SMSException
SSOException
-
schemaSubEntries
public abstract Set<String> schemaSubEntries(SSOToken token, String dn, String filter, String sidFilter, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws SMSException, SSOException
Returns the sub-entries. Returns a set of SMSEntry objects that are sub-entries. The paramternumOfEntries
identifies the number of entries to return, if0
returns all the entries.- Throws:
SMSException
SSOException
-
search
public abstract Set<String> search(SSOToken token, String startDN, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder) throws SMSException, SSOException
Searchs the data store for objects that match the filter- Throws:
SMSException
SSOException
-
search
public abstract Iterator<SMSDataEntry> search(SSOToken token, String startDN, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder, Set<String> excludes) throws SMSException, SSOException
Searchs the data store for objects that match the filter- Throws:
SMSException
SSOException
-
entryExists
public abstract boolean entryExists(SSOToken token, String objName)
Checks if the provided DN exists. Used by PolicyManager.
-
registerCallbackHandler
public void registerCallbackHandler(SMSObjectListener changeListener) throws SMSException
Registration of Notification Callbacks- Throws:
SMSException
-
deregisterCallbackHandler
public void deregisterCallbackHandler(String listenerID)
De-Registration of Notification Callbacks
-
getRootSuffix
public abstract String getRootSuffix()
Returns the root suffix (i.e., base DN) for the SMS objects. All SMSEntries will end with this root suffix.
-
getAMSdkBaseDN
public abstract String getAMSdkBaseDN()
Returns the AMSDK BaseDN for the UM objects.
-
getNamingAttribute
public String getNamingAttribute()
Returns the naming attribute
-
getOrgNamingAttribute
public String getOrgNamingAttribute()
Returns the organization naming attribute
-
getAttributeNames
public String[] getAttributeNames()
Returns all the SMS attribute names
-
getSearchFilter
public String getSearchFilter()
Returns search (LDAP) filter to search for SMS objects
-
getServiceIdSearchFilter
public String getServiceIdSearchFilter()
Returns search (LDAP) filter to search for SMS objects
-
debug
public Debug debug()
-
cacheResults
public boolean cacheResults()
-
shutdown
public void shutdown()
-
-