WebLogic Process Integrator Version 2.0

com.bea.wlpi.common
Class ClassInvocationDescriptor

java.lang.Object
  |
  +--com.bea.wlpi.common.ClassInvocationDescriptor
All Implemented Interfaces:
Publishable, java.io.Serializable

public class ClassInvocationDescriptor
extends java.lang.Object
implements java.io.Serializable, Publishable

Describes and implements the invocation of a method in an arbitrary Java class. It is used to pass information on server-side classes to the client (where the class in question may not be accessible), and to instantiate such an object in the server and invoke a method thereon.

See Also:
ClassDescriptor, EJBDescriptor, EJBInvocationDescriptor, Serialized Form

Fields inherited from interface com.bea.wlpi.common.Publishable
BUSINESS_CALENDAR, BUSINESS_OPERATION, EVENT_KEY, ORG, ROLE, TEMPLATE, TEMPLATE_DEFINITION, USER, XML_REPOSITORY_ENTITY, XML_REPOSITORY_FOLDER
 
Constructor Summary
ClassInvocationDescriptor(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions)
          Create a new class invocation descriptor object.
ClassInvocationDescriptor(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions, boolean published)
          Create a new class invocation descriptor object.
 
Method Summary
 java.lang.Object clone()
          Clone a ClassInvocationDescriptor instance.
 java.lang.String getClassName()
          Return the fully qualified Java class name.
 MethodDescriptor getConstructor()
          Return meta-data for constructor to invoke.
 java.lang.String[] getConstructorParmsDescriptions()
          Return constructor parameter descriptions.
 java.lang.Object getContents()
          Return the publishable content.
 java.lang.String getDescription()
          Return a human-readable description of the method invocation.
 java.lang.String getEntryName()
          Return the display name for the publishable object.
 java.lang.String getId()
          Return the system-assigned unique identifier.
 MethodDescriptor getMethod()
          Return meta-data for method to invoke.
 java.lang.String[] getMethodParmsDescriptions()
          Return method parameter descriptions.
 java.lang.String getOwnerName()
          Return the name of the object's owner.
 int getType()
          Return the type of publishable object.
 java.lang.Object invoke(java.lang.Object[] constructorParameters, java.lang.Object[] methodParameters)
          Create an instance of the Java class; then, invoke a method on it.
 java.lang.Object invokeConstructor(java.lang.Object[] constructorParameters)
          Create an instance of the Java class.
 java.lang.Object invokeMethod(java.lang.Object obj, java.lang.Object[] methodParameters)
          Invoke the method specified by this descriptor on an object.
 boolean isPublished()
          Returns whether the object is published.
 void set(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions)
          Update a class invocation descriptor.
 void set(java.lang.String description, java.lang.String className, MethodDescriptor constructorDescriptor, java.lang.String[] constructorParmDescriptions, MethodDescriptor methodDescriptor, java.lang.String[] methodParmDescriptions, boolean published)
          Update a class invocation descriptor.
 void setId(java.lang.String id)
          Set the unique identifier.
 void setPublished()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassInvocationDescriptor

public ClassInvocationDescriptor(java.lang.String description,
                                 java.lang.String className,
                                 MethodDescriptor constructorDescriptor,
                                 java.lang.String[] constructorParmDescriptions,
                                 MethodDescriptor methodDescriptor,
                                 java.lang.String[] methodParmDescriptions)
Create a new class invocation descriptor object.
Parameters:
description - Human-readable description of the method invocation.
className - Fully qualified Java class name.
constructorDescriptor - Meta-data for constructor to invoke.
constructorParmDescriptions - Constructor parameter descriptions.
methodDescriptor - Meta-data for method to invoke.
methodParmDescriptions - Method parameter descriptions.

ClassInvocationDescriptor

public ClassInvocationDescriptor(java.lang.String description,
                                 java.lang.String className,
                                 MethodDescriptor constructorDescriptor,
                                 java.lang.String[] constructorParmDescriptions,
                                 MethodDescriptor methodDescriptor,
                                 java.lang.String[] methodParmDescriptions,
                                 boolean published)
Create a new class invocation descriptor object.
Parameters:
description - Human-readable description of the method invocation.
className - Fully qualified Java class name.
constructorDescriptor - Meta-data for constructor to invoke.
constructorParmDescriptions - Constructor parameter descriptions.
methodDescriptor - Meta-data for method to invoke.
methodParmDescriptions - Method parameter descriptions.
published -  
Since:
WebLogic Process Integrator 2.0
Method Detail

set

public void set(java.lang.String description,
                java.lang.String className,
                MethodDescriptor constructorDescriptor,
                java.lang.String[] constructorParmDescriptions,
                MethodDescriptor methodDescriptor,
                java.lang.String[] methodParmDescriptions)
Update a class invocation descriptor.
Parameters:
description - Human-readable description of the method invocation.
className - Fully qualified Java class name.
constructorDescriptor - Meta-data for constructor to invoke.
constructorParmDescriptions - Constructor parameter descriptions.
methodDescriptor - Meta-data for method to invoke.
methodParmDescriptions - Method parameter descriptions.

set

public void set(java.lang.String description,
                java.lang.String className,
                MethodDescriptor constructorDescriptor,
                java.lang.String[] constructorParmDescriptions,
                MethodDescriptor methodDescriptor,
                java.lang.String[] methodParmDescriptions,
                boolean published)
Update a class invocation descriptor.
Parameters:
description - Human-readable description of the method invocation.
className - Fully qualified Java class name.
constructorDescriptor - Meta-data for constructor to invoke.
constructorParmDescriptions - Constructor parameter descriptions.
methodDescriptor - Meta-data for method to invoke.
methodParmDescriptions - Method parameter descriptions.
published -  
Since:
WebLogic Process Integrator 2.0

clone

public java.lang.Object clone()
Clone a ClassInvocationDescriptor instance.
Overrides:
clone in class java.lang.Object
Returns:
a clone instance of ClassInvocationDescriptor.
Since:
WebLogic Process Integrator 2.0

getId

public final java.lang.String getId()
Return the system-assigned unique identifier.
Returns:
The system-assigned unique identifier.
See Also:
setId(java.lang.String)

isPublished

public boolean isPublished()
Description copied from interface: Publishable
Returns whether the object is published. Published objects cannot be modified.
Specified by:
isPublished in interface Publishable
Since:
WebLogic Process Integrator 2.0

setId

public void setId(java.lang.String id)
Set the unique identifier.
Parameters:
id - The unique identifier.
See Also:
getId()

getClassName

public final java.lang.String getClassName()
Return the fully qualified Java class name.
Returns:
The fully qualified Java class name.

getDescription

public final java.lang.String getDescription()
Return a human-readable description of the method invocation.
Returns:
Human-readable description of the method invocation.

getMethod

public final MethodDescriptor getMethod()
Return meta-data for method to invoke.
Returns:
Meta-data for method to invoke.

getConstructor

public final MethodDescriptor getConstructor()
Return meta-data for constructor to invoke.
Returns:
Meta-data for constructor to invoke.

getConstructorParmsDescriptions

public final java.lang.String[] getConstructorParmsDescriptions()
Return constructor parameter descriptions.
Returns:
Constructor parameter descriptions.

getMethodParmsDescriptions

public final java.lang.String[] getMethodParmsDescriptions()
Return method parameter descriptions.
Returns:
Method parameter descriptions.

invoke

public java.lang.Object invoke(java.lang.Object[] constructorParameters,
                               java.lang.Object[] methodParameters)
                        throws WorkflowException
Create an instance of the Java class; then, invoke a method on it. Parameter and return types match those declared for the constructor and method, respectively, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
constructorParameters - Actual constructor parameter values.
methodParameters - Actual method parameter values.
Returns:
The value returned by the invoked method.
Throws:
WorkflowException - if the specified class cannot be loaded, or if the actual constructor or method parameters do not match those specified in this descriptor in number and type, or if any parameter class cannot be loaded, or if the specified constructor or method cannot be found, or if the constructor call fails, or if any of the parameters are not instances of the corresponding classes (or subclasses thereof) specified by this descriptor, or if the invoked method throws an exception.
See Also:
invokeConstructor(java.lang.Object[]), invokeMethod(java.lang.Object, java.lang.Object[])

invokeConstructor

public java.lang.Object invokeConstructor(java.lang.Object[] constructorParameters)
                                   throws WorkflowException
Create an instance of the Java class. Parameter types match those declared for the constructor, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
constructorParameters - Actual constructor parameter values.
Returns:
An instance of the class specified by this descriptor.
Throws:
WorkflowException - if the specified class cannot be loaded, or if the actual constructor parameters do not match those specified in this descriptor in number and type, or if any parameter classes cannot be loaded, or if the specified constructor cannot be found, or if the constructor call fails.
See Also:
invoke(java.lang.Object[], java.lang.Object[]), invokeMethod(java.lang.Object, java.lang.Object[])

invokeMethod

public java.lang.Object invokeMethod(java.lang.Object obj,
                                     java.lang.Object[] methodParameters)
                              throws WorkflowException
Invoke the method specified by this descriptor on an object. Parameter and return types match those declared for the method, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
obj - An instance of the class specified by this descriptor object, on which the specified method is to be invoked.
methodParameters - Actual method parameter values.
Returns:
The value returned by the invoked method.
Throws:
WorkflowException - if the specified class cannot be loaded, or if the actual method parameters do not match those specified in this descriptor in number and type, or if any parameter classes cannot be loaded, or if the specified method cannot be found, or if the supplied object or any of the parameters are not instances of the corresponding classes (or subclasses thereof) specified by this descriptor, or if the invoked method throws an exception.
See Also:
invoke(java.lang.Object[], java.lang.Object[]), invokeConstructor(java.lang.Object[])

setPublished

public void setPublished()

getContents

public java.lang.Object getContents()
Description copied from interface: Publishable
Return the publishable content.
Specified by:
getContents in interface Publishable
Following copied from interface: com.bea.wlpi.common.Publishable
Returns:
A serializable object.

getEntryName

public java.lang.String getEntryName()
Description copied from interface: Publishable
Return the display name for the publishable object.
Specified by:
getEntryName in interface Publishable
Following copied from interface: com.bea.wlpi.common.Publishable
Returns:
Display name.

getType

public int getType()
Description copied from interface: Publishable
Return the type of publishable object.
Specified by:
getType in interface Publishable
Following copied from interface: com.bea.wlpi.common.Publishable
Returns:
Publishable object type: Publishable.TEMPLATE, Publishable.TEMPLATE_DEFINITION, Publishable.BUSINESS_OPERATION, Publishable.BUSINESS_CALENDAR, Publishable.USER, Publishable.ROLE, Publishable.ORG, Publishable.XML_REPOSITORY_FOLDER, Publishable.XML_REPOSITORY_ENTITY, Publishable.EVENT_KEY,

getOwnerName

public java.lang.String getOwnerName()
Description copied from interface: Publishable
Return the name of the object's owner.
Specified by:
getOwnerName in interface Publishable
Following copied from interface: com.bea.wlpi.common.Publishable
Returns:
The object's owner, if any.

WebLogic Process Integrator Version 2.0

BEA WebLogic Process Integrator is a trademark of BEA Systems, Inc.
Copyright (c) 2001 BEA Systems, Inc.
All rights reserved.