wt.federation
Class StandardFederationService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.federation.StandardFederationService
All Implemented Interfaces:
FederationService, FederationServiceSvr, Manager, NetFactor, Serializable

public class StandardFederationService
extends StandardManager
implements FederationService, FederationServiceSvr, Serializable

Standard implementation of the federation service interfaces.

Use the newStandardFederationService static factory method(s), not the StandardFederationService 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
private  class StandardFederationService.CircularBuffer
           
private  class StandardFederationService.CircularInputStream
           
private  class StandardFederationService.CircularOutputStream
           
private  class StandardFederationService.PipeDescriptor
           
static class StandardFederationService.RMIStreamHandler
           
private  class StandardFederationService.TaskRunner
           
 
Field Summary
private static int ARGV_NAME
           
private static int ARGV_VALUE
           
private static String AUTH_PROPERTY_PREFIX
           
private static int CHUNK_SIZE
           
private static String CLASSNAME
           
private static String CMD_DELEGATE_FEEDBACK_EMIT_TASK
           
private static String CMD_DELEGATE_FEEDBACK_EMIT_TASK_DEFAULT
           
private static String credentialsMapper
           
private static String credentialsTTL
           
private static String EVENT_PROPERTY_PREFIX
           
static String FEDERATED_FEEDBACK_ID_KEY
           
private static Properties federationProperties
           
static String FEEDBACK_SPEC_KEY
           
private static String FFI_SEPARATOR
           
private static String iePropertyResource
           
private static String ieVMName
           
static boolean infoEngineInitialized
           
private static String keyAlgorithm
           
private static String keyPassword
           
private static String keyProvider
           
private static String keystorePassword
           
private static String keystorePath
           
private static String keystoreProvider
           
private static String keystoreType
           
private static boolean LISTENERS_ENABLED
           
private static String namingServiceName
           
private static long proxyRefreshQueueInterval
           
private static String proxyRefreshQueueName
           
static String queueInterlock
           
private static String RESOURCE
           
private static String SAXDriver
           
private static String secureProtocol
           
private static String startupTask
           
static Hashtable streamRegistry
           
private static String TASK_DISPATCHER_ACTION
           
private static String TASK_DISPATCHER_CLIMBER
           
private static String TASK_DISPATCHER_GROUP_IN
           
private static String TASK_DISPATCHER_GROUP_OUT
           
private static String TASK_DISPATCHER_GROUP_OUT_NAME
           
private static String TASK_DISPATCHER_GROUP_VDB
           
private static String TASK_DISPATCHER_ID_META_ATTR
           
private static String TASK_DISPATCHER_PARAM
           
private static String TASK_DISPATCHER_TASK
           
private static String TASK_DISPATCHER_TASK_DEFAULT
           
private static String TASK_DISPATCHER_TASKSURL
           
private static String TASK_DISPATCHER_TYPE_META_ATTR
           
static String TASK_EMIT_EVENT_CONTEXT_ID_ATT
           
static String TASK_EMIT_EVENT_FEEDBACK_ATT
           
static String TASK_EMIT_EVENT_GROUP_NAME
           
static String TASK_EMIT_EVENT_VMNAME_ATT
           
private static String TASK_SIGNER
           
private static String taskCodebase
           
private static String taskRoot
           
private static String TASKS_ROOT_LDAP_URL
           
private static String taskSignerPassword
           
private static String trustAlgorithm
           
private static String trustProvider
           
private static String TYPE_HIERARCHY_CLIMBER
           
private static String TYPE_HIERARCHY_CLIMBER_DEFAULT
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
StandardFederationService()
           
 
Method Summary
 Persistable checkFreshness(Persistable obj)
          Determines whether the specified object is an expired or stale proxy.
 QueryResult checkFreshness(QueryResult qr)
          Traverses a QueryResult and determines whether any of the objects contained within it are expired or stale proxies.
static void commandDelegateFeedbackHandler(Group eventMessageData)
           
 Federated createProxy(Federated proxy)
          Creates a proxy object (for migration of LDAP WTUsers to ProxyUsers).
 Group doAction(String action, Object[][] argv, FeedbackSpec feedbackSpec)
          Executes one or more Info*Engine tasks selected by a logical action name, and the types and physical locations of a specific set of objects passed as parameters.
