wt.federation
Class FederationUtilities

java.lang.Object
  extended bywt.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.


Field Summary
private static String AUTH_PROPERTY_PREFIX
           
private static String CLASSNAME
           
private static Hashtable credentialsCache
           
private static String defaultDomain
           
private static String defaultFolder
           
private static String defaultIndexer
           
private static String defaultLifeCycleName
           
private static String defaultOwner
           
private static String defaultTeamTemplate
           
private static String FC_RESOURCE
           
private static String hexDigits
           
static String LDAP_SPECIAL_CHARS_DN
           
static String LDAP_SPECIAL_CHARS_FILTER
           
private static long proxyRefreshQueueInterval
           
private static String proxyRefreshQueueName
           
static String queueInterlock
           
private static String RESOURCE
           
private static String SAXDriver
           
(package private) static boolean SERVER
           
private static Hashtable subclassCache
           
private static String urlSpecials
           
private static String userDomainQualifier
           
private static boolean VERBOSE
           
private static String versionID
           
 
Constructor Summary
FederationUtilities()
           
 
Method Summary
static void appendNewElements(QueryResult qr1, QueryResult qr2)
          Deprecated. See FederationHelper.
static Persistable checkFreshness(Persistable obj)
          Deprecated. See FederationServiceSvr.
static QueryResult checkFreshness(QueryResult qr)
          Deprecated. See FederationServiceSvr.
static String decodeURLString(String encoded)
          Deprecated. See wt.httpgw.WTURLEncoder.
static String encodeBase64(byte[] octets)
          Deprecated. See FederationHelper.
static String encodeURLString(String s)
          Deprecated. See wt.httpgw.WTURLEncoder.
static String encodeURLString(String s, String specials)
          Deprecated. See wt.httpgw.WTURLEncoder.
static void enqueueRefreshRequest(Federated proxy)
          Deprecated. See FederationServiceSvr.
static String escapeDn(String dnComponent)
           
static String escapeFilter(String criteria)
           
static FederatedHttpResponse executeHTTPRequest(String method, String urlString, FederatedHttpBodyPart payload)
          Deprecated. See FederationServiceSvr.
static QueryResult findAllUsers()
          Deprecated. See wt.org package.
static QueryResult findAllUsers(Enumeration services)
          Deprecated. See wt.org package.
static QueryResult findLikeUsers(String attr_name, String attr_value)
          Deprecated. See wt.org package.
static QueryResult findLikeUsers(String attr_name, String filter, Enumeration services)
          Deprecated. See wt.org package.
static QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2)
          Deprecated. See FederationService.
static QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2, Enumeration services)
          Deprecated. See FederationService.
static QueryResult findObjects(QuerySpec qs)
          Deprecated. See FederationService.
static QueryResult findObjects(QuerySpec qs, Enumeration services)
          Deprecated. See FederationService.
static QueryResult findUser(String name)
          Deprecated. See wt.org package.
static QueryResult findUser(String name, Enumeration services)
          Deprecated. See wt.org package.
static QueryResult findUser(String attr_name, String attr_value)
          Deprecated. See wt.org package.
static QueryResult findUser(String attr_name, String attr_value, Enumeration services)
          Deprecated. See wt.org package.
static String getActionURL(FederatedService service, String key, Hashtable arguments)
          Deprecated. See FederationHelper.
static QueryResult getAllServices()
          Deprecated. See FederationServiceSvr.
private static String getAuthorization(URL url, String challenge, boolean bypassCache)
          Get the authorization string that allows the user to access a specified URL.
private static String getDefaultAuthorization(Hashtable challengeParams)
          Get the default authorization string that allows the user to access a specified URL.
static Class getFederatedSubclass(Class objectClass)
          Deprecated. See FederationServerHelper.
static QueryResult getNavigableServices(Class linkClass)
          Deprecated. See FederationService.
static Persistable getPersistentInstance(Federated proxy)
           
static QueryResult getQueryableServices(Class objectClass)
          Deprecated. See FederationService.
static FederatedService getService(Federated proxy)
          Deprecated. See FederationService.
static InputStream getSourceInputStream(Federated proxy)
          Deprecated.  
static boolean hasExpired(Federated proxy)
          Deprecated. See FederationServerHelper.
static boolean haveSameSource(Object object1, Object object2)
          Deprecated. See FederationHelper.
static int indexOfFirstDNSeparator(String distinguishedName)
          Returns the index of the the first ',' character in an LDAP DN string that isn't escaped (e.g., isn't preceded by a '\' character).
