Class JcaComponentParamsUtils

java.lang.Object
com.ptc.jca.mvc.components.JcaComponentParamsUtils

public final class JcaComponentParamsUtils extends Object
Utility class that looks at JcaComponentParams to provide some information

Supported API: true

Extendable: false
  • Method Details

    • getComponentMode

      public ComponentMode getComponentMode(JcaComponentParams params)
      Returns the ComponentMode from JcaComponentParams

      Supported API: true
      Parameters:
      params -
      Returns:
    • getContextObjectClassName

      public String getContextObjectClassName(JcaComponentParams params) throws WTException
      Get the context object's type name from the given JcaComponentParams. In CREATE mode, its the BaseTypeIdentifier's ClassName(ClassnameFromTypename), other wise its the type of the context object from JcaComponentParams.

      Supported API: true
      Parameters:
      params -
      Returns:
      the internal name of a type such as "wt.part.WTPart" or "com.acme.SoftPart"
      Throws:
      WTException
    • getContextObjectTypeIdentifier

      public TypeIdentifier getContextObjectTypeIdentifier(JcaComponentParams params) throws WTException
      Get the context object's TypeIdentifier, given the JcaComponentParams.
      In CREATE mode, its the TypeInstanceIdentifier's TypeIdentifier,
      else [ its the value set from #setContextObjectTypeIdentifier().
      If not available its the context object(from JcaComponentParams)'s TypeIdentifier].

      Supported API: true
      Parameters:
      params -
      Throws:
      WTException
    • getContextObjectTypeInstance

      public TypeInstance getContextObjectTypeInstance(JcaComponentParams params) throws WTException
      Get the TypeInstance attached to the ContextObject in JcaComponentParams.

      Supported API: true
      Parameters:
      params -
      Returns:
      Throws:
      WTException
    • getContextTypeName

      public String getContextTypeName(JcaComponentParams params) throws WTException
      Get the name of the type attached to the ContextObject in JcaComponentParams.
      Fix SPR 5322808 Create wizards were always having the root type context instead of the type context that was actually selected in the wizard. This was causing the ComponentDescriptor "types" field to possibly contain the wrong type, which caused issues when looking up attributes in data utilities (which caused graphical attributes to not display correctly).
      Supported API: true
      Parameters:
      params -
      Returns:
      internal name of the type
      Throws:
      WTException
    • isFindInTreeRequest

      public boolean isFindInTreeRequest(String tableId, JcaComponentParams params)
      Whether the request is for Find in Tree

      Supported API: true
      Parameters:
      tableId -
      params -
      Returns:
    • isExport

      public boolean isExport(String componentId, NmCommandBean commandBean)
      Whether the request is for export list to files

      Supported API: true
      Parameters:
      componentId -
      commandBean -
      Returns:
    • isExport

      public boolean isExport(String componentId, ComponentParams params)
      Whether the request is for export list to files

      Supported API: true
      Parameters:
      componentId -
      params -
      Returns:
    • getDynamicWindchillType

      public TypeIdentifier getDynamicWindchillType(ComponentParams params)
      Get the Windchill Object Type to be used for dynamic building of a component

      Supported API: true
      Parameters:
      params -
      Returns:
      TypeIdentifier
    • getDynamicProperties

      public List<String> getDynamicProperties(ComponentParams params)
      Get the attribute ids to be used for dynamic building of a component

      Supported API: true
      Parameters:
      params -
      Returns:
      List of attribute ids
    • isDynamic

      public boolean isDynamic(ComponentParams params)
      Is the request to build dynamic component?
      Supported API: true
      Parameters:
      params -
      Returns:
      boolean