protected  void enqueueRefreshRequest(Federated proxy)
          Enqueues a request to refresh a proxy object.
 InputStream executeHTTPRequest(String method, String urlString, String payload)
          Executes a specified HTTP request against a specified resource and returns the HTTP response.
 InputStream executeHTTPRequest(String method, String urlString, String contentType, byte[] payload)
          Executes a specified HTTP request against a specified resource and returns the HTTP response.
 QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2)
          Returns all link objects that exist between two specified source objects in all known services.
 QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2, Enumeration services)
          Returns all link objects that exist between two specified source objects in a specified set of services.
 QueryResult findObjects(QuerySpec qs)
          Sends a query to all federated services, and returns the merged set of results.
 QueryResult findObjects(QuerySpec qs, Enumeration services, boolean searchLocalDB)
          Sends a query to each of the specified federated services, and returns the merged set of results.
 QueryResult findObjects(QuerySpec qs, String serviceName)
          Sends a query to the specified federated service, and returns the results.
 QueryResult findObjects(QuerySpec qs, String[] serviceNames)
          Sends a query to each of the specified federated services, and returns the merged set of results.
 QueryResult findObjects(QuerySpec qs, String[] serviceNames, boolean searchLocalDB)
          Sends a query to each of the specified federated services, and returns the merged set of results.
private static ObjectVector findPersistables(ObjectVector objectVector)
           
 QueryResult getAllServiceObjects()
          Returns an enumeration of all known FederatedService objects.
 String[] getAllServices()
          Returns an array of the names of all known federated services.
private static String getAuthorization(URL url)
          Get the authorization string that allows the user to access a specified URL.
 String getConceptualClassname()
          Deprecated.  
private static String getDefaultAuthorization(String realm)
          Get the default authorization string that allows the user to access a specified URL.
 Properties getFederationProperties()
          Get a properties object that contains properties from the federation properties file.
 FeedbackSpec getFeedbackSpec()
          Returns the feedback specification object associated with the method context.
 Federatable getLocalObject(String remoteObjId, String repositoryName)
          Retrieves the local object with the given remote object identifier in the given repository.
 String[] getNavigableServices(String linkClassName)
          Returns an array of the names of federated services that support navigating a specified link class.
 Persistable getPersistentInstance(Federated proxy)
          Returns a persisted instance of the specified proxy object or null if the proxy has no persisted instance.
 String[] getQueryableServices(String className)
          Returns an array of the names of federated services that support querying a specified class.
 FederatedService getService(Federated proxy)
          Returns an instance of the FederatedService object referenced by the serviceId attribute of the specified proxy object.
 QueryResult getServiceObjects(String[] serviceNames)
          Returns an enumeration of the service objects associated with the specified service names.
 Ufid getUfid(Federatable object)
          Retrieves the ufid for the Federatable object.
static void initInfoEngineProperties()
           
 InputStream invokeInfoEngineTemplate(String url)
          Sends a request to Info*Engine to execute the specified template.
 InputStream invokeInfoEngineTemplate(String url, Hashtable params)
          Sends a request to Info*Engine to execute the specified template, optionally providing parameters in URL-encoded form data.
 QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide)
          Returns objects associated with the specified source object in all known services given a role and a link class.
 QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide, Enumeration services)
          Returns objects associated with the specified source object in the specified list of services given a role and a link class.
 QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide)
          Returns objects associated with the specified source object in all known services given a role and selection critieria.
 QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide, Enumeration services)
          Returns objects associated with the specified source object in the specified list of services given a role and selection critieria.
static StandardFederationService newStandardFederationService()
          Default factory for the class.
protected  void performStartupProcess()
          Overrides the startup process specific to the federation service to provide custom startup for event subscription.
 void refresh(Federated proxy)
          Refreshes the properties of a proxy object.
 void refreshIfStale(Federated proxy)
          Refreshes the properties of a proxy object, but only if the object is stale.
static Federated refreshProxy(Federated proxy)
          Refreshes a proxy object by calling its refresh method.
