wt.federation
Class FederatedDirectoryService

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.fc.Item
          extended bywt.federation.FederatedDirectoryService
All Implemented Interfaces:
AccessControlled, DisplayIdentification, DomainAdministered, Externalizable, FederatedService, NetFactor, ObjectMappable, Persistable, RemoteAccess, Serializable

public class FederatedDirectoryService
extends Item
implements RemoteAccess, FederatedService, Externalizable

This class implements a Federated interface to directory services such as LDAP-accessible directory services.

Use the newFederatedDirectoryService static factory method(s), not the FederatedDirectoryService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Nested Class Summary
(package private) static class FederatedDirectoryService.ContextCloser
           
(package private) static class FederatedDirectoryService.ContextKey
           
 
Field Summary
private  Hashtable actionTable
           
private static String AUTH_PROPERTY_PREFIX
           
private  String baseOfSearch
           
private static String CLASSNAME
           
private static int defaultEntryCacheSize
           
private static long defaultEntryCacheTTL
           
private static String defaultInitialContextFactory
           
private static String defaultLDAPVersion
           
private static long defaultProxyExpirationInterval
           
private static long defaultProxyRefreshInterval
           
private static int defaultSearchResultsCacheSize
           
private static long defaultSearchResultsCacheTTL
           
private static String defaultSecurityAuthentication
           
static String DIRECTORY_ACCESS_CREDENTIALS
          Label for the attribute.
static String DIRECTORY_ACCESS_DN
          Label for the attribute.
private static int DIRECTORY_ACCESS_DN_UPPER_LIMIT
           
private  Object directoryAccessCredentials
           
private  String directoryAccessDN
           
private  DirContext directoryContext
           
static String ENTRY_CACHE_SIZE
          Label for the attribute.
static String ENTRY_CACHE_TTL
          Label for the attribute.
private static Hashtable entryCache
           
private  int entryCacheSize
           
private  long entryCacheTTL
           
static long EXTERNALIZATION_VERSION_UID
           
private static String FC_RESOURCE
           
private static Properties federationProperties
           
static String INITIAL_CONTEXT_FACTORY
          Label for the attribute.
private static int INITIAL_CONTEXT_FACTORY_UPPER_LIMIT
           
private  String initialContextFactory
           
private  Hashtable navigationSupported
           
protected static long OLD_FORMAT_VERSION_UID
           
private  long proxyExpirationInterval
           
private  long proxyRefreshInterval
           
private  Hashtable queriesSupported
           
private  DirectoryQuerySpecTranslator querySpecTranslator
           
private static String RESOURCE
           
static String SEARCH_BASE
          Label for the attribute.
private static int SEARCH_BASE_UPPER_LIMIT
           
static String SEARCH_RESULTS_CACHE_SIZE
          Label for the attribute.
static String SEARCH_RESULTS_CACHE_TTL
          Label for the attribute.
static String SEARCH_SCOPE
          Label for the attribute.
private static int SEARCH_SCOPE_UPPER_LIMIT
           
private  String searchBase
           
private static Hashtable searchResultsCache
           
private  int searchResultsCacheSize
           
private  long searchResultsCacheTTL
           
private  String searchScope
           
(package private) static long serialVersionUID
           
(package private) static boolean SERVER
           
private  String serviceName
           
private  String serviceURL
           
private  boolean tightlyCoupled
           
static String TRANSLATION_TABLE_NAME
          Label for the attribute.
private static int TRANSLATION_TABLE_NAME_UPPER_LIMIT
           
private  DirectoryTranslationTable translationTable
           
private  String translationTableName
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.fc.Item
VERSION_40_UID, VERSION_51_UID
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Fields inherited from interface wt.federation.FederatedService
ACTION_TABLE, FIND_ASSOCIATIONS_BY_CRITERIA, FIND_ASSOCIATIONS_BY_LINK_CLASS, FIND_OBJECTS, PROXY_EXPIRATION_INTERVAL, PROXY_REFRESH_INTERVAL, RETRIEVE_CONTENTLIST, RETRIEVE_MASTER, RETRIEVE_OBJECT, SERVICE_NAME, SERVICE_URL, TIGHTLY_COUPLED
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
FederatedDirectoryService()
           
 
Method Summary
protected  QueryResult _findDirectoryObjects(String url)
          Search the directory service for entries matching the criteria specified in the given LDAP url, and return a QueryResult containing objects corresponding to the matching entries.
protected  QueryResult _findDirectoryObjects(String filterName, Hashtable filterArguments)
          Search the directory service for entries matching the specified filter, and return a QueryResult containing objects corresponding to the matching entries.
protected  void _refreshDirectoryObject(Federated proxy)
          Refreshes the derived properties of a specified proxy object.
protected  Hashtable _retrieveDirectoryAttributes(String distinguishedName)
          Return a Hashtable containing all of the directory attributes read from the specified directory entry.
protected  Object _retrieveDirectoryObject(String distinguishedName)
          Returns a Federated instance of the directory object identified by the specified distinguished name.