static void initializeProxy(Federated proxy, FederatedService service)
          Deprecated. See FederationServerHelper.
static InputStream invokeInfoEngineTemplate(String url)
          Deprecated. See FederationServiceSvr.
static InputStream invokeInfoEngineTemplate(String url, Hashtable params)
          Deprecated. See FederationServiceSvr.
static boolean isStale(Federated proxy)
          Deprecated. See FederationServerHelper.
static QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide)
          Deprecated. See FederationService.
static QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide, Enumeration services)
          Deprecated. See FederationService.
static QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide)
          Deprecated. See FederationService.
static QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide, Enumeration services)
          Deprecated. See FederationService.
private static Hashtable parseHTTPChallenge(String challenge)
          Parse an HTTP authorization challenge, and return a Hashtable that provides the challenge parameters.
static void presetRevisionControlled(RevisionControlled proxy)
          Deprecated.  
static void refresh(Federated proxy)
          Deprecated. See FederationServiceSvr.
static void refreshIfStale(Federated proxy)
          Deprecated. See FederationServiceSvr.
static void refreshProxy(Federated proxy)
          Deprecated. See FederationServiceSvr.
static void refreshProxy(ObjectIdentifier oid)
          Deprecated. See FederationServiceSvr.
static void refreshProxyVector(ObjectVector ov)
          Deprecated.  
static Vector retrieveInfoEngineObjects(String url)
          Deprecated. See FederationService.
static Vector retrieveSourceContents(String sourceObjectId, FederatedService service)
          Deprecated.  
static Federated storeProxy(Federated proxy)
          Deprecated. See FederationService.
static void syncObjects(Externalizable source, Externalizable target)
          Deprecated. See FederationService.
