Class ChangeManagementClientHelper
java.lang.Object
com.ptc.windchill.enterprise.change2.ChangeManagementClientHelper
Helper class used by some of the processors and code of the change clients.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentModegetComponentMode(Object str_mode) Will retrieve the Component Mode from the NmCommandBean.static StringgetCreateChangeNoticeWfTaskName(WTContainerRef containerRef) Defines the localized string for the name of the "Create New Change Notice" workflow assignments.static StringgetEditWizTitle(String oidStr) Gets the edit action title from the appropriate resource bundle given a string representation of an NmOid.static ComponentModeWill retrieve the Component Mode from the specified object.static StringgetObjectHandle(FormDataHolder formData) Returns the object handle from aFormDataHolder.static StringgetParameterWithObjectHandle(String parameter, FormDataHolder formData) Returns an HTTP request parameter value from anFormDataHolder.static RoleParticipantBeangetParticipantBeanForRole(NmCommandBean clientData, String role, boolean isRequired) Method to get the participant from the current TeamManaged object in the defined Role.static RoleParticipantBeangetParticipantBeanForRole(NmCommandBean clientData, String role, boolean isRequired, boolean allowBlankAssigneeReviewer) Method to get the participant from the current TeamManaged object in the defined Role.static WTReferencegetReference(Object item) Method to retrieve a WTReference to an object.static StringgetTableId(FormDataHolder formData, boolean removeJSFormating) Retrieve the table Id from the command bean through the TableId Hidden Field
Supported API: truestatic TeamManagedgetTeamManagedObject(NmCommandBean clientData) This method gets a TeamManaged object and returns it.static booleanisInventoryDispositionSupported(DispositionHandler handler, Class<?> item) Deprecated.static booleanisPropagationSelected(FormDataHolder formData) Will determine if the propagation was selected in the current form data.static booleanisVarianceAction(Class<?> c, Map<String, Object> formData) Will determine whether the given action is being accessed from a Variance Create/Edit wizard or the object in question IS a Variance.
-
Method Details
-
isVarianceAction
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- 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
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 parameteroperationwill 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.
-
getParameterWithObjectHandle
Returns an HTTP request parameter value from anFormDataHolder. The object handle is prepended to the parameter if needed. If the form data is null, an empty string is returned.
Supported API: true- Parameters:
parameter- A parameter to retrieve from a command beanformData-- Returns:
- An HTTP request parameter value
-
getObjectHandle
Returns the object handle from aFormDataHolder. If the form data is null, an empty string is returned.
Supported API: true- Parameters:
formData-- Returns:
- An HTTP request parameter value
-
getComponentMode
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:
str_mode- The string of the mode.- Returns:
- ComponentMode the component mode for the current operation.
-
isInventoryDispositionSupported
@Deprecated public static boolean isInventoryDispositionSupported(DispositionHandler handler, Class<?> item) Deprecated.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 processingitem- The class to validate for support- Returns:
- boolean true if the class is supported.
-
getEditWizTitle
Gets the edit action title from the appropriate resource bundle given a string representation of an NmOid.
Supported API: true- Parameters:
oidStr- A string representation of an NmOid representing the change object- Returns:
- edit action title
- Throws:
WTException
-
getTableId
Retrieve the table Id from the command bean through the TableId Hidden Field
Supported API: true- Parameters:
formData- client dataremoveJSFormating- True removes the prefix and post fix that is used in the DOM- Returns:
- String of the tableId.
-
isPropagationSelected
Will determine if the propagation was selected in the current form data. In the case of the default change task, will also check if propagation was selected in the Change Notice wizard.
Supported API: true- Parameters:
formData- The form data to use to process for propagation.- Returns:
- boolean Whether propagation is specified or not.
-
getReference
Method to retrieve a WTReference to an object.
Supported API: true- Parameters:
item- The reference for the item.- Returns:
- The reference to the object, or null if there is no reference.
- Throws:
WTException
-
getTeamManagedObject
This method gets a TeamManaged object and returns it.
Supported API: true- Parameters:
clientData-- Returns:
- The TeamManged object from the command bean
- Throws:
WTException- exception is thrown if processing of returning the TeamManaged object fails
-
getParticipantBeanForRole
public static RoleParticipantBean getParticipantBeanForRole(NmCommandBean clientData, String role, boolean isRequired) Method to get the participant from the current TeamManaged object in the defined Role.
Supported API: true- Parameters:
clientData-role-isRequired-- Returns:
- The first WTPrincipalReference is returned from an enumeration of role participants or null if there are no participants in the Role.
-
getParticipantBeanForRole
public static RoleParticipantBean getParticipantBeanForRole(NmCommandBean clientData, String role, boolean isRequired, boolean allowBlankAssigneeReviewer) Method to get the participant from the current TeamManaged object in the defined Role.
Supported API: true- Parameters:
clientData-role-isRequired-allowBlankAssigneeReviewer-- Returns:
- The first WTPrincipalReference is returned from an enumeration of role participants or null if there are no participants in the Role.
-
getCreateChangeNoticeWfTaskName
public static String getCreateChangeNoticeWfTaskName(WTContainerRef containerRef) throws WTException Defines the localized string for the name of the "Create New Change Notice" workflow assignments. Localization of workflow templates for Change Management objects are not supported yet. If customization has been to support localization for change workflows, this method can be overridden to define the localized string for the Create Change Notice task name. The API looks for the any existing registered data utility forand overriding the supported (deprecated in 10.0 M030) getCreateChangeNoticeWfTaskName() API. If the API is overridden and the return value is not null, the API will return the overridden value.invalid reference
com.ptc.windchill.enterprise.change2.ChangeManagementDescriptorConstants.ColumnIdentifiers.AUTOMATE_FASTTRACK
Supported API: true- Returns:
- the localized string for the "Create New Change Notice" work flow assignment.
- Throws:
WTException
-
ChangeLinkAttributeHelper.isInventoryDispositionSupported(ChangeLinkAttributeBean, String, Class)