wt.federation
Interface FederationService

All Known Implementing Classes:
FederationServiceFwd, StandardFederationService

public interface FederationService

FederationService provides client invokable methods to federation services. These methods are executed on the server side.

Supported API: true

Extendable: false


Method Summary
 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.
 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.
 String[] getAllServices()
          Returns an array of the names of all known federated services.
 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.
 Ufid getUfid(Federatable object)
          Retrieves the ufid for the Federatable object.
 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.
 Vector retrieveInfoEngineObjects(String url)
          Sends a request to Info*Engine to retrieve objects associated with the specified URL.
 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.
 

Method Detail

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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