Package wt.federation

Class FederationUtilities

java.lang.Object
wt.federation.FederationUtilities
All Implemented Interfaces:
RemoteAccess

public class FederationUtilities extends Object implements RemoteAccess
FederationUtilities provides class methods that perform utility functions supporting the Federation subsystem.

Supported API: true
  • Method Details

    • getFederatedSubclass

      public static Class getFederatedSubclass(Class objectClass) throws FederationServicesException
      Deprecated.
      See FederationServerHelper.
      Find a subclass of the specified class that implements the Federated interface.

      Supported API: true
      Parameters:
      objectClass - class for which to find a Federated subclass
      Returns:
      Class Federated subclass, or objectClass if no Federated subclass found
      Throws:
      FederationServicesException
    • presetRevisionControlled

      public static void presetRevisionControlled(RevisionControlled proxy) throws FederationServicesException
      Deprecated.
      Initialize the properties of a proxy object that is a subclass of wt.enterprise.RevisionControlled.

      Supported API: true
      Parameters:
      proxy - object to be initialized
      Throws:
      FederationServicesException
    • refresh

      public static void refresh(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Refresh the properties of a proxy object.

      Supported API: true
      Parameters:
      proxy - object to be refreshed
      Throws:
      FederationServicesException
    • initializeProxy

      public static void initializeProxy(Federated proxy, FederatedService service) throws FederationServicesException
      Deprecated.
      See FederationServerHelper.
      Initialize the properties of a proxy object that control expiration and refreshing.

      Supported API: true
      Parameters:
      proxy - the proxy object to be initialized
      service - the FederatedService that maintains the proxy
      Throws:
      FederationServicesException
    • refreshProxy

      public static void refreshProxy(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Refresh a proxy object by calling its refresh method.

      Supported API: true
      Parameters:
      proxy - the proxy object to be refreshed
      Throws:
      FederationServicesException
    • refreshProxy

      public static void refreshProxy(ObjectIdentifier oid) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Refresh a proxy object by calling its refresh method.

      Supported API: true
      Parameters:
      oid - ObjectIdentifier of the proxy object to be refreshed
      Throws:
      FederationServicesException
    • syncObjects

      public static void syncObjects(Externalizable source, Externalizable target) throws FederationServicesException
      Deprecated.
      See FederationService.
      Copy the properties of a specified source object to a target object.

      Supported API: true
      Parameters:
      source - object from which to get new attribute values
      target - object to be updated
      Throws:
      FederationServicesException
    • hasExpired

      public static boolean hasExpired(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationServerHelper.
      Return true if a specified proxy object has expired.

      Supported API: true
      Parameters:
      proxy - object to be tested for expiration
      Returns:
      boolean true if object has expired
      Throws:
      FederationServicesException
    • isStale

      public static boolean isStale(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationServerHelper.
      Return true if a specified proxy object is stale.

      Supported API: true
      Parameters:
      proxy - object to be tested for staleness
      Returns:
      boolean true if object is stale
      Throws:
      FederationServicesException
    • refreshIfStale

      public static void refreshIfStale(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Refresh the properties of a proxy object, but only if the object is stale.

      Supported API: true
      Parameters:
      proxy - object to be refreshed
      Throws:
      FederationServicesException
    • enqueueRefreshRequest

      public static void enqueueRefreshRequest(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Enqueue a request to refresh a proxy object.

      Supported API: true
      Parameters:
      proxy - object to be refreshed
      Throws:
      FederationServicesException
    • checkFreshness

      public static Persistable checkFreshness(Persistable obj) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Determine whether a specified object is an expired or stale proxy. If it has expired, refresh it immediately. If it is stale but not expired, enqueue a request to refresh it. Otherwise, return it as is.

      Supported API: true
      Parameters:
      obj - object to be checked
      Throws:
      FederationServicesException
    • checkFreshness

      public static QueryResult checkFreshness(QueryResult qr) throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Traverse a QueryResult and determine whether any of the objects contained within it are expired or stale proxies. Refresh all expired proxies immediately, and enqueue requests to refresh stale ones that haven't expired.

      Supported API: true
      Parameters:
      qr - QueryResult to be checked
      Throws:
      FederationServicesException
    • getService

      public static FederatedService getService(Federated proxy) throws FederationServicesException
      Deprecated.
      See FederationService.
      Return an instance of the FederatedService object referenced by a specified proxy object.

      Supported API: true
      Parameters:
      proxy - the proxy object from which to get the service object
      Returns:
      FederatedService an instance of the referenced service object
      Throws:
      FederationServicesException
    • getActionURL

      public static String getActionURL(FederatedService service, String key, Hashtable arguments)
      Deprecated.
      See FederationHelper.
      Substitutes arguments into a URL template of a specified service and returns the resulting URL string. The URL template is selected by a specified key into the URL template table of the service.

      Supported API: true
      Parameters:
      service - FederatedService object
      key - URL template key
      arguments - arguments to be substituted into template
      Returns:
      String resulting URL string, null if key does not select a template
    • haveSameSource

      public static boolean haveSameSource(Object object1, Object object2) throws FederationServicesException
      Deprecated.
      See FederationHelper.
      Returns true if two objects are proxies referencing the same source object.

      Supported API: true
      Parameters:
      object1 - an object
      object2 - another object
      Returns:
      boolean true if the two objects reference the same source object
      Throws:
      FederationServicesException
    • appendNewElements

      public static void appendNewElements(QueryResult qr1, QueryResult qr2) throws FederationServicesException
      Deprecated.
      See FederationHelper.
      Appends new elements from one QueryResult to another QueryResult.

      Supported API: true
      Parameters:
      qr1 - a QueryResult
      qr2 - another QueryResult
      Throws:
      FederationServicesException
    • retrieveInfoEngineObjects

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

      Supported API: true
      Parameters:
      url - URL identifying the target object(s)
      Returns:
      Vector the vector of specified objects
      Throws:
      FederationServicesException
      WTException
    • getSourceInputStream

      public static InputStream getSourceInputStream(Federated proxy) throws FederationServicesException, WTException
      Deprecated.
      Returns an input stream containing the XML representation of the remote source object associated with a specified proxy object.

      Supported API: true
      Parameters:
      proxy - the proxy object from which to get an XML stream
      Returns:
      InputStream the XML stream
      Throws:
      FederationServicesException
      WTException
    • getQueryableServices

      public static QueryResult getQueryableServices(Class objectClass) throws FederationServicesException
      Deprecated.
      See FederationService.
      Return enumeration of service objects that support querying a specified class.

      Supported API: true
      Parameters:
      objectClass - class for which querying is desired
      Returns:
      QueryResult enumeration of service objects that can query the class
      Throws:
      FederationServicesException
    • getNavigableServices

      public static QueryResult getNavigableServices(Class linkClass) throws FederationServicesException
      Deprecated.
      See FederationService.
      Return enumeration of service objects that support navigating a specified link class.

      Supported API: true
      Parameters:
      linkClass - class for which navigation is desired
      Returns:
      QueryResult enumeration of service objects that can navigate the class
      Throws:
      FederationServicesException
    • getAllServices

      public static QueryResult getAllServices() throws FederationServicesException
      Deprecated.
      See FederationServiceSvr.
      Return enumeration of all known FederatedService objects.

      Supported API: true
      Returns:
      QueryResult enumeration of all known service objects
      Throws:
      FederationServicesException
    • findUser

      public static QueryResult findUser(String name) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to all FederatedServices to find an entry for a specified user within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      name - the name of the user for which to find an entry
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findUser

      public static QueryResult findUser(String name, Enumeration services) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to a specified set of services to find an entry for a specified user within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      name - the name of the user for which to find an entry
      services - Enumeration of FederatedService objects to use
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findUser

      public static QueryResult findUser(String attr_name, String attr_value) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to all FederatedServices to find an entry for a specified user within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      attr_name - the name of the attribute used as the key in the query
      attr_value - the value of the attribute used as the key in the query
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findUser

      public static QueryResult findUser(String attr_name, String attr_value, Enumeration services) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to a specified set of services to find an entry for a specified user within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      attr_name - the name of the attribute used as the key in the query
      attr_value - the value of the attribute used as the key in the query
      services - Enumeration of FederatedService objects to use
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findAllUsers

      public static QueryResult findAllUsers() throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to all FederatedServices to find entries for all users within the local domain, and return the merged set of results.

      Supported API: true
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findAllUsers

      public static QueryResult findAllUsers(Enumeration services) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to a specified set of services to find entries for all users within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      services - Enumeration of FederatedService objects to use
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findLikeUsers

      public static QueryResult findLikeUsers(String attr_name, String attr_value) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to all FederatedServices to find entries like a specified user within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      attr_name - the name of the attribute used as the key in the query
      attr_value - the value of the attribute used as the key in the query
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findLikeUsers

      public static QueryResult findLikeUsers(String attr_name, String filter, Enumeration services) throws FederationServicesException
      Deprecated.
      See wt.org package.
      Send a query to a specified set of services to find entries like a specified user within the local domain, and return the merged set of results.

      Supported API: true
      Parameters:
      attr_name - the name of the attribute used as the key in the query
      filter - the value of the attribute used as the key in the query
      services - Enumeration of FederatedService objects to use
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findObjects

      public static QueryResult findObjects(QuerySpec qs) throws FederationServicesException
      Deprecated.
      See FederationService.
      Send a query to all FederatedServices, and return the merged set of results.

      Supported API: true
      Parameters:
      qs - QuerySpec defining the query to make
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findObjects

      public static QueryResult findObjects(QuerySpec qs, Enumeration services) throws FederationServicesException
      Deprecated.
      See FederationService.
      Send a query to a specified set of services, and return the merged set of results.

      Supported API: true
      Parameters:
      qs - QuerySpec defining the query to make
      services - Enumeration of FederatedService objects to use
      Returns:
      QueryResult enumeration of matching objects
      Throws:
      FederationServicesException
    • findObjects

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

      Supported API: true
      Parameters:
      targetLinkClass - object class defining association type
      obj1 - first object
      obj1Role - role played by first object in association
      obj2 - second object
      Returns:
      QueryResult merged set of query results
      Throws:
      FederationServicesException
    • findObjects

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

      Supported API: true
      Parameters:
      targetLinkClass - object class defining association type
      obj1 - first object
      obj1Role - role played by first object in association
      obj2 - second object
      services - set of services to query
      Returns:
      QueryResult merged set of query results
      Throws:
      FederationServicesException
    • retrieveSourceContents

      public static Vector retrieveSourceContents(String sourceObjectId, FederatedService service) throws FederationServicesException
      Deprecated.
      Return content items related to the specified source object and service.

      Supported API: true
      Parameters:
      sourceObjectId - the object for which to find content items
      service - the service containing the source object
      Returns:
      Vector the URLData objects containing the content items related to the source object
      Throws:
      FederationServicesException
    • decodeURLString

      public static String decodeURLString(String encoded)
      Deprecated.
      See wt.httpgw.WTURLEncoder.
      Decode a URL-encoded string.

      Supported API: true
      Parameters:
      encoded - a URL-encoded string
      Returns:
      String the decoded result
    • encodeURLString

      public static String encodeURLString(String s)
      Deprecated.
      See wt.httpgw.WTURLEncoder.
      URL-encode a string.

      Supported API: true
      Parameters:
      s - a string
      Returns:
      String the encoded result
    • encodeURLString

      public static String encodeURLString(String s, String specials)
      Deprecated.
      See wt.httpgw.WTURLEncoder.
      URL-encode a string.

      Supported API: true
      Parameters:
      s - a string
      specials - the set of characters that need encoding
      Returns:
      String the encoded result
    • encodeBase64

      public static String encodeBase64(byte[] octets)
      Deprecated.
      See FederationHelper.
      Create a Base64 encoding of a specified array of octets.

      Supported API: true
      Parameters:
      octets - array of octets to encode
      Returns:
      String the Base64-encoded result