static Federated refreshProxy(ObjectIdentifier oid)
          Refreshes a proxy object by calling its refresh method.
 Vector retrieveInfoEngineObjects(String url)
          Sends a request to Info*Engine to retrieve objects associated with the specified URL.
 void sendFeedback(MethodFeedback feedbackObject)
          Sends Feedback objects to the client.
static void setInfoEngineProperties()
          This method sets Info*Engine properties in the System properties object.
 Federated storeProxy(Federated proxy)
          Stores a proxy object in the persistent data service.
 void storeUfid(Federatable object, String remoteId, String location)
          Stores a ufid for the given Federatable.
 void syncObjects(Externalizable source, Externalizable target)
          Copies the properties of a specified source object to a target object.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

ARGV_NAME

private static final int ARGV_NAME
See Also:
Constant Field Values

ARGV_VALUE

private static final int ARGV_VALUE
See Also:
Constant Field Values

AUTH_PROPERTY_PREFIX

private static final String AUTH_PROPERTY_PREFIX
See Also:
Constant Field Values

CMD_DELEGATE_FEEDBACK_EMIT_TASK_DEFAULT

private static final String CMD_DELEGATE_FEEDBACK_EMIT_TASK_DEFAULT
See Also:
Constant Field Values

EVENT_PROPERTY_PREFIX

private static final String EVENT_PROPERTY_PREFIX
See Also:
Constant Field Values

FFI_SEPARATOR

private static final String FFI_SEPARATOR
See Also:
Constant Field Values

TASK_DISPATCHER_ACTION

private static final String TASK_DISPATCHER_ACTION
See Also:
Constant Field Values

TASK_DISPATCHER_CLIMBER

private static final String TASK_DISPATCHER_CLIMBER
See Also:
Constant Field Values

TASK_DISPATCHER_GROUP_IN

private static final String TASK_DISPATCHER_GROUP_IN
See Also:
Constant Field Values

TASK_DISPATCHER_GROUP_OUT_NAME

private static final String TASK_DISPATCHER_GROUP_OUT_NAME
See Also:
Constant Field Values

TASK_DISPATCHER_GROUP_OUT

private static final String TASK_DISPATCHER_GROUP_OUT
See Also:
Constant Field Values

TASK_DISPATCHER_GROUP_VDB

private static final String TASK_DISPATCHER_GROUP_VDB
See Also:
Constant Field Values

TASK_DISPATCHER_ID_META_ATTR

private static final String TASK_DISPATCHER_ID_META_ATTR
See Also:
Constant Field Values

TASK_DISPATCHER_PARAM

private static final String TASK_DISPATCHER_PARAM
See Also:
Constant Field Values

TASK_DISPATCHER_TASKSURL

private static final String TASK_DISPATCHER_TASKSURL
See Also:
Constant Field Values

TASK_DISPATCHER_TASK_DEFAULT

private static final String TASK_DISPATCHER_TASK_DEFAULT
See Also:
Constant Field Values

TASK_DISPATCHER_TYPE_META_ATTR

private static final String TASK_DISPATCHER_TYPE_META_ATTR
See Also:
Constant Field Values

TYPE_HIERARCHY_CLIMBER_DEFAULT

private static final String TYPE_HIERARCHY_CLIMBER_DEFAULT
See Also:
Constant Field Values

credentialsMapper

private static String credentialsMapper

credentialsTTL

private static String credentialsTTL

federationProperties

private static Properties federationProperties

keyAlgorithm

private static String keyAlgorithm

keyPassword

private static String keyPassword

keyProvider

private static String keyProvider

keystorePassword

private static String keystorePassword

keystorePath

private static String keystorePath

keystoreProvider

private static String keystoreProvider

keystoreType

private static String keystoreType

iePropertyResource

private static String iePropertyResource

ieVMName

private static String ieVMName

namingServiceName

private static String namingServiceName

proxyRefreshQueueName

private static String proxyRefreshQueueName

proxyRefreshQueueInterval

private static long proxyRefreshQueueInterval

SAXDriver

private static String SAXDriver

secureProtocol

private static String secureProtocol

