wt.federation
Class FederationHelper

java.lang.Object
  extended by wt.federation.FederationHelper
All Implemented Interfaces:
Externalizable, Serializable

public class FederationHelper
extends Object
implements Externalizable

FederationHelper provides client invokable methods to federation services. These methods are executed on the client side. It also provides access to the methods of the FederationService interface.

Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
static void appendNewElements(QueryResult qr1, QueryResult qr2)
          Appends new elements from one QueryResult to another QueryResult.
static com.infoengine.object.factory.Group doAction(String action, Object[][] argv)
          Executes one or more Info*Engine tasks selected by a specific logical action name, and the types and physical locations of a specific set of objects passed as parameters.
static com.infoengine.object.factory.Group doAction(String action, Object[][] argv, FeedbackSpec feedbackSpec)
          Executes one or more Info*Engine tasks selected by a specific logical action name, and the types and physical locations of a specific set of objects passed as parameters.
static String encodeBase64(byte[] octets)
          Returns a Base64 encoding of the specified array of octets.
static boolean haveSameSource(Object object1, Object object2)
          Returns true if two objects are proxies referencing the same source object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

appendNewElements

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

Supported API: true

Parameters:
qr1 - the query result to append another query result to.
qr2 - the query result to be appended.
Throws:
wt.federation.FederationServicesException

doAction

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

Supported API: true

Parameters:
action - Required. The name of the action to perform on the input object(s).
argv - Required. Variable argument list. The format is an array of arrays, each containing a Name, Value pair. The Name is the argument name and must be a String type. The Value is the argument value. Values can be of type:
  • com.ptc.core.meta.type.common.TypeInstance or TypeInstance[],
  • com.infoengine.object.factory.Element or Element[],
  • com.infoengine.object.factory.Group,
  • java.lang.Boolean, Byte, Character, Double, Float, Integer, Long, Short, or String.

At least one argument name, value pair must be specified and at least one argument value must be of type TypeInstance (or TypeInstance[]), Element (or Element[]), or Group.

An example of three input values would look like:
Object[][] argv = { {"arg1Name", arg1Value}, {"arg2Name", arg2Value}, {"arg3Name", arg3Value} };

Returns:
Group
Throws:
WTException

doAction

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

Supported API: true

Parameters:
action - Required. The name of the action to perform on the input object(s).
argv - Required. Variable argument list. The format is an array of arrays, each containing a Name, Value pair. The Name is the argument name and must be a String type. The Value is the argument value. Values can be of type:
  • com.ptc.core.meta.type.common.TypeInstance or TypeInstance[],
  • com.infoengine.object.factory.Element or Element[],
  • com.infoengine.object.factory.Group,
  • java.lang.Boolean, Byte, Character, Double, Float, Integer, Long, Short, or String.

At least one argument name, value pair must be specified and at least one argument value must be of type TypeInstance (or TypeInstance[]), Element (or Element[]), or Group.

An example of three input values would look like:
Object[][] argv = { {"arg1Name", arg1Value}, {"arg2Name", arg2Value}, {"arg3Name", arg3Value} };

feedbackSpec - The feedback specification object. If there is no feedback specification, specify null.
Returns:
Group
Throws:
WTException

encodeBase64

public static String encodeBase64(byte[] octets)
Returns a Base64 encoding of the specified array of octets.

Supported API: true

Parameters:
octets - array of octets to encode.
Returns:
String

haveSameSource

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

Supported API: true

Parameters:
object1 - the first object.
object2 - the second object.
Returns:
boolean
Throws:
wt.federation.FederationServicesException