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.propertiesby setting the propertycom.sun.identity.sm.sms_object_class_nameto the fully qualified class name (i.e., including the package name) without the.classextension. 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 booleancacheResults()abstract voidcreate(SSOToken token, String objName, Map attributes)Creates an entry in the persistent store.Debugdebug()abstract voiddelete(SSOToken token, String objName)Delete the entry in the datastore.voidderegisterCallbackHandler(String listenerID)De-Registration of Notification Callbacksabstract booleanentryExists(SSOToken token, String objName)Checks if the provided DN exists.abstract StringgetAMSdkBaseDN()Returns the AMSDK BaseDN for the UM objects.String[]getAttributeNames()Returns all the SMS attribute namesStringgetNamingAttribute()Returns the naming attributeStringgetOrgNamingAttribute()Returns the organization naming attributeabstract StringgetRootSuffix()Returns the root suffix (i.e., base DN) for the SMS objects.StringgetSearchFilter()Returns search (LDAP) filter to search for SMS objectsStringgetServiceIdSearchFilter()Returns search (LDAP) filter to search for SMS objectsvoidinitialize(Map initParams)Initialization parameters that are configured via system properties or can be dynamically set during run-time.abstract voidmodify(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.voidregisterCallbackHandler(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.voidshutdown()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:
SMSExceptionSSOException
-
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:
SMSExceptionSSOException
-
modify
public abstract void modify(SSOToken token, String objName, ModificationItem[] mods) throws SMSException, SSOException
Modifies the attributes to the object.- Throws:
SMSExceptionSSOException
-
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:
SMSExceptionSSOException
-
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 paramternumOfEntriesidentifies the number of entries to return, if0returns all the entries.- Throws:
SMSExceptionSSOException
-
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 paramternumOfEntriesidentifies the number of entries to return, if0returns all the entries.- Throws:
SMSExceptionSSOException
-
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 paramternumOfEntriesidentifies the number of entries to return, if0returns all the entries.- Throws:
SMSExceptionSSOException
-
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 paramternumOfEntriesidentifies the number of entries to return, if0returns all the entries.- Throws:
SMSExceptionSSOException
-
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:
SMSExceptionSSOException
-
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:
SMSExceptionSSOException
-
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()
-
-