private  BinaryLink createLinkObject(Class linkClass, Persistable obj1, String obj1Role, Persistable obj2)
          Create a link object that associates two Persistables.
 Object createObject(Class objectClass, String sourceObjectId, Hashtable attributes)
          Create a new object in a remote information service.
 void deleteObject(String sourceObjectId)
          Delete the specified object managed by this federated service.
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 QueryResult findDirectoryObjects(String url)
          Search the directory service for entries matching the criteria specified in the given LDAP url, and return a QueryResult containing objects corresponding to the matching entries.
 QueryResult findDirectoryObjects(String filterName, Hashtable filterArguments)
          Search the directory service for entries matching the specified filter, and return a QueryResult containing objects corresponding to the matching entries.
 QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2)
          Return all link objects in this service that exist between two specified source objects.
 QueryResult findObjects(QuerySpec criteria)
          Retrieve objects from this federated service using the specified selection criteria.
 Hashtable getActionTable()
          Gets the value of the attribute: ACTION_TABLE.
 String getActionURL(String actionName, Hashtable arguments)
          Returns the URL associated with the specified action and set of named arguments.
 String getActionURL(String actionName, String sourceObjectId)
          Returns the URL associated with the specified action and source object identifier.
 String getActionURLTemplate(String actionName)
          Returns the URL template associated with the specified action.
 String getConceptualClassname()
          Deprecated.  
 Object getDirectoryAccessCredentials()
          Gets the value of the attribute: DIRECTORY_ACCESS_CREDENTIALS.
 String getDirectoryAccessDN()
          Gets the value of the attribute: DIRECTORY_ACCESS_DN.
 int getEntryCacheSize()
          Gets the value of the attribute: ENTRY_CACHE_SIZE.
 long getEntryCacheTTL()
          Gets the value of the attribute: ENTRY_CACHE_TTL.
 String getInitialContextFactory()
          Gets the value of the attribute: INITIAL_CONTEXT_FACTORY.
protected  DirContext getInitialDirContext(String providerURL)
           
 long getProxyExpirationInterval()
          Gets the value of the attribute: PROXY_EXPIRATION_INTERVAL.
 long getProxyRefreshInterval()
          Gets the value of the attribute: PROXY_REFRESH_INTERVAL.
 String getSearchBase()
          Gets the value of the attribute: SEARCH_BASE.
 int getSearchResultsCacheSize()
          Gets the value of the attribute: SEARCH_RESULTS_CACHE_SIZE.
 long getSearchResultsCacheTTL()
          Gets the value of the attribute: SEARCH_RESULTS_CACHE_TTL.
 String getSearchScope()
          Gets the value of the attribute: SEARCH_SCOPE.
 String getServiceName()
          Gets the value of the attribute: SERVICE_NAME.
 String getServiceURL()
          Gets the value of the attribute: SERVICE_URL.
 Enumeration getSupportedLinkClasses()
          Return the enumeration of link class names for which this service supports navigation.
 Enumeration getSupportedObjectClasses()
          Return the enumeration of class names for which this service supports queries.
 DirectoryTranslationTable getTranslationTable()
          Return an instance of the attribute translation table referenced by this directory service.
 String getTranslationTableName()
          Gets the value of the attribute: TRANSLATION_TABLE_NAME.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
protected  void initialize()
          Supports initialization, following construction of an instance.
protected  void initialize(String serviceName)
          Supports initialization, following construction of an instance.
protected  void initialize(String serviceName, String serviceURL, String searchBase, String translationTableName)
          Supports initialization, following construction of an instance.
protected  void initialize(String serviceName, String serviceURL, String searchBase, String translationTableName, String initialContextFactory)
          Supports initialization, following construction of an instance.
 boolean isNavigationSupported(Class linkClass)
          Return true if the named class is defined in the table of supported link classes for this federated service.
 boolean isQuerySupported(Class objectClass)
          Return true if the named class is defined in the table of supported object classes for this federated service.
 boolean isTightlyCoupled()
          Gets the value of the attribute: TIGHTLY_COUPLED.
 QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide)
          Return objects from this federated service related to the specified source object given a role and link class.
 QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide)
          Return objects from this federated service related to the specified source object given a role and link selection crtieria.
static FederatedDirectoryService newFederatedDirectoryService()
          Constructor returning an instance initialized with default property values.
static FederatedDirectoryService newFederatedDirectoryService(String serviceName)
          Constructor returning an instance initialized with a specified service name, default initial context factory, and no directory attribute translation table.
static FederatedDirectoryService newFederatedDirectoryService(String serviceName, String serviceURL, String searchBase, String translationTableName)
          Constructor returning an instance initialized with a specified service name, base service URL, directory search base, and translation table name.
