WebLogic Process Integrator Version 2.0

com.bea.wlpi.common
Class TemplateInfo

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

public final class TemplateInfo
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable, Publishable

Holds information about a workflow template.

Objects of this class override the boolean equals(Object) and implement the comparable interface. Homogeneous collections containing objects of this class may, therefore, be searched and sorted using the Collection.contains(Object), List.indexOf(Object), Collections.sort(List) methods.

See Also:
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
TemplateInfo(java.lang.String id, java.lang.String name)
          Create a new TemplateInfo object.
TemplateInfo(java.lang.String id, java.lang.String name, java.lang.String xml)
          Create a new TemplateInfo object.
TemplateInfo(java.lang.String id, java.lang.String name, java.lang.String xml, java.util.Map pluginData, boolean published)
          Create a new TemplateInfo object.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compare two TemplateInfo objects.
 boolean equals(java.lang.Object obj)
          Test two TemplateInfo objects for equality.
 java.lang.Object getContents()
          Return the publishable content.
 java.lang.String getEntryName()
          Return the display name for the publishable object.
 java.lang.String getId()
          Return the template ID.
 java.lang.String getName()
          Return the template name.
 java.lang.String getOwnerName()
          Return the name of the object's owner.
 java.util.Map getPluginData()
          Get the object containing template properties for the all plugins.
 PluginObject getPluginData(java.lang.String pluginName)
          Get the object containing template properties for the specified plugin.
 int getType()
          Return the type of publishable object.
 boolean isPublished()
          Whether this template is published.
 java.lang.String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateInfo

public TemplateInfo(java.lang.String id,
                    java.lang.String name)
Create a new TemplateInfo object.
Parameters:
id - The ID of the workflow template.
name - The template name.

TemplateInfo

public TemplateInfo(java.lang.String id,
                    java.lang.String name,
                    java.lang.String xml)
Create a new TemplateInfo object.
Parameters:
id - The ID of the workflow template.
name - The template name.
xml - The plugin-defined template properties in XML form.
Since:
WebLogic Process Integrator 2.0

TemplateInfo

public TemplateInfo(java.lang.String id,
                    java.lang.String name,
                    java.lang.String xml,
                    java.util.Map pluginData,
                    boolean published)
Create a new TemplateInfo object.
Parameters:
id - The ID of the workflow template.
name - The template name.
xml - The plugin-defined template properties in XML form.
pluginData - The plugin-defined template properties.
Since:
WebLogic Process Integrator 2.0
Method Detail

getId

public final java.lang.String getId()
Return the template ID.
Returns:
The template ID as set in the constructor.

getName

public final java.lang.String getName()
Return the template name.
Returns:
The template name as set in the constructor.

getPluginData

public java.util.Map getPluginData()
Get the object containing template properties for the all plugins.
Returns:
Map containing plugin template properties, keyed on plugin name.
Since:
WebLogic Process Integrator 2.0

getPluginData

public PluginObject getPluginData(java.lang.String pluginName)
Get the object containing template properties for the specified plugin.
Parameters:
pluginName - The plugin name.
Returns:
Plugin specific template properties.
Since:
WebLogic Process Integrator 2.0

isPublished

public boolean isPublished()
Whether this template is published.
Specified by:
isPublished in interface Publishable
Returns:
true if published.
Since:
WebLogic Process Integrator 2.0

equals

public boolean equals(java.lang.Object obj)
Test two TemplateInfo objects for equality.
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object with which to compare this one.
Returns:
true if obj is an instance of TemplateInfo with the same ID as this one.
See Also:
compareTo(java.lang.Object)

compareTo

public int compareTo(java.lang.Object o)
Compare two TemplateInfo objects.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - Object with which to compare this one. Must be null or an instance of TemplateInfo.
Returns:
The result of comparing the name members using the String.compareTo(Object) method.
Throws:
java.lang.ClassCastException - if o is not an instance of TemplateInfo.
See Also:
equals(java.lang.Object)

toString

public java.lang.String toString()
Return a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
String representation, showing the values of members.
Since:
WebLogic Process Integrator 2.0

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.