wt.federation
Interface FederationServiceSvr

All Known Implementing Classes:
StandardFederationService

public interface FederationServiceSvr

FederationServiceSvr provides methods to federation services that can only be invoked from classes running on the server. These methods are executed on the server side.

Supported API: true

Extendable: false


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.
 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 getAllServiceObjects()
          Returns an enumeration of all known FederatedService objects.
 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.
 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.
 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.
 void sendFeedback(MethodFeedback feedbackObject)
          Sends Feedback objects to the client.
 

Method Detail

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

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

Parameters:
qr - the QueryResult to be checked.
Returns:
QueryResult
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

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

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

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

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

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

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

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

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

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

Parameters:
feedbackObject - Required. The feedback object to be sent to the client.
Throws:
FederationServicesException