static FederatedDirectoryService newFederatedDirectoryService(String serviceName, String serviceURL, String searchBase, String translationTableName, String initialContextFactory)
          Constructor returning an instance initialized with a specified service name, base service URL, directory search base, translation table name, and initial directory context factory value.
 void purgeCaches()
          Purge any caches that might be kept by the service.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(FederatedDirectoryService thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void refreshDirectoryObject(Federated proxy)
          Refreshes the derived properties of a specified proxy object.
 void refreshObject(Federated proxy)
          Refresh the properties of a proxy object that are derived from a remote object.
 Hashtable retrieveAttributes(String sourceObjectId)
          

Supported API: true
 Hashtable retrieveDirectoryAttributes(String distinguishedName)
          Return a Hashtable containing all of the directory attributes read from the specified directory entry.
 Object retrieveDirectoryObject(String distinguishedName)
          Returns a Federated instance of the directory object identified by the specified distinguished name.
 Object retrieveObject(String sourceObjectId)
          Returns a Federated instance of the remote object identified by the specified source object identifier.
private  void searchBaseValidate(String a_SearchBase)
           
 Enumeration searchDirectory(String url)
          Search the directory service for entries matching the filter defined by the specified URL.
private  void searchScopeValidate(String a_SearchScope)
           
private  void serviceURLValidate(String a_ServiceURL)
           
 void setActionTable(Hashtable a_ActionTable)
          Sets the value of the attribute: ACTION_TABLE.
 void setActionURLTemplate(String actionName, String actionURLTemplate)
          Associates the specified URL template with the specified action.
private  void setCredentials(Hashtable context, String providerURL)
          Set authentication information in a specified directory context.
 void setDirectoryAccessCredentials(Object a_DirectoryAccessCredentials)
          Sets the value of the attribute: DIRECTORY_ACCESS_CREDENTIALS.
 void setDirectoryAccessDN(String a_DirectoryAccessDN)
          Sets the value of the attribute: DIRECTORY_ACCESS_DN.
 void setEntryCacheSize(int a_EntryCacheSize)
          Sets the value of the attribute: ENTRY_CACHE_SIZE.
 void setEntryCacheTTL(long a_EntryCacheTTL)
          Sets the value of the attribute: ENTRY_CACHE_TTL.
 void setInitialContextFactory(String a_InitialContextFactory)
          Sets the value of the attribute: INITIAL_CONTEXT_FACTORY.
 void setProxyExpirationInterval(long a_ProxyExpirationInterval)
          Sets the value of the attribute: PROXY_EXPIRATION_INTERVAL.
 void setProxyRefreshInterval(long a_ProxyRefreshInterval)
          Sets the value of the attribute: PROXY_REFRESH_INTERVAL.
 void setSearchBase(String a_SearchBase)
          Sets the value of the attribute: SEARCH_BASE.
 void setSearchResultsCacheSize(int a_SearchResultsCacheSize)
          Sets the value of the attribute: SEARCH_RESULTS_CACHE_SIZE.
 void setSearchResultsCacheTTL(long a_SearchResultsCacheTTL)
          Sets the value of the attribute: SEARCH_RESULTS_CACHE_TTL.
 void setSearchScope(String a_SearchScope)
          Sets the value of the attribute: SEARCH_SCOPE.
 void setServiceName(String a_ServiceName)
          Sets the value of the attribute: SERVICE_NAME.
 void setServiceURL(String a_ServiceURL)
          Sets the value of the attribute: SERVICE_URL.
 void setTightlyCoupled(boolean a_TightlyCoupled)
          Sets the value of the attribute: TIGHTLY_COUPLED.
 void setTranslationTableName(String a_TranslationTableName)
          Sets the value of the attribute: TRANSLATION_TABLE_NAME.
private  String substituteTableValues(String s, Hashtable table)
          Substitute values from an attribute translation table into a specified string.
private  void translationTableNameValidate(String a_TranslationTableName)
           
private  void updateEntryCache(String url, Hashtable entry)
          Add an entry to the directory entry cache.
 void updateObject(String sourceObjectId, Hashtable updateAttributes, Vector deleteAttributes)
          Update the attributes of a specified remote object.
private  void updateSearchResultsCache(String url, Vector searchResults)
          Add an entry to the cache of directory search results.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.fc.Item
getDomainRef, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

TRANSLATION_TABLE_NAME

public static final String TRANSLATION_TABLE_NAME
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

TRANSLATION_TABLE_NAME_UPPER_LIMIT

private static int TRANSLATION_TABLE_NAME_UPPER_LIMIT

translationTableName

private String translationTableName

INITIAL_CONTEXT_FACTORY

public static final String INITIAL_CONTEXT_FACTORY
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

INITIAL_CONTEXT_FACTORY_UPPER_LIMIT

private static int INITIAL_CONTEXT_FACTORY_UPPER_LIMIT

initialContextFactory

private String initialContextFactory

SEARCH_BASE

public static final String SEARCH_BASE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

SEARCH_BASE_UPPER_LIMIT

private static int SEARCH_BASE_UPPER_LIMIT

searchBase

private String searchBase

SEARCH_SCOPE

public static final String SEARCH_SCOPE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

SEARCH_SCOPE_UPPER_LIMIT

private static int SEARCH_SCOPE_UPPER_LIMIT

searchScope

private String searchScope

DIRECTORY_ACCESS_DN

public static final String DIRECTORY_ACCESS_DN
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

DIRECTORY_ACCESS_DN_UPPER_LIMIT

private static int DIRECTORY_ACCESS_DN_UPPER_LIMIT

directoryAccessDN

private String directoryAccessDN

DIRECTORY_ACCESS_CREDENTIALS

public static final String DIRECTORY_ACCESS_CREDENTIALS
Label for the attribute.

Supported API: true

See Also:
Constant Field Values

directoryAccessCredentials

private Object directoryAccessCredentials

ENTRY_CACHE_TTL

public static final String ENTRY_CACHE_TTL
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

entryCacheTTL

private long entryCacheTTL

ENTRY_CACHE_SIZE

public static final String ENTRY_CACHE_SIZE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

entryCacheSize

private int entryCacheSize

SEARCH_RESULTS_CACHE_TTL

public static final String SEARCH_RESULTS_CACHE_TTL
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

searchResultsCacheTTL

private long searchResultsCacheTTL

SEARCH_RESULTS_CACHE_SIZE

public static final String SEARCH_RESULTS_CACHE_SIZE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

searchResultsCacheSize

private int searchResultsCacheSize

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

serviceName

private String serviceName

serviceURL

private String serviceURL

actionTable

private Hashtable actionTable

proxyRefreshInterval

private long proxyRefreshInterval

proxyExpirationInterval

private long proxyExpirationInterval

tightlyCoupled

private boolean tightlyCoupled

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

AUTH_PROPERTY_PREFIX

private static final String AUTH_PROPERTY_PREFIX
See Also:
Constant Field Values

baseOfSearch

private String baseOfSearch

defaultInitialContextFactory

private static String defaultInitialContextFactory

defaultEntryCacheSize

private static int defaultEntryCacheSize

defaultEntryCacheTTL

private static long defaultEntryCacheTTL

defaultLDAPVersion

private static String defaultLDAPVersion

defaultProxyExpirationInterval

private static long defaultProxyExpirationInterval

defaultProxyRefreshInterval

private static long defaultProxyRefreshInterval

defaultSearchResultsCacheSize

private static int defaultSearchResultsCacheSize

defaultSearchResultsCacheTTL

private static long defaultSearchResultsCacheTTL

defaultSecurityAuthentication

private static String defaultSecurityAuthentication

directoryContext

private DirContext directoryContext

entryCache

private static Hashtable entryCache

federationProperties

private static Properties federationProperties

navigationSupported

private Hashtable navigationSupported

queriesSupported

private Hashtable queriesSupported

querySpecTranslator

private DirectoryQuerySpecTranslator querySpecTranslator

searchResultsCache

private static Hashtable searchResultsCache

translationTable

private DirectoryTranslationTable translationTable

VERBOSE

private static boolean VERBOSE
Constructor Detail

FederatedDirectoryService

public FederatedDirectoryService()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class Item
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class Item
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(FederatedDirectoryService thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class Item
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class Item
Parameters:
input -
Throws:
SQLException
DatastoreException

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Returns:
String

getTranslationTableName

public String getTranslationTableName()
Gets the value of the attribute: TRANSLATION_TABLE_NAME.

Supported API: false

Returns:
String

setTranslationTableName

public void setTranslationTableName(String a_TranslationTableName)
                             throws WTPropertyVetoException
Sets the value of the attribute: TRANSLATION_TABLE_NAME.

Supported API: false

Parameters:
a_TranslationTableName -
Throws:
WTPropertyVetoException

translationTableNameValidate

private void translationTableNameValidate(String a_TranslationTableName)
                                   throws WTPropertyVetoException
Parameters:
a_TranslationTableName -
Throws:
WTPropertyVetoException

getInitialContextFactory

public String getInitialContextFactory()
Gets the value of the attribute: INITIAL_CONTEXT_FACTORY.

Supported API: true

Returns:
String

setInitialContextFactory

public void setInitialContextFactory(String a_InitialContextFactory)
Sets the value of the attribute: INITIAL_CONTEXT_FACTORY.

Supported API: true

Parameters:
a_InitialContextFactory -

getSearchBase

public String getSearchBase()
Gets the value of the attribute: SEARCH_BASE.

Supported API: false

Returns:
String

setSearchBase

public void setSearchBase(String a_SearchBase)
                   throws WTPropertyVetoException
Sets the value of the attribute: SEARCH_BASE.

Supported API: false

Parameters:
a_SearchBase -
Throws:
WTPropertyVetoException

searchBaseValidate

private void searchBaseValidate(String a_SearchBase)
                         throws WTPropertyVetoException
Parameters:
a_SearchBase -
Throws:
WTPropertyVetoException

getSearchScope

public String getSearchScope()
Gets the value of the attribute: SEARCH_SCOPE.

Supported API: false

Returns:
String

setSearchScope

public void setSearchScope(String a_SearchScope)
                    throws WTPropertyVetoException
Sets the value of the attribute: SEARCH_SCOPE.

Supported API: false

Parameters:
a_SearchScope -
Throws:
WTPropertyVetoException

searchScopeValidate

private void searchScopeValidate(String a_SearchScope)
                          throws WTPropertyVetoException
Parameters:
a_SearchScope -
Throws:
WTPropertyVetoException

getDirectoryAccessDN

public String getDirectoryAccessDN()
Gets the value of the attribute: DIRECTORY_ACCESS_DN.

Supported API: true

Returns:
String

setDirectoryAccessDN

public void setDirectoryAccessDN(String a_DirectoryAccessDN)
Sets the value of the attribute: DIRECTORY_ACCESS_DN.

Supported API: true

Parameters:
a_DirectoryAccessDN -

getDirectoryAccessCredentials

public Object getDirectoryAccessCredentials()
Gets the value of the attribute: DIRECTORY_ACCESS_CREDENTIALS.

Supported API: true

Returns:
Object

setDirectoryAccessCredentials

public void setDirectoryAccessCredentials(Object a_DirectoryAccessCredentials)
Sets the value of the attribute: DIRECTORY_ACCESS_CREDENTIALS.

Supported API: true

Parameters:
a_DirectoryAccessCredentials -

getEntryCacheTTL

public long getEntryCacheTTL()
Gets the value of the attribute: ENTRY_CACHE_TTL.

Supported API: false

Returns:
long

setEntryCacheTTL

public void setEntryCacheTTL(long a_EntryCacheTTL)
                      throws WTPropertyVetoException
Sets the value of the attribute: ENTRY_CACHE_TTL.

Supported API: false

Parameters:
a_EntryCacheTTL -
Throws:
WTPropertyVetoException

getEntryCacheSize

public int getEntryCacheSize()
Gets the value of the attribute: ENTRY_CACHE_SIZE.

Supported API: false

Returns:
int

setEntryCacheSize

public void setEntryCacheSize(int a_EntryCacheSize)
                       throws WTPropertyVetoException
Sets the value of the attribute: ENTRY_CACHE_SIZE.

Supported API: false

Parameters:
a_EntryCacheSize -
Throws:
WTPropertyVetoException

getSearchResultsCacheTTL

public long getSearchResultsCacheTTL()
Gets the value of the attribute: SEARCH_RESULTS_CACHE_TTL.

Supported API: false

Returns:
long

setSearchResultsCacheTTL

public void setSearchResultsCacheTTL(long a_SearchResultsCacheTTL)
                              throws WTPropertyVetoException
Sets the value of the attribute: SEARCH_RESULTS_CACHE_TTL.

Supported API: false

Parameters:
a_SearchResultsCacheTTL -
Throws:
WTPropertyVetoException

getSearchResultsCacheSize

public int getSearchResultsCacheSize()
Gets the value of the attribute: SEARCH_RESULTS_CACHE_SIZE.

Supported API: false

Returns:
int

setSearchResultsCacheSize

public void setSearchResultsCacheSize(int a_SearchResultsCacheSize)
                               throws WTPropertyVetoException
Sets the value of the attribute: SEARCH_RESULTS_CACHE_SIZE.

Supported API: false

Parameters:
a_SearchResultsCacheSize -
Throws:
WTPropertyVetoException

newFederatedDirectoryService

public static FederatedDirectoryService newFederatedDirectoryService(String serviceName,
                                                                     String serviceURL,
                                                                     String searchBase,
                                                                     String translationTableName)
                                                              throws FederationServicesException
Constructor returning an instance initialized with a specified service name, base service URL, directory search base, and translation table name.

Supported API: true

Parameters:
serviceName -
serviceURL -
searchBase -
translationTableName -
Returns:
FederatedDirectoryService
Throws:
FederationServicesException

initialize

protected void initialize(String serviceName,
                          String serviceURL,
                          String searchBase,
                          String translationTableName)
                   throws FederationServicesException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
serviceName -
serviceURL -
searchBase -
translationTableName -
Throws:
FederationServicesException

newFederatedDirectoryService

public static FederatedDirectoryService newFederatedDirectoryService(String serviceName,
                                                                     String serviceURL,
                                                                     String searchBase,
                                                                     String translationTableName,
                                                                     String initialContextFactory)
                                                              throws FederationServicesException
Constructor returning an instance initialized with a specified service name, base service URL, directory search base, translation table name, and initial directory context factory value.

Supported API: true

Parameters:
serviceName -
serviceURL -
searchBase -
translationTableName -
initialContextFactory -
Returns:
FederatedDirectoryService
Throws:
FederationServicesException

initialize

protected void initialize(String serviceName,
                          String serviceURL,
                          String searchBase,
                          String translationTableName,
                          String initialContextFactory)
                   throws FederationServicesException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
serviceName -
serviceURL -
searchBase -
translationTableName -
initialContextFactory -
Throws:
FederationServicesException

newFederatedDirectoryService

public static FederatedDirectoryService newFederatedDirectoryService(String serviceName)
                                                              throws FederationServicesException
Constructor returning an instance initialized with a specified service name, default initial context factory, and no directory attribute translation table.

Supported API: true

Parameters:
serviceName -
Returns:
FederatedDirectoryService
Throws:
FederationServicesException

initialize

protected void initialize(String serviceName)
                   throws FederationServicesException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Parameters:
serviceName -
Throws:
FederationServicesException

newFederatedDirectoryService

public static FederatedDirectoryService newFederatedDirectoryService()
                                                              throws FederationServicesException
Constructor returning an instance initialized with default property values.

Supported API: true

Returns:
FederatedDirectoryService
Throws:
FederationServicesException

retrieveDirectoryObject

public Object retrieveDirectoryObject(String distinguishedName)
                               throws FederationServicesException,
                                      WTException
Returns a Federated instance of the directory object identified by the specified distinguished name.

Supported API: true

Parameters:
distinguishedName -
Returns:
Object
Throws:
FederationServicesException
WTException

_retrieveDirectoryObject

protected Object _retrieveDirectoryObject(String distinguishedName)
                                   throws FederationServicesException,
                                          WTException
Returns a Federated instance of the directory object identified by the specified distinguished name.

Supported API: true

Parameters:
distinguishedName -
Returns:
Object
Throws:
FederationServicesException
WTException

refreshDirectoryObject

public void refreshDirectoryObject(Federated proxy)
                            throws FederationServicesException,
                                   WTException
Refreshes the derived properties of a specified proxy object.

Supported API: true

Parameters:
proxy -
Throws:
FederationServicesException
WTException

_refreshDirectoryObject

protected void _refreshDirectoryObject(Federated proxy)
                                throws FederationServicesException,
                                       WTException
Refreshes the derived properties of a specified proxy object.

Supported API: true

Parameters:
proxy -
Throws:
FederationServicesException
WTException

findDirectoryObjects

public QueryResult findDirectoryObjects(String filterName,
                                        Hashtable filterArguments)
                                 throws FederationServicesException,
                                        WTException
Search the directory service for entries matching the specified filter, and return a QueryResult containing objects corresponding to the matching entries.

Supported API: true

Parameters:
filterName -
filterArguments -
Returns:
QueryResult
Throws:
FederationServicesException
WTException

_findDirectoryObjects

protected QueryResult _findDirectoryObjects(String filterName,
                                            Hashtable filterArguments)
                                     throws FederationServicesException,
                                            WTException
Search the directory service for entries matching the specified filter, and return a QueryResult containing objects corresponding to the matching entries.

Supported API: true

Parameters:
filterName -
filterArguments -
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findDirectoryObjects

public QueryResult findDirectoryObjects(String url)
                                 throws FederationServicesException,
                                        WTException
Search the directory service for entries matching the criteria specified in the given LDAP url, and return a QueryResult containing objects corresponding to the matching entries.

Supported API: true

Parameters:
url -
Returns:
QueryResult
Throws:
FederationServicesException
WTException

_findDirectoryObjects

protected QueryResult _findDirectoryObjects(String url)
                                     throws FederationServicesException,
                                            WTException
Search the directory service for entries matching the criteria specified in the given LDAP url, and return a QueryResult containing objects corresponding to the matching entries.

Supported API: true

Parameters:
url -
Returns:
QueryResult
Throws:
FederationServicesException
WTException

getTranslationTable

public DirectoryTranslationTable getTranslationTable()
                                              throws FederationServicesException
Return an instance of the attribute translation table referenced by this directory service.

Supported API: true

Returns:
DirectoryTranslationTable
Throws:
FederationServicesException

retrieveDirectoryAttributes

public Hashtable retrieveDirectoryAttributes(String distinguishedName)
                                      throws FederationServicesException,
                                             WTException
Return a Hashtable containing all of the directory attributes read from the specified directory entry.

Supported API: true

Parameters:
distinguishedName -
Returns:
Hashtable
Throws:
FederationServicesException
WTException

_retrieveDirectoryAttributes

protected Hashtable _retrieveDirectoryAttributes(String distinguishedName)
                                          throws FederationServicesException,
                                                 WTException
Return a Hashtable containing all of the directory attributes read from the specified directory entry.

Supported API: true

Parameters:
distinguishedName -
Returns:
Hashtable
Throws:
FederationServicesException
WTException

getServiceName

public String getServiceName()
Gets the value of the attribute: SERVICE_NAME.

Supported API: true

Specified by:
getServiceName in interface FederatedService
Returns:
String

setServiceName

public void setServiceName(String a_ServiceName)
Sets the value of the attribute: SERVICE_NAME.

Supported API: true

Specified by:
setServiceName in interface FederatedService
Parameters:
a_ServiceName -

getServiceURL

public String getServiceURL()
Gets the value of the attribute: SERVICE_URL.

Supported API: false

Specified by:
getServiceURL in interface FederatedService
Returns:
String

setServiceURL

public void setServiceURL(String a_ServiceURL)
                   throws WTPropertyVetoException
Sets the value of the attribute: SERVICE_URL.

Supported API: false

Specified by:
setServiceURL in interface FederatedService
Parameters:
a_ServiceURL -
Throws:
WTPropertyVetoException

serviceURLValidate

private void serviceURLValidate(String a_ServiceURL)
                         throws WTPropertyVetoException
Parameters:
a_ServiceURL -
Throws:
WTPropertyVetoException

getActionTable

public Hashtable getActionTable()
Gets the value of the attribute: ACTION_TABLE.

Supported API: false

Specified by:
getActionTable in interface FederatedService
Returns:
Hashtable

setActionTable

public void setActionTable(Hashtable a_ActionTable)
                    throws WTPropertyVetoException
Sets the value of the attribute: ACTION_TABLE.

Supported API: false

Specified by:
setActionTable in interface FederatedService
Parameters:
a_ActionTable -
Throws:
WTPropertyVetoException

getProxyRefreshInterval

public long getProxyRefreshInterval()
Gets the value of the attribute: PROXY_REFRESH_INTERVAL.

Supported API: false

Specified by:
getProxyRefreshInterval in interface FederatedService
Returns:
long

setProxyRefreshInterval

public void setProxyRefreshInterval(long a_ProxyRefreshInterval)
                             throws WTPropertyVetoException
Sets the value of the attribute: PROXY_REFRESH_INTERVAL.

Supported API: false

Specified by:
setProxyRefreshInterval in interface FederatedService
Parameters:
a_ProxyRefreshInterval -
Throws:
WTPropertyVetoException

getProxyExpirationInterval

public long getProxyExpirationInterval()
Gets the value of the attribute: PROXY_EXPIRATION_INTERVAL.

Supported API: false

Specified by:
getProxyExpirationInterval in interface FederatedService
Returns:
long

setProxyExpirationInterval

public void setProxyExpirationInterval(long a_ProxyExpirationInterval)
                                throws WTPropertyVetoException
Sets the value of the attribute: PROXY_EXPIRATION_INTERVAL.

Supported API: false

Specified by:
setProxyExpirationInterval in interface FederatedService
Parameters:
a_ProxyExpirationInterval -
Throws:
WTPropertyVetoException

isTightlyCoupled

public boolean isTightlyCoupled()
Gets the value of the attribute: TIGHTLY_COUPLED.

Supported API: false

Specified by:
isTightlyCoupled in interface FederatedService
Returns:
boolean

setTightlyCoupled

public void setTightlyCoupled(boolean a_TightlyCoupled)
                       throws WTPropertyVetoException
Sets the value of the attribute: TIGHTLY_COUPLED.

Supported API: false

Specified by:
setTightlyCoupled in interface FederatedService
Parameters:
a_TightlyCoupled -
Throws:
WTPropertyVetoException

getActionURL

public String getActionURL(String actionName,
                           String sourceObjectId)
                    throws FederationServicesException
Returns the URL associated with the specified action and source object identifier.

Supported API: false

Specified by:
getActionURL in interface FederatedService
Parameters:
actionName -
sourceObjectId -
Returns:
String
Throws:
FederationServicesException

getActionURL

public String getActionURL(String actionName,
                           Hashtable arguments)
                    throws FederationServicesException
Returns the URL associated with the specified action and set of named arguments.

Supported API: true

Specified by:
getActionURL in interface FederatedService
Parameters:
actionName -
arguments -
Returns:
String
Throws:
FederationServicesException

getActionURLTemplate

public String getActionURLTemplate(String actionName)
Returns the URL template associated with the specified action.

Supported API: false

Specified by:
getActionURLTemplate in interface FederatedService
Parameters:
actionName -
Returns:
String

setActionURLTemplate

public void setActionURLTemplate(String actionName,
                                 String actionURLTemplate)
Associates the specified URL template with the specified action.

Supported API: false

Specified by:
setActionURLTemplate in interface FederatedService
Parameters:
actionName -
actionURLTemplate -

retrieveObject

public Object retrieveObject(String sourceObjectId)
                      throws FederationServicesException
Returns a Federated instance of the remote object identified by the specified source object identifier.

Supported API: true

Specified by:
retrieveObject in interface FederatedService
Parameters:
sourceObjectId -
Returns:
Object
Throws:
FederationServicesException

retrieveAttributes

public Hashtable retrieveAttributes(String sourceObjectId)
                             throws FederationServicesException


Supported API: true

Specified by:
retrieveAttributes in interface FederatedService
Parameters:
sourceObjectId -
Returns:
Hashtable
Throws:
FederationServicesException

refreshObject

public void refreshObject(Federated proxy)
                   throws FederationServicesException
Refresh the properties of a proxy object that are derived from a remote object.

Supported API: true

Specified by:
refreshObject in interface FederatedService
Parameters:
proxy -
Throws:
FederationServicesException

createObject

public Object createObject(Class objectClass,
                           String sourceObjectId,
                           Hashtable attributes)
                    throws FederationServicesException
Create a new object in a remote information service.

Supported API: true

Specified by:
createObject in interface FederatedService
Parameters:
objectClass -
sourceObjectId -
attributes -
Returns:
Object
Throws:
FederationServicesException

updateObject

public void updateObject(String sourceObjectId,
                         Hashtable updateAttributes,
                         Vector deleteAttributes)
                  throws FederationServicesException
Update the attributes of a specified remote object.

Supported API: true

Specified by:
updateObject in interface FederatedService
Parameters:
sourceObjectId -
updateAttributes -
deleteAttributes -
Throws:
FederationServicesException

deleteObject

public void deleteObject(String sourceObjectId)
                  throws FederationServicesException
Delete the specified object managed by this federated service.

Supported API: true

Specified by:
deleteObject in interface FederatedService
Parameters:
sourceObjectId -
Throws:
FederationServicesException

findObjects

public QueryResult findObjects(QuerySpec criteria)
                        throws FederationServicesException
Retrieve objects from this federated service using the specified selection criteria.

Supported API: true

Specified by:
findObjects in interface FederatedService
Parameters:
criteria -
Returns:
QueryResult
Throws:
FederationServicesException

findObjects

public QueryResult findObjects(Class targetLinkClass,
                               Persistable obj1,
                               String obj1Role,
                               Persistable obj2)
                        throws FederationServicesException
Return all link objects in this service that exist between two specified source objects.

Supported API: true

Specified by:
findObjects in interface FederatedService
Parameters:
targetLinkClass -
obj1 -
obj1Role -
obj2 -
Returns:
QueryResult
Throws:
FederationServicesException

navigate

public QueryResult navigate(Persistable obj,
                            String role,
                            Class linkClass,
                            boolean onlyOtherSide)
                     throws FederationServicesException
Return objects from this federated service related to the specified source object given a role and link class. Return only the related objects themselves if specified. Otherwise, return both the related objects as well as the link objects that associate them with the source object.

Supported API: true

Specified by:
navigate in interface FederatedService
Parameters:
obj -
role -
linkClass -
onlyOtherSide -
Returns:
QueryResult
Throws:
FederationServicesException

navigate

public QueryResult navigate(Persistable obj,
                            String role,
                            QuerySpec criteria,
                            boolean onlyOtherSide)
                     throws FederationServicesException
Return objects from this federated service related to the specified source object given a role and link selection crtieria. Return only the related objects themselves if specified. Otherwise, return both the related objects as well as the link objects that associate them with the source object.

Supported API: true

Specified by:
navigate in interface FederatedService
Parameters:
obj -
role -
criteria -
onlyOtherSide -
Returns:
QueryResult
Throws:
FederationServicesException

getSupportedObjectClasses

public Enumeration getSupportedObjectClasses()
                                      throws FederationServicesException
Return the enumeration of class names for which this service supports queries.

Supported API: true

Specified by:
getSupportedObjectClasses in interface FederatedService
Returns:
Enumeration
Throws:
FederationServicesException

getSupportedLinkClasses

public Enumeration getSupportedLinkClasses()
                                    throws FederationServicesException
Return the enumeration of link class names for which this service supports navigation.

Supported API: true

Specified by:
getSupportedLinkClasses in interface FederatedService
Returns:
Enumeration
Throws:
FederationServicesException

isQuerySupported

public boolean isQuerySupported(Class objectClass)
                         throws FederationServicesException
Return true if the named class is defined in the table of supported object classes for this federated service.

Supported API: true

Specified by:
isQuerySupported in interface FederatedService
Parameters:
objectClass -
Returns:
boolean
Throws:
FederationServicesException

isNavigationSupported

public boolean isNavigationSupported(Class linkClass)
                              throws FederationServicesException
Return true if the named class is defined in the table of supported link classes for this federated service.

Supported API: true

Specified by:
isNavigationSupported in interface FederatedService
Parameters:
linkClass -
Returns:
boolean
Throws:
FederationServicesException

purgeCaches

public void purgeCaches()
                 throws FederationServicesException
Purge any caches that might be kept by the service.

Supported API: true

Specified by:
purgeCaches in interface FederatedService
Throws:
FederationServicesException

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class Item
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class Item
Returns:
int

initialize

protected void initialize()
                   throws FederationServicesException
Supports initialization, following construction of an instance. Invoked by "new" factory having the same signature.

Supported API: true

Overrides:
initialize in class Item
Throws:
FederationServicesException

searchDirectory

public Enumeration searchDirectory(String url)
                            throws FederationServicesException
Search the directory service for entries matching the filter defined by the specified URL.

Parameters:
url - URL defining the directory search filter
Returns:
NamingEnumeration the search results. Also sets property baseOfSearch to the distinguished name of the directory entry from which the search was initiated, and property directoryContext to the directory context established.
Throws:
FederationServicesException

setCredentials

private void setCredentials(Hashtable context,
                            String providerURL)
                     throws FederationServicesException
Set authentication information in a specified directory context.

Parameters:
context - the directory context
providerURL - the URL of the directory service provider
Throws:
FederationServicesException

createLinkObject

private BinaryLink createLinkObject(Class linkClass,
                                    Persistable obj1,
                                    String obj1Role,
                                    Persistable obj2)
                             throws FederationServicesException
Create a link object that associates two Persistables.

Parameters:
linkClass - the type of link object to create
obj1 - the first object in the association
obj1Role - the role played by the first object
obj2 - the second object in the association
Returns:
BinaryLink the new link object
Throws:
FederationServicesException

updateEntryCache

private void updateEntryCache(String url,
                              Hashtable entry)
Add an entry to the directory entry cache.

Parameters:
url - unique key under which to add the entry
entry - directory entry to add

updateSearchResultsCache

private void updateSearchResultsCache(String url,
                                      Vector searchResults)
Add an entry to the cache of directory search results.

Parameters:
url - unique key under which to add the entry
searchResults - vector of SearchResult objects

substituteTableValues

private String substituteTableValues(String s,
                                     Hashtable table)
                              throws FederationServicesException
Substitute values from an attribute translation table into a specified string. Substitutions are made wherever substrings of the form "%[fieldName]" are found.

Parameters:
s - String in which to substitute values
table - the translation table supplying values
Returns:
String the resulting string, with substitutions made
Throws:
FederationServicesException

getInitialDirContext

protected DirContext getInitialDirContext(String providerURL)
                                   throws FederationServicesException
Throws:
FederationServicesException