startupTask

private static String startupTask

taskCodebase

private static String taskCodebase

taskRoot

private static String taskRoot

taskSignerPassword

private static String taskSignerPassword

trustAlgorithm

private static String trustAlgorithm

trustProvider

private static String trustProvider

CHUNK_SIZE

private static int CHUNK_SIZE

CMD_DELEGATE_FEEDBACK_EMIT_TASK

private static String CMD_DELEGATE_FEEDBACK_EMIT_TASK

LISTENERS_ENABLED

private static boolean LISTENERS_ENABLED

TASK_DISPATCHER_TASK

private static String TASK_DISPATCHER_TASK

TASKS_ROOT_LDAP_URL

private static String TASKS_ROOT_LDAP_URL

TASK_SIGNER

private static String TASK_SIGNER

TYPE_HIERARCHY_CLIMBER

private static String TYPE_HIERARCHY_CLIMBER

VERBOSE

private static boolean VERBOSE

FEDERATED_FEEDBACK_ID_KEY

public static final String FEDERATED_FEEDBACK_ID_KEY
See Also:
Constant Field Values

FEEDBACK_SPEC_KEY

public static final String FEEDBACK_SPEC_KEY
See Also:
Constant Field Values

TASK_EMIT_EVENT_CONTEXT_ID_ATT

public static final String TASK_EMIT_EVENT_CONTEXT_ID_ATT
See Also:
Constant Field Values

TASK_EMIT_EVENT_FEEDBACK_ATT

public static final String TASK_EMIT_EVENT_FEEDBACK_ATT
See Also:
Constant Field Values

TASK_EMIT_EVENT_GROUP_NAME

public static final String TASK_EMIT_EVENT_GROUP_NAME
See Also:
Constant Field Values

TASK_EMIT_EVENT_VMNAME_ATT

public static final String TASK_EMIT_EVENT_VMNAME_ATT
See Also:
Constant Field Values

infoEngineInitialized

public static boolean infoEngineInitialized

queueInterlock

public static String queueInterlock

streamRegistry

public static Hashtable streamRegistry
Constructor Detail

StandardFederationService

public StandardFederationService()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Overrides the startup process specific to the federation service to provide custom startup for event subscription.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

refreshProxy

public static Federated refreshProxy(Federated proxy)
                              throws FederationServicesException
Refreshes a proxy object by calling its refresh method.

Supported API: false

Parameters:
proxy -
Returns:
Federated
Throws:
FederationServicesException

refreshProxy

public static Federated refreshProxy(ObjectIdentifier oid)
                              throws FederationServicesException
Refreshes a proxy object by calling its refresh method.

Supported API: false

Parameters:
oid -
Returns:
Federated
Throws:
FederationServicesException

newStandardFederationService

public static StandardFederationService newStandardFederationService()
                                                              throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardFederationService
Throws:
WTException

createProxy

public Federated createProxy(Federated proxy)
                      throws FederationServicesException,
                             WTException
Creates a proxy object (for migration of LDAP WTUsers to ProxyUsers). NOTE: This method is only to be used for migration of LDAP WTUsers to ProxyUsers. It uses the PersistenceManagerSvr insert method, which bypasses normal checking (such as access control) and event dispatching (PRE_STORE and POST_STORE).

Supported API: false

Specified by:
createProxy in interface FederationService
Parameters:
proxy - the object to be persisted.
Returns:
Federated
Throws:
FederationServicesException
WTException

doAction

public Group doAction(String action,
                      Object[][] argv,
                      FeedbackSpec feedbackSpec)
               throws FederationServicesException,
                      WTException
Executes one or more Info*Engine tasks selected by a logical action name, and the types and physical locations of a specific set of objects passed as parameters.

See the FederationHelper class doAction() method for a complete description.

Supported API: false

Specified by:
doAction in interface FederationService
Parameters:
action - The action to perform.
argv - Variable argument list.
feedbackSpec - The feedback specification object.
Returns:
Group
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(QuerySpec qs)
                        throws FederationServicesException,
                               WTException
Sends a query to all federated services, and returns the merged set of results.

Supported API: true

