Class ChangeManagementClientHelper

java.lang.Object
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 Details

    • isVarianceAction

      public static boolean isVarianceAction(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. 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

      public static 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.
    • getParameterWithObjectHandle

      public static String getParameterWithObjectHandle(String parameter, FormDataHolder formData)
      Returns an HTTP request parameter value from an FormDataHolder. 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 bean
      formData -
      Returns:
      An HTTP request parameter value
    • getObjectHandle

      public static String getObjectHandle(FormDataHolder formData)
      Returns the object handle from a FormDataHolder. If the form data is null, an empty string is returned.

      Supported API: true
      Parameters:
      formData -
      Returns:
      An HTTP request parameter value
    • getComponentMode

      public static 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:
      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)
      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 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

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

      Supported API: true
      Parameters:
      formData - client data
      removeJSFormating - True removes the prefix and post fix that is used in the DOM
      Returns:
      String of the tableId.
    • isPropagationSelected

      public static boolean isPropagationSelected(FormDataHolder formData)
      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

      public static WTReference getReference(Object item) throws WTException
      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

      public static TeamManaged getTeamManagedObject(NmCommandBean clientData) throws WTException
      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 for
      invalid reference
      com.ptc.windchill.enterprise.change2.ChangeManagementDescriptorConstants.ColumnIdentifiers.AUTOMATE_FASTTRACK
      and 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.

      Supported API: true
      Returns:
      the localized string for the "Create New Change Notice" work flow assignment.
      Throws:
      WTException