static String unescapeDn(String dnComponent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionID

private static final String versionID
See Also:
Constant Field Values

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

AUTH_PROPERTY_PREFIX

private static final String AUTH_PROPERTY_PREFIX
See Also:
Constant Field Values

credentialsCache

private static Hashtable credentialsCache

defaultDomain

private static String defaultDomain

defaultFolder

private static String defaultFolder

defaultIndexer

private static String defaultIndexer

defaultLifeCycleName

private static String defaultLifeCycleName

defaultOwner

private static String defaultOwner

defaultTeamTemplate

private static String defaultTeamTemplate

proxyRefreshQueueInterval

private static long proxyRefreshQueueInterval

proxyRefreshQueueName

private static String proxyRefreshQueueName

SAXDriver

private static String SAXDriver

subclassCache

private static Hashtable subclassCache

userDomainQualifier

private static String userDomainQualifier

VERBOSE

private static boolean VERBOSE

urlSpecials

private static final String urlSpecials
See Also:
Constant Field Values

LDAP_SPECIAL_CHARS_DN

public static final String LDAP_SPECIAL_CHARS_DN
See Also:
Constant Field Values

LDAP_SPECIAL_CHARS_FILTER

public static final String LDAP_SPECIAL_CHARS_FILTER
See Also:
Constant Field Values

hexDigits

private static final String hexDigits
See Also:
Constant Field Values

SERVER

static final boolean SERVER

queueInterlock

public static String queueInterlock
Constructor Detail

FederationUtilities

public FederationUtilities()
Method Detail

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

refreshProxyVector

public static void refreshProxyVector(ObjectVector ov)
                               throws FederationServicesException
Deprecated.  

Refresh a vector of proxy objects.

Supported API: false

Parameters:
ov - ObjectVector containing the proxy objects 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

storeProxy

public static Federated storeProxy(Federated proxy)
                            throws FederationServicesException
Deprecated. See FederationService.

Store a proxy object in the persistent data service.

Parameters:
proxy - the object to make persistent
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

invokeInfoEngineTemplate

public static InputStream invokeInfoEngineTemplate(String url)
                                            throws FederationServicesException,
                                                   WTException
Deprecated. See FederationServiceSvr.

Sends a request to Info*Engine to execute a specified template.

Supported API: false

Parameters:
url - URL identifying the template to be executed
Returns:
InputStream the result produced by the template
Throws:
FederationServicesException
WTException

invokeInfoEngineTemplate

public static InputStream invokeInfoEngineTemplate(String url,
                                                   Hashtable params)
                                            throws FederationServicesException,
                                                   WTException
Deprecated. See FederationServiceSvr.

Sends a request to Info*Engine to execute a specified template, optionally providing parameters in URL-encoded form data.

Supported API: false

Parameters:
url - URL identifying the template to be executed
params - Hashtable of parameters to be sent as form data
Returns:
InputStream the result produced by the template
Throws:
FederationServicesException
WTException

executeHTTPRequest

public static FederatedHttpResponse executeHTTPRequest(String method,
                                                       String urlString,
                                                       FederatedHttpBodyPart payload)
                                                throws FederationServicesException,
                                                       WTException
Deprecated. See FederationServiceSvr.

Executes a specified HTTP request against a specified resource and returns the HTTP response.

Supported API: false

Parameters:
method - HTTP request method (GET, POST, PUT, etc.)
urlString - URL of the target resource
payload - request payload (POST/PUT), null if no payload
Returns:
FederatedHttpResponse
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

navigate

public static QueryResult navigate(Persistable obj,
                                   String role,
                                   Class linkClass,
                                   boolean onlyOtherSide)
                            throws FederationServicesException
Deprecated. See FederationService.

Return objects related to the specified source object in all known services 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

Parameters:
obj - the object for which associated objects are being sought
role - the role played in the association by the objects being sought
linkClass - the class defining the type of association
onlyOtherSide - true if the result set should include the the associated objects only, false if the result set should include link objects too
Returns:
QueryResult the merged set of results
Throws:
FederationServicesException

navigate

public static QueryResult navigate(Persistable obj,
                                   String role,
                                   Class linkClass,
                                   boolean onlyOtherSide,
                                   Enumeration services)
                            throws FederationServicesException
Deprecated. See FederationService.

Return objects related to the specified source object in a specified set of services 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

Parameters:
obj - the object for which associated objects are being sought
role - the role played in the association by the objects being sought
linkClass - the class defining the type of association
onlyOtherSide - true if the result set should include the the associated objects only, false if the result set should include link objects too
services - the set of services to query
Returns:
QueryResult the merged set of results
Throws:
FederationServicesException

navigate

public static QueryResult navigate(Persistable obj,
                                   String role,
                                   QuerySpec criteria,
                                   boolean onlyOtherSide)
                            throws FederationServicesException
Deprecated. See FederationService.

Return objects related to the specified source object in all known services 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

Parameters:
obj - the object for which to find associated objects
role - the role played in the association by the objects being sought
criteria - the criteria specifying the type of association
onlyOtherSide - true if associated objects only should be returned, false if link objects should be returned too
Returns:
QueryResult the merged set of results
Throws:
FederationServicesException

navigate

public static QueryResult navigate(Persistable obj,
                                   String role,
                                   QuerySpec criteria,
                                   boolean onlyOtherSide,
                                   Enumeration services)
                            throws FederationServicesException
Deprecated. See FederationService.

Return objects related to the specified source object in a specified set of services 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

Parameters:
obj - the object for which to find associated objects
role - the role played in the association by the objects being sought
criteria - the criteria specifying the type of association
onlyOtherSide - true if associated objects only should be returned, false if link objects should be returned too
services - the set of services to query
Returns:
QueryResult the merged set of 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

getPersistentInstance

public static Persistable getPersistentInstance(Federated proxy)
                                         throws FederationServicesException
Throws:
FederationServicesException

getAuthorization

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

Parameters:
url - URL for which authorization information is requested
challenge - HTTP authorization challenge sent by web server
bypassCache - true if cached information should be ignored
Returns:
String the authorization string, or null if none available
Throws:
WTException

getDefaultAuthorization

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

Parameters:
challengeParams - Hashtable of HTTP authorization challenge parameters
Returns:
String the authorization string, or null if none available
Throws:
WTException

parseHTTPChallenge

private static Hashtable parseHTTPChallenge(String challenge)
                                     throws WTException
Parse an HTTP authorization challenge, and return a Hashtable that provides the challenge parameters.

Parameters:
challenge - HTTP authorization challenge string
Returns:
Hashtable table containing parsed parameters of challenge
Throws:
WTException

escapeDn

public static String escapeDn(String dnComponent)

unescapeDn

public static String unescapeDn(String dnComponent)

escapeFilter

public static String escapeFilter(String criteria)

indexOfFirstDNSeparator

public static int indexOfFirstDNSeparator(String distinguishedName)
Returns the index of the the first ',' character in an LDAP DN string that isn't escaped (e.g., isn't preceded by a '\' character). This is assumed to be the comma separating the first RDN component from the rest of the DN components.

Parameters:
distinguishedName - An LDAP distinguished name (DN) string.
Returns:
int The index of the first ',' character found in the DN string that isn't escaped. If no unescaped comma is found in the string, -1 is returned.