public abstract class SMSFlatFileObjectBase extends SMSObjectDB
Modifier and Type | Field and Description |
---|---|
protected Debug |
mDebug |
protected boolean |
mInitialized |
protected String |
mRootDir |
protected File |
mRootDirHandle |
protected String |
mRootDN |
protected ReaderWriterLock |
mRWLock |
Modifier | Constructor and Description |
---|---|
protected |
SMSFlatFileObjectBase()
Constructor for SMSFlatFileObject.
|
Modifier and Type | Method and Description |
---|---|
protected String |
decodeVal(String v)
Decodes a value, %2C to comma and %25 to percent.
|
void |
deregisterCallbackHandler(String id)
De-Register a listener.
|
protected String |
encodeVal(String v)
Encodes special characters in a value.
|
protected abstract Set<String> |
getSubEntries(String objName,
String filter,
String sidFilter,
boolean isSubConfig,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Real routine to get sub entries, used by subEntries() and
schemaSubEntries().
|
protected void |
initialize()
Initializes the SMSFlatFileObject:
Gets the flat file directory and default organization DN from
AMConfig.properties, creates the root directory if it does not exist.
|
protected Properties |
loadProperties(File filehandle,
String objName)
Loads properties from the attribute file handle.
|
protected void |
modifyValues(String objName,
ModificationItem modItem,
Properties props) |
String |
registerCallbackHandler(SSOToken token,
SMSObjectListener changeListener)
Register a listener.
|
protected void |
saveProperties(Properties props,
File filehandle,
String header)
Saves properties to the attributes file handle, with given objName
in the file header.
|
Set<String> |
schemaSubEntries(SSOToken token,
String objName,
String filter,
String sidFilter,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a Set of sub entry names that match the given filter and
the given sun service id filter.
|
Set<String> |
search(SSOToken token,
String objName,
String filter,
int numOfEntries,
int timeLimit,
boolean sortResults,
boolean ascendingOrder)
Search for a config object with the given filter.
|
Iterator<SMSDataEntry> |
search(SSOToken token,
String objName,
String filter,
int numOfEntries,
int timeLimit,
boolean sortResults,
boolean ascendingOrder,
Set excludes)
Search for a config object with the given filter.
|
Set<String> |
searchOrganizationNames(SSOToken token,
String objName,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder,
String serviceName,
String attrName,
Set values)
Returns the organization names.
|
Set<String> |
searchSubOrgNames(SSOToken token,
String objName,
String filter,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder,
boolean recursive)
Returns the suborganization names.
|
Set<String> |
subEntries(SSOToken token,
String objName,
String filter,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a Set of sub-entry names that match the given filter.
|
protected Set |
toValSet(String attrName,
String vals)
Converts a string of values from the attributes properties file
to a Set, decoding special characters in each value.
|
protected String |
toValString(Enumeration en)
Converts an enumeration of values for an attribute into a string,
encoding special characters in the values as necessary.
|
protected String |
toValString(Set vals)
Converts a Set of values for an attribute into a string,
encoding special characters in the values as necessary.
|
getAMSdkBaseDN, getRootSuffix
cacheResults, create, debug, delete, entryExists, getAttributeNames, getNamingAttribute, getOrgNamingAttribute, getSearchFilter, getServiceIdSearchFilter, initialize, modify, read, registerCallbackHandler, shutdown
protected String mRootDir
protected File mRootDirHandle
protected String mRootDN
protected boolean mInitialized
protected Debug mDebug
protected ReaderWriterLock mRWLock
protected SMSFlatFileObjectBase() throws SMSException
SMSException
protected Properties loadProperties(File filehandle, String objName) throws SMSException
ServiceNotFoundException
- if the attributes file is not found.SMSException
- if an IO error occurred while reading the
attributes properties file.SchemaException
- if a format error occurred while reading the
attributes properties file.protected void saveProperties(Properties props, File filehandle, String header) throws SMSException
SMSException
protected String toValString(Set vals)
protected void modifyValues(String objName, ModificationItem modItem, Properties props)
protected String toValString(Enumeration en)
protected String encodeVal(String v)
protected Set toValSet(String attrName, String vals)
protected void initialize() throws SMSException
SMSException
public Set<String> subEntries(SSOToken token, String objName, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws SMSException, SSOException
subEntries
in class SMSObject
token
- Ignored argument. Access check is assumed to have
occurred before reaching this method.objName
- Name of the configuration object to get sub entries for.
Name is expected to be a dn.filter
- Filter of sub entry names to get. Only the wildcard
character '*' is currently supported.numOfEntries
- Number of entries to return, or 0 to return all
entries.sortResults
- Whether to sort results. If true will return
a Set that will return entries in a sorted order.ascendingOrder
- Whether the sorted results should be in
alphabetically ascending or decending order. This argument is ignored
if sortResults is false.IllegalArgumentException
- if objName or filter is null or empty,
or if numOfEntries is less than 0.SchemaException
- if a sub directory name is not in the expected
"ou=..." format.SMSException
SSOException
public Set<String> schemaSubEntries(SSOToken token, String objName, String filter, String sidFilter, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws SMSException, SSOException
schemaSubEntries
in class SMSObject
token
- Ignored argument. Access check is assumed to have
occurred before reaching this method.objName
- Name of the configuration object to get sub entries for.
Name is expected to be a dn.filter
- Filter of sub entry names to get. Only the wildcard
character '*' is currently supported.sidFilter
- Filter of Sun Service ID for the sub entries.numOfEntries
- Number of entries to return, or 0 to return all
entries.sortResults
- Whether to sort results. If true will return
a Set that will return entries in a sorted order.ascendingOrder
- Whether the sorted results should be in
alphabetically ascending or decending order. This argument is ignored
if sortResults is false.IllegalArgumentException
- if objName or filter is null or empty,
or if numOfEntries is less than 0.SchemaException
- if a sub directory name is not in the expected
"ou=..." format.SMSException
SSOException
public Iterator<SMSDataEntry> search(SSOToken token, String objName, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder, Set excludes) throws SSOException, SMSException
search
in class SMSObject
token
- Ignored argument. Access check is assumed to have
occurred before reaching this method.objName
- Name of the configuration object to begin search. Name is
expected to be a dn.filter
- Filter of service name and version. Expected to be in
SMSEntry.FILTER_PATTERN_SERVICE format.numOfEntries
- number of max entries, 0 means unlimitedtimeLimit
- maximum number of seconds for the search to spend, 0
means unlimitedsortResults
- true
to have result sorted.ascendingOrder
- true
to have result sorted in
ascending order.excludes
- Set of DNs to excluded.IllegalArgumentException
- if objName or filter is null or empty,
or if filter is not in the expected format.SSOException
SMSException
public Set<String> search(SSOToken token, String objName, String filter, int numOfEntries, int timeLimit, boolean sortResults, boolean ascendingOrder) throws SSOException, SMSException
search
in class SMSObject
token
- Ignored argument. Access check is assumed to have
occurred before reaching this method.objName
- Name of the configuration object to begin search. Name is
expected to be a dn.filter
- Filter of service name and version. Expected to be in
SMSEntry.FILTER_PATTERN_SERVICE format.numOfEntries
- number of max entries, 0 means unlimitedtimeLimit
- maximum number of seconds for the search to spend, 0
means unlimitedsortResults
- true
to have result sorted.ascendingOrder
- true
to have result sorted in
ascending order.IllegalArgumentException
- if objName or filter is null or empty,
or if filter is not in the expected format.SSOException
SMSException
public Set<String> searchSubOrgNames(SSOToken token, String objName, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder, boolean recursive) throws SMSException, SSOException
numOfEntries
identifies the number of entries to return, if 0
returns all the entries.searchSubOrgNames
in class SMSObject
SMSException
SSOException
public Set<String> searchOrganizationNames(SSOToken token, String objName, int numOfEntries, boolean sortResults, boolean ascendingOrder, String serviceName, String attrName, Set values) throws SMSException, SSOException
numOfEntries
identifies the number of entries to return, if 0
returns all the entries.searchOrganizationNames
in class SMSObject
SMSException
SSOException
public String registerCallbackHandler(SSOToken token, SMSObjectListener changeListener) throws SMSException, SSOException
SMSException
SSOException
public void deregisterCallbackHandler(String id)
deregisterCallbackHandler
in class SMSObject
protected abstract Set<String> getSubEntries(String objName, String filter, String sidFilter, boolean isSubConfig, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws SMSException
ServiceNotFoundException
- if the configuration object is
not found.SchemaException
- if a sub directory name is not in the
expected "ou=..." format.SMSException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.