Specified by:
findObjects in interface FederationService
Parameters:
qs - the search criteria to use for the query.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(QuerySpec qs,
                               String serviceName)
                        throws FederationServicesException,
                               WTException
Sends a query to the specified federated service, and returns the results.

Supported API: true

Specified by:
findObjects in interface FederationService
Parameters:
qs - the search criteria to use for the query.
serviceName - the name of the federated service to be queried.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(QuerySpec qs,
                               String[] serviceNames)
                        throws FederationServicesException,
                               WTException
Sends a query to each of the specified federated services, and returns the merged set of results.

Supported API: true

Specified by:
findObjects in interface FederationService
Parameters:
qs - the search criteria to use for the query.
serviceNames - the names of the federated services to be queried.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(QuerySpec qs,
                               String[] serviceNames,
                               boolean searchLocalDB)
                        throws FederationServicesException,
                               WTException
Sends a query to each of the specified federated services, and returns the merged set of results. If searchLocalDB is true, also queries the local system and includes any locally defined entries in the search results.

Supported API: true

Specified by:
findObjects in interface FederationService
Parameters:
qs - the search criteria to use for the query.
serviceNames - the names of the federated services to be queried.
searchLocalDB - set to true if the local system should be queried.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(QuerySpec qs,
                               Enumeration services,
                               boolean searchLocalDB)
                        throws FederationServicesException,
                               WTException
Sends a query to each of the specified federated services, and returns the merged set of results. If searchLocalDB is true, also queries the local system and includes any locally defined entries in the search results.

Supported API: false

Specified by:
findObjects in interface FederationService
Parameters:
qs - the search criteria to use for the query.
services - an enumeration of the federated services to be queried.
searchLocalDB - set to true if the local system should be queried.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(Class targetLinkClass,
                               Persistable obj1,
                               String obj1Role,
                               Persistable obj2)
                        throws FederationServicesException,
                               WTException
Returns all link objects that exist between two specified source objects in all known services.

Supported API: false

Specified by:
findObjects in interface FederationService
Parameters:
targetLinkClass - the object class defining the association type.
obj1 - the first object.
obj1Role - the role played by the first object in the association.
obj2 - the second object.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

findObjects

public QueryResult findObjects(Class targetLinkClass,
                               Persistable obj1,
                               String obj1Role,
                               Persistable obj2,
                               Enumeration services)
                        throws FederationServicesException,
                               WTException
Returns all link objects that exist between two specified source objects in a specified set of services.

Supported API: false

Specified by:
findObjects in interface FederationService
Parameters:
targetLinkClass - the object class defining the association type.
obj1 - the first object.
obj1Role - the role played by the first object in the association.
obj2 - the second object.
services - the set of services to query.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

getAllServices

public String[] getAllServices()
                        throws FederationServicesException,
                               WTException
Returns an array of the names of all known federated services.

Supported API: true

Specified by:
getAllServices in interface FederationService
Returns:
String []
Throws:
FederationServicesException
WTException

getNavigableServices

public String[] getNavigableServices(String linkClassName)
                              throws FederationServicesException,
                                     WTException
Returns an array of the names of federated services that support navigating a specified link class.

Supported API: true

Specified by:
getNavigableServices in interface FederationService
Parameters:
linkClassName - the name of the class for which navigation is desired.
Returns:
String []
Throws:
FederationServicesException
WTException

getPersistentInstance

public Persistable getPersistentInstance(Federated proxy)
                                  throws FederationServicesException,
                                         WTException
Returns a persisted instance of the specified proxy object or null if the proxy has no persisted instance.

Supported API: true

Specified by:
getPersistentInstance in interface FederationService
Parameters:
proxy - the proxy object.
Returns:
Persistable
Throws:
FederationServicesException
WTException

getQueryableServices

public String[] getQueryableServices(String className)
                              throws FederationServicesException,
                                     WTException
Returns an array of the names of federated services that support querying a specified class.

Supported API: true

Specified by:
getQueryableServices in interface FederationService
Parameters:
className - the name of the class for which querying is desired.
Returns:
String []
Throws:
FederationServicesException
WTException

getService

public FederatedService getService(Federated proxy)
                            throws FederationServicesException,
                                   WTException
Returns an instance of the FederatedService object referenced by the serviceId attribute of the specified proxy object.

Supported API: false

Specified by:
getService in interface FederationService
Parameters:
proxy - the proxy object.
Returns:
FederatedService
Throws:
FederationServicesException
WTException

navigate

public QueryResult navigate(Persistable obj,
                            String role,
                            Class linkClass,
                            boolean onlyOtherSide)
                     throws FederationServicesException,
                            WTException
Returns objects associated with the specified source object in all known services given a role and a link class. Returns only the associated objects themselves, if specified. Otherwise, returns both the associated objects as well as the link objects that associate them with the source object.

Supported API: false

Specified by:
navigate in interface FederationService
Parameters:
obj - the object for which associated objects are to be returned.
role - the role played in the association by the objects being sought.
linkClass - the link class defining the type of association.
onlyOtherSide - true if only associated objects should be returned, and false if link objects should be returned too.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

navigate

public QueryResult navigate(Persistable obj,
                            String role,
                            Class linkClass,
                            boolean onlyOtherSide,
                            Enumeration services)
                     throws FederationServicesException,
                            WTException
Returns objects associated with the specified source object in the specified list of services given a role and a link class. Returns only the associated objects themselves, if specified. Otherwise, returns both the associated objects as well as the link objects that associate them with the source object.

Supported API: false

Specified by:
navigate in interface FederationService
Parameters:
obj - the object for which associated objects are to be returned.
role - the role played in the association by the objects being sought.
linkClass - the link class defining the type of association.
onlyOtherSide - true if only associated objects should be returned, and false if link objects should be returned too.
services - an enumeration of the service objects for the services to be queried.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

navigate

public QueryResult navigate(Persistable obj,
                            String role,
                            QuerySpec criteria,
                            boolean onlyOtherSide)
                     throws FederationServicesException,
                            WTException
Returns objects associated with the specified source object in all known services given a role and selection critieria. Returns only the associated objects themselves, if specified. Otherwise, returns both the associated objects as well as the link objects that associate them with the source object.

Supported API: false

Specified by:
navigate in interface FederationService
Parameters:
obj - the object for which associated objects are to be returned.
role - the role played in the association by the objects being sought.
criteria - the selection criteria specifying the type of association.
onlyOtherSide - true if only associated objects should be returned, and false if link objects should be returned too.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

navigate

public QueryResult navigate(Persistable obj,
                            String role,
                            QuerySpec criteria,
                            boolean onlyOtherSide,
                            Enumeration services)
                     throws FederationServicesException,
                            WTException
Returns objects associated with the specified source object in the specified list of services given a role and selection critieria. Returns only the associated objects themselves, if specified. Otherwise, returns both the associated objects as well as the link objects that associate them with the source object.

Supported API: false

Specified by:
navigate in interface FederationService
Parameters:
obj - the object for which associated objects are to be returned.
role - the role played in the association by the objects being sought.
criteria - the selection criteria specifying the type of association.
onlyOtherSide - true if only associated objects should be returned, and false if link objects should be returned too.
services - an enumeration of the service objects for the services to be queried.
Returns:
QueryResult
Throws:
FederationServicesException
WTException

retrieveInfoEngineObjects

public Vector retrieveInfoEngineObjects(String url)
                                 throws FederationServicesException,
                                        WTException
Sends a request to Info*Engine to retrieve objects associated with the specified URL.

Supported API: true

Specified by:
retrieveInfoEngineObjects in interface FederationService
Parameters:
url - the URL identifying the objects to be retrieved.
Returns:
Vector
Throws:
FederationServicesException
WTException

storeProxy

public Federated storeProxy(Federated proxy)
                     throws FederationServicesException,
                            WTException
Stores a proxy object in the persistent data service.

Supported API: true

Specified by:
storeProxy in interface FederationService
Parameters:
proxy - the object to be persisted.
Returns:
Federated
Throws:
FederationServicesException
WTException

syncObjects

public void syncObjects(Externalizable source,
                        Externalizable target)
                 throws FederationServicesException,
                        WTException
Copies the properties of a specified source object to a target object.

Supported API: true

Specified by:
syncObjects in interface FederationService
Parameters:
source - the source object.
target - the target object.
Throws:
FederationServicesException
WTException

storeUfid

public void storeUfid(Federatable object,
                      String remoteId,
                      String location)
               throws UfidException,
                      WTException,
                      IEException
Stores a ufid for the given Federatable. The Federatable argument must be already persisted.

Supported API: false

Specified by:
storeUfid in interface FederationService
Parameters:
object -
remoteId - The unique identifier of the object on the remote system. For an object that resides in an LDAP directory, this will be something like "uid=fred".
location - Represents the name of the repository managing the Federatable. For an object managed by a JNDI adapter, the value of location should be the name of the adapter.
Throws:
UfidException
WTException
IEException

getUfid

public Ufid getUfid(Federatable object)
             throws WTException
Retrieves the ufid for the Federatable object.

Supported API: false

Specified by:
getUfid in interface FederationService
Parameters:
object -
Returns:
Ufid
Throws:
WTException

getLocalObject

public Federatable getLocalObject(String remoteObjId,
                                  String repositoryName)
                           throws WTException
Retrieves the local object with the given remote object identifier in the given repository. Returns null if there is no persisted local object.

Supported API: false

Specified by:
getLocalObject in interface FederationService
Parameters:
remoteObjId - The unique identifier of the object on the remote system. For principal objects in an LDAP directory, the value of the remobeObjId will be something like "cn=fred".
repositoryName - The name of the repository where the remote object is managed.
Returns:
Federatable
Throws:
WTException

checkFreshness

public Persistable checkFreshness(Persistable obj)
                           throws FederationServicesException
Determines whether the specified object is an expired or stale proxy. Refreshes it immediately if it is an expired proxy. Enqueues a request to refresh the object if it is a stale but not expired proxy. Otherwise, returns the object as is.

Supported API: true

Specified by:
checkFreshness in interface FederationServiceSvr
Parameters:
obj - the object to be checked.
Returns:
Persistable
Throws:
FederationServicesException

checkFreshness

public QueryResult checkFreshness(QueryResult qr)
                           throws FederationServicesException
Traverses a QueryResult and determines whether any of the objects contained within it are expired or stale proxies. Refreshes all expired proxies immediately, and enqueues requests to refresh stale ones that haven't expired.

Supported API: true

Specified by:
checkFreshness in interface FederationServiceSvr
Parameters:
qr - the QueryResult to be checked.
Returns:
QueryResult
Throws:
FederationServicesException

enqueueRefreshRequest

protected void enqueueRefreshRequest(Federated proxy)
                              throws FederationServicesException
Enqueues a request to refresh a proxy object.

Supported API: false

Parameters:
proxy - the proxy object to be refreshed.
Throws:
FederationServicesException

executeHTTPRequest

public InputStream executeHTTPRequest(String method,
                                      String urlString,
                                      String payload)
                               throws FederationServicesException
Executes a specified HTTP request against a specified resource and returns the HTTP response.

Supported API: false

Specified by:
executeHTTPRequest in interface FederationServiceSvr
Parameters:
method - HTTP request method (GET, POST, PUT, etc.).
urlString - URL of the target resource.
payload - encoded request payload (POST/PUT), null if no payload.
Returns:
InputStream
Throws:
FederationServicesException

executeHTTPRequest

public InputStream executeHTTPRequest(String method,
                                      String urlString,
                                      String contentType,
                                      byte[] payload)
                               throws FederationServicesException
Executes a specified HTTP request against a specified resource and returns the HTTP response.

Supported API: false

Specified by:
executeHTTPRequest in interface FederationServiceSvr
Parameters:
method - HTTP request method (GET, POST, PUT, etc.).
urlString - URL of the target resource.
contentType - String stating what is the content-type of the payload.
payload - encoded request payload (POST/PUT), null if no payload.
Returns:
InputStream
Throws:
FederationServicesException

getAllServiceObjects

public QueryResult getAllServiceObjects()
                                 throws FederationServicesException
Returns an enumeration of all known FederatedService objects.

Supported API: false

Specified by:
getAllServiceObjects in interface FederationServiceSvr
Returns:
QueryResult
Throws:
FederationServicesException

getFederationProperties

public Properties getFederationProperties()
Get a properties object that contains properties from the federation properties file. The federation properties file contains server specific properties that provide information such as login names and credentials used in connecting to Info*Engine servers and LDAP-accessible directory services. By default, no such property file is defined.

Supported API: false

Specified by:
getFederationProperties in interface FederationServiceSvr
Returns:
Properties

getFeedbackSpec

public FeedbackSpec getFeedbackSpec()
                             throws FederationServicesException
Returns the feedback specification object associated with the method context. This is the feedback specification object specified on the call to the doAction() method.

Supported API: false

Specified by:
getFeedbackSpec in interface FederationServiceSvr
Returns:
FeedbackSpec
Throws:
FederationServicesException

invokeInfoEngineTemplate

public InputStream invokeInfoEngineTemplate(String url)
                                     throws FederationServicesException
Sends a request to Info*Engine to execute the specified template.

Supported API: true

Specified by:
invokeInfoEngineTemplate in interface FederationServiceSvr
Parameters:
url - the URL identifying the template to be executed.
Returns:
InputStream
Throws:
FederationServicesException

invokeInfoEngineTemplate

public InputStream invokeInfoEngineTemplate(String url,
                                            Hashtable params)
                                     throws FederationServicesException
Sends a request to Info*Engine to execute the specified template, optionally providing parameters in URL-encoded form data.

Supported API: true

Specified by:
invokeInfoEngineTemplate in interface FederationServiceSvr
Parameters:
url - the URL identifying the template to be executed.
params - Hashtable of parameters to be sent as form data.
Returns:
InputStream
Throws:
FederationServicesException

refresh

public void refresh(Federated proxy)
             throws FederationServicesException
Refreshes the properties of a proxy object.

Supported API: true

Specified by:
refresh in interface FederationServiceSvr
Parameters:
proxy - the proxy object to be refreshed.
Throws:
FederationServicesException

refreshIfStale

public void refreshIfStale(Federated proxy)
                    throws FederationServicesException
Refreshes the properties of a proxy object, but only if the object is stale.

Supported API: true

Specified by:
refreshIfStale in interface FederationServiceSvr
Parameters:
proxy - the proxy object to be refreshed.
Throws:
FederationServicesException

sendFeedback

public void sendFeedback(MethodFeedback feedbackObject)
                  throws FederationServicesException
Sends Feedback objects to the client.

Supported API: true

Specified by:
sendFeedback in interface FederationServiceSvr
Parameters:
feedbackObject - Required. The feedback object to be sent to the client.
Throws:
FederationServicesException

getAuthorization

private static String getAuthorization(URL url)
                                throws WTException
Get the authorization string that allows the user to access a specified URL.

Parameters:
url - URL for which authorization information is requested
Returns:
String the authorization string, or null if none available
Throws:
WTException

getDefaultAuthorization

private static String getDefaultAuthorization(String realm)
                                       throws WTException
Get the default authorization string that allows the user to access a specified URL.

Parameters:
realm - the Host name connecting to
Returns:
String the authorization string, or null if none available
Throws:
WTException

findPersistables

private static ObjectVector findPersistables(ObjectVector objectVector)
                                      throws FederationServicesException
Throws:
FederationServicesException

getServiceObjects

public QueryResult getServiceObjects(String[] serviceNames)
                              throws FederationServicesException
Returns an enumeration of the service objects associated with the specified service names.

Supported API: false

Parameters:
serviceNames - the names of the federated services to be returned.
Returns:
QueryResult enumeration of service objects
Throws:
FederationServicesException

initInfoEngineProperties

public static void initInfoEngineProperties()
                                     throws Exception
Throws:
Exception

setInfoEngineProperties

public static void setInfoEngineProperties()
This method sets Info*Engine properties in the System properties object. It is called at service startup time to initialize the property values, and it can also be called to re-establish them later (e.g., when a property update event occurs).


commandDelegateFeedbackHandler

public static void commandDelegateFeedbackHandler(Group eventMessageData)