com.ptc.windchill.enterprise.change2
Class ChangeManagementClientHelper

java.lang.Object
  extended by com.ptc.windchill.enterprise.change2.ChangeManagementClientHelper

public class ChangeManagementClientHelper
extends Object

Helper class used by some of the processors and code of the change clients.

Supported API: true

Extendable: false


Method Summary
static String defaultChangeTask_getName(NmCommandBean cb, String name)
          Will determine the name of the default change task name.
static String defaultChangeTask_getName(WTChangeRequest2 request)
          Will determine the name of the default change task name.
static boolean defaultChangeTask_isPropagationSelected(NmCommandBean cb)
          Will determine if the propagation was selected in the Change Notice for the default change task by looking at the current FORM data within the command bean.
static com.ptc.core.ui.resources.ComponentMode getComponentMode(Object str_mode)
          Will retrieve the Component Mode from the NmCommandBean.
static String getEditWizTitle(String oidStr)
          Gets the edit action title from the apropriate resource bundle given a string representation of an NmOid.
static com.ptc.core.ui.resources.ComponentMode getMode(Object obj)
          Will retrieve the Component Mode from the specified object.
static String getTableId(NmCommandBean cb, boolean removeJSFormating)
          Retrieve the table Id from the command bean through the TableId Hidden Field

Supported API: true
static String getTablId(ObjectBean ob, boolean removeJSFormating)
          Retrieve the table Id from the object bean through the TableId Hidden Field

Supported API: true
static boolean isInventoryDispositionSupported(DispositionHandler handler, Class item)
          Will determine if the designated class supports the ability to have a Disposition on its inventory applied.
static boolean isVarianceAction(Class c, Map formData)
          Will determine whether the given action is being accessed from a Variance Create/Edit wizard or the object in question IS a Variance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isVarianceAction

public static boolean isVarianceAction(Class c,
                                       Map formData)
Will determine whether the given action is being accessed from a Variance Create/Edit wizard or the object in question IS a Variance. The variance wizard check is controlled through the "varianceEffectivity" form parameter. If this value is true then the return value is true. If this form parameter is undefined (null) then if the current class is assignable from a WTVariance, the return value is true. In all other cases the return value is false.

Supported API: true
Extendable: false

Parameters:
c - The class to evaluate (such as the ContextObject( ) class)
formData - The map of the FORM data to search for the "varianceEffectivity" value.
Returns:
boolean See description above.

getMode

public static com.ptc.core.ui.resources.ComponentMode getMode(Object obj)
Will retrieve the Component Mode from the specified object. Will default to "VIEW" if the mode can not be determined. If the object is an ObjectBean or NmCommandBean, the FORM parameter operation will be used. If the object is a ModelContext, the descriptor mode will be determined from the context.

Supported API: true
Extendable: false

Parameters:
obj - The object to use to obtain the component mode from.
Returns:
ComponentMode the component mode for the current operation.

getComponentMode

public static com.ptc.core.ui.resources.ComponentMode getComponentMode(Object str_mode)
Will retrieve the Component Mode from the NmCommandBean. Will default to "VIEW" if the mode can not be determined.

Supported API: true
Extendable: false

Parameters:
mode - The string of the mode.
Returns:
ComponentMode the component mode for the current operation.

isInventoryDispositionSupported

public static boolean isInventoryDispositionSupported(DispositionHandler handler,
                                                      Class item)
Will determine if the designated class supports the ability to have a Disposition on its inventory applied.

Supported API: true

Parameters:
handler - The handler used for the processing
item - The class to validate for support
Returns:
boolean true if the class is supported.

getEditWizTitle

public static String getEditWizTitle(String oidStr)
                              throws WTException
Gets the edit action title from the apropriate resource bundle given a string representation of an NmOid.

Supported API: true

Parameters:
oidStr - A string representation of an NmOid representing the change object
Throws:
WTException

getTableId

public static String getTableId(NmCommandBean cb,
                                boolean removeJSFormating)
Retrieve the table Id from the command bean through the TableId Hidden Field

Supported API: true

Parameters:
cb - client data
removeJSFormating - True removes the prefix and post fix that is used in the DOM
Returns:
String of the tableId.
Throws:
WTException

getTablId

public static String getTablId(ObjectBean ob,
                               boolean removeJSFormating)
Retrieve the table Id from the object bean through the TableId Hidden Field

Supported API: true

Parameters:
ob - Object form processing bean
removeJSFormating - True removes the prefix and post fix that is used in the DOM
Returns:
String of the tableId.
Throws:
WTException

defaultChangeTask_isPropagationSelected

public static boolean defaultChangeTask_isPropagationSelected(NmCommandBean cb)
Will determine if the propagation was selected in the Change Notice for the default change task by looking at the current FORM data within the command bean.

Supported API: true

Parameters:
cb - The command bean to use to process for propagation.
Returns:
boolean Whether propagation is specified or not.

defaultChangeTask_getName

public static String defaultChangeTask_getName(NmCommandBean cb,
                                               String name)
                                        throws WTException
Will determine the name of the default change task name.

Supported API: true

Parameters:
cb - The client data.
Returns:
String The name of the default change task.
Throws:
WTException

defaultChangeTask_getName

public static String defaultChangeTask_getName(WTChangeRequest2 request)
                                        throws WTException
Will determine the name of the default change task name.

Supported API: true

Parameters:
request - The change request that the change task is getting propagated from.
Returns:
String The name of the default change task.
Throws:
WTException