Package com.sun.identity.sm
Class CachedSubEntries
- java.lang.Object
-
- com.sun.identity.sm.CachedSubEntries
-
- All Implemented Interfaces:
SMSEventListener
public class CachedSubEntries extends Object implements SMSEventListener
-
-
Field Summary
Fields Modifier and Type Field Description protected CachedSMSEntrycachedEntryprotected static Map<String,CachedSubEntries>smsEntriesprotected Map<String,Set>ssoTokenToSubEntries
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(String entry)protected booleancontains(SSOToken t, String entry)protected voidfinalize()static CachedSubEntriesgetInstance(SSOToken token, String dn)static CachedSubEntriesgetInstanceIfCached(SSOToken token, String dn, boolean cached)SetgetSchemaSubEntries(SSOToken token, String pattern, String serviceidPattern)Returns sub-entries that belong to given SubSchema name and statisfies the pattern.protected SMSEntrygetSMSEntry()protected SetgetSubEntries(SSOToken t)Returns one-level sub-entries for the given DN.Set<String>getSubEntries(SSOToken token, String pattern)Return sub-entries that match the pattern.protected booleanisEmpty(SSOToken t)voidnotifySMSEvent(org.forgerock.opendj.ldap.DN dn, int event)Called when an SMS event occurs to the requested object.protected voidremove(String entry)SetsearchOrgNames(SSOToken token, String serviceName, String attrName, Set values)Returns realm names that match the attribute-values pair for the given service name.SetsearchSubOrgNames(SSOToken token, String pattern, boolean recursive)Returns realm names that matches the given pattern.protected voidupdate()
-
-
-
Field Detail
-
smsEntries
protected static Map<String,CachedSubEntries> smsEntries
-
cachedEntry
protected CachedSMSEntry cachedEntry
-
-
Method Detail
-
getSubEntries
protected Set getSubEntries(SSOToken t) throws SMSException, SSOException
Returns one-level sub-entries for the given DN. Results are cached.- Parameters:
t- SSOToken to used for searching- Returns:
- sub entries for the given DN
- Throws:
SMSExceptionSSOException
-
getSubEntries
public Set<String> getSubEntries(SSOToken token, String pattern) throws SMSException, SSOException
Return sub-entries that match the pattern. Performs data store operation, the results are not cached- Parameters:
token-pattern-- Returns:
- subentries that match the pattern
- Throws:
SMSExceptionSSOException
-
getSchemaSubEntries
public Set getSchemaSubEntries(SSOToken token, String pattern, String serviceidPattern) throws SMSException, SSOException
Returns sub-entries that belong to given SubSchema name and statisfies the pattern. The results are not cached.- Parameters:
token-pattern-serviceidPattern- sub-schema name- Returns:
- subentries that belong to given SubSchema name and satisfies the pattern
- Throws:
SMSExceptionSSOException
-
add
protected void add(String entry)
-
remove
protected void remove(String entry)
-
isEmpty
protected boolean isEmpty(SSOToken t) throws SMSException, SSOException
- Throws:
SMSExceptionSSOException
-
contains
protected boolean contains(SSOToken t, String entry) throws SMSException, SSOException
- Throws:
SMSExceptionSSOException
-
getSMSEntry
protected SMSEntry getSMSEntry()
-
update
protected void update()
-
finalize
protected void finalize() throws Throwable
-
searchSubOrgNames
public Set searchSubOrgNames(SSOToken token, String pattern, boolean recursive) throws SMSException, SSOException
Returns realm names that matches the given pattern. Ifrecursiveis set totrue, a sub-tree search is performed. The results are not cached.- Parameters:
token-pattern-recursive-- Returns:
- realm names that matches the given pattern
- Throws:
SMSExceptionSSOException
-
searchOrgNames
public Set searchOrgNames(SSOToken token, String serviceName, String attrName, Set values) throws SMSException, SSOException
Returns realm names that match the attribute-values pair for the given service name. The attribute-values pairs is based on organization attribute schema. A sub-tree search is performed. The results are not cached.- Parameters:
token-serviceName-attrName-values-- Returns:
- realm names that match the attributevalues pair for the given service name
- Throws:
SMSExceptionSSOException
-
getInstanceIfCached
public static CachedSubEntries getInstanceIfCached(SSOToken token, String dn, boolean cached) throws SMSException
- Throws:
SMSException
-
getInstance
public static CachedSubEntries getInstance(SSOToken token, String dn) throws SMSException
- Throws:
SMSException
-
notifySMSEvent
public void notifySMSEvent(org.forgerock.opendj.ldap.DN dn, int event)Description copied from interface:SMSEventListenerCalled when an SMS event occurs to the requested object.- Specified by:
notifySMSEventin interfaceSMSEventListener- Parameters:
dn- The DN of the object that the event has occurred for.event- The event that has occurred.
-
-