Package com.sun.identity.sm.jaxrpc
Class SMSJAXRPCObject
- java.lang.Object
-
- com.sun.identity.sm.SMSObject
-
- com.sun.identity.sm.jaxrpc.SMSJAXRPCObject
-
- All Implemented Interfaces:
SMSObjectListener
,EventListener
public class SMSJAXRPCObject extends SMSObject implements SMSObjectListener
-
-
Field Summary
Fields Modifier and Type Field Description static String
AMJAXRPCVERSION
JAXRPC Version String.static String
AMJAXRPCVERSIONSTR
JAXRPC Version String variable name.protected static boolean
isLocal
static String
NOTIFICATION_PROPERTY
-
Fields inherited from interface com.sun.identity.sm.SMSObjectListener
ADD, DELETE, MODIFY
-
-
Constructor Summary
Constructors Constructor Description SMSJAXRPCObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
allObjectsChanged()
This callback notifies the listener that all object should be marked as "changed" or "dirty".void
create(SSOToken token, String objName, Map attributes)
Creates an entry in the persistent store.void
delete(SSOToken token, String objName)
Delete the entry in the datastore.boolean
entryExists(SSOToken token, String dn)
Checks if the provided DN exists.String
getAMSdkBaseDN()
Returns the root suffix (i.e., base DN) for the UMS objects.String
getRootSuffix()
Returns the root suffix (i.e., base DN) for the SMS objects.String
getSessionRootSuffix()
Returns the session root suffix (i.e., base DN) for the SMS objects.void
modify(SSOToken token, String objName, ModificationItem[] mods)
Modifies the attributes to the object.void
objectChanged(String dn, int type)
This callback method is called by the EventService when the Directory Server triggers a PersistentSearch notificationMap<String,Set<String>>
read(SSOToken token, String objName)
Reads in the object from persistent store.void
registerCallbackHandler(SMSObjectListener changeListener)
Registration for event change notifications.Set<String>
schemaSubEntries(SSOToken token, String dn, String filter, String sidFilter, int numOfEntries, boolean sortResults, boolean ascendingOrder)
Returns the sub-entries.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 filterIterator<SMSDataEntry>
search(SSOToken token, String startDN, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder, Set excludes)
Searches the data store for objects that match the filterSet<String>
searchOrganizationNames(SSOToken token, String dn, int numOfEntries, boolean sortResults, boolean ascendingOrder, String serviceName, String attrName, Set values)
Returns the organization names.Set<String>
searchSubOrgNames(SSOToken token, String dn, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder, boolean recursive)
Returns the suborganization names.Set<String>
subEntries(SSOToken token, String dn, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder)
Returns the sub-entries.boolean
validateServiceAttributes(SSOToken token, String validatorClass, Set values)
Validates service configuration attributes.-
Methods inherited from class com.sun.identity.sm.SMSObject
cacheResults, debug, deregisterCallbackHandler, getAttributeNames, getNamingAttribute, getOrgNamingAttribute, getSearchFilter, getServiceIdSearchFilter, initialize, shutdown
-
-
-
-
Field Detail
-
AMJAXRPCVERSIONSTR
public static final String AMJAXRPCVERSIONSTR
JAXRPC Version String variable name.- See Also:
- Constant Field Values
-
AMJAXRPCVERSION
public static final String AMJAXRPCVERSION
JAXRPC Version String.- See Also:
- Constant Field Values
-
NOTIFICATION_PROPERTY
public static final String NOTIFICATION_PROPERTY
- See Also:
- Constant Field Values
-
isLocal
protected static boolean isLocal
-
-
Method Detail
-
read
public 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
- Specified by:
read
in classSMSObject
- Throws:
SMSException
SSOException
-
create
public 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- Specified by:
create
in classSMSObject
- Throws:
SMSException
SSOException
-
modify
public void modify(SSOToken token, String objName, ModificationItem[] mods) throws SMSException, SSOException
Modifies the attributes to the object.- Specified by:
modify
in classSMSObject
- Throws:
SMSException
SSOException
-
delete
public void delete(SSOToken token, String objName) throws SMSException, SSOException
Delete the entry in the datastore. This should delete sub-entries also- Specified by:
delete
in classSMSObject
- Throws:
SMSException
SSOException
-
searchSubOrgNames
public 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.- Specified by:
searchSubOrgNames
in classSMSObject
- Throws:
SMSException
SSOException
-
searchOrganizationNames
public 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.- Specified by:
searchOrganizationNames
in classSMSObject
- Throws:
SMSException
SSOException
-
subEntries
public 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.- Specified by:
subEntries
in classSMSObject
- Throws:
SMSException
SSOException
-
schemaSubEntries
public 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.- Specified by:
schemaSubEntries
in classSMSObject
- Throws:
SMSException
SSOException
-
search
public Iterator<SMSDataEntry> search(SSOToken token, String startDN, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder, Set excludes) throws SMSException, SSOException
Searches the data store for objects that match the filter- Specified by:
search
in classSMSObject
- Throws:
SMSException
SSOException
-
search
public 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- Specified by:
search
in classSMSObject
- Throws:
SMSException
SSOException
-
entryExists
public boolean entryExists(SSOToken token, String dn)
Checks if the provided DN exists. Used by PolicyManager.- Specified by:
entryExists
in classSMSObject
-
getRootSuffix
public String getRootSuffix()
Returns the root suffix (i.e., base DN) for the SMS objects. All SMSEntries will end with this root suffix.- Specified by:
getRootSuffix
in classSMSObject
-
getSessionRootSuffix
public String getSessionRootSuffix()
Returns the session root suffix (i.e., base DN) for the SMS objects. All SMSEntries will end with this root suffix.
-
getAMSdkBaseDN
public String getAMSdkBaseDN()
Returns the root suffix (i.e., base DN) for the UMS objects. All UMSEntries will end with this root suffix.- Specified by:
getAMSdkBaseDN
in classSMSObject
-
validateServiceAttributes
public boolean validateServiceAttributes(SSOToken token, String validatorClass, Set values) throws SMSException, SSOException
Validates service configuration attributes.- Parameters:
token
- Single Sign On token.validatorClass
- validator class name.values
- Values to be validated.- Returns:
true
of values are valid.- Throws:
SSOException
- if single sign on token is in valid.SMSException
- if value is invalid.
-
registerCallbackHandler
public void registerCallbackHandler(SMSObjectListener changeListener) throws SMSException
Registration for event change notifications. Only SMSNotificationManager would be calling this method to register itself- Overrides:
registerCallbackHandler
in classSMSObject
- Throws:
SMSException
-
objectChanged
public void objectChanged(String dn, int type)
Description copied from interface:SMSObjectListener
This callback method is called by the EventService when the Directory Server triggers a PersistentSearch notification- Specified by:
objectChanged
in interfaceSMSObjectListener
-
allObjectsChanged
public void allObjectsChanged()
Description copied from interface:SMSObjectListener
This callback notifies the listener that all object should be marked as "changed" or "dirty". This callback is only used in the case when Event Service looses the directory connection and does not know what could have changed in the directory.- Specified by:
allObjectsChanged
in interfaceSMSObjectListener
-
-