Class ActionWebject

java.lang.Object
com.ptc.core.adapter.server.impl.AbstractWebject
com.ptc.core.adapter.server.impl.ActionWebject
All Implemented Interfaces:
com.infoengine.object.factory.AdapterWebject, com.ptc.core.adapter.server.impl.SessionWebject, com.ptc.core.adapter.server.impl.TypeAwareWebjectDelegate, Externalizable, Serializable

public abstract class ActionWebject extends AbstractWebject implements com.ptc.core.adapter.server.impl.SessionWebject
The base class for Windchill Adapter ACT webjects. This abstract class contains only the most basic and widely shared functionality used by all Windchill Adapter ACT webjects.

Supported API: true

Extendable: true
See Also:
  • Field Details

    • modification

      protected ActionWebject.Modification modification
      For webjects that perform update operations, indicates whether new attribute values are added to existing ones or if the existing values are replaced. Acceptable values are "replace", "add", and "delete". Default is "replace".

      Supported API: true
    • fieldParams

      protected String[] fieldParams
      Contains a list of the values provided by the user for the webject's "FIELD" param. Empty if no values were provided.

      Supported API: true
  • Method Details

    • preset

      public void preset(com.infoengine.object.factory.Task task) throws WTException
      This convenience method is intended to be called in the invoke() method to convert collect and process webject parameters and basic initialization.

      Supported API: true
      Overrides:
      preset in class AbstractWebject
      Parameters:
      task - The Info*Engine task executed by the user. This is usually the same Task received by the invoke() method.
      Throws:
      WTException
    • setAttributeValue

      public void setAttributeValue(TypeInstance typeInstance, String field) throws WTException
      Sets the value of an attribute in the given type instance. If the user indicates modification "add" on the webject, then the value is added to existing values, if any. If the user indicates modification "delete", then all values are removed from the attribute. If the user indicates modification "replace" (the default modification), then the value replaces any existing attribute value(s).

      Supported API: true
      Parameters:
      typeInstance - The type instance to update.
      field - The value of a webject "FIELD" param specifying the attribute to update and its new value. "FIELD" params are in name=value form, where name is the logical form of an attribute name and value is the string form of the attribute's content.
      Throws:
      WTException
    • setAttributeValue

      public void setAttributeValue(TypeInstance typeInstance, String name, String value) throws WTException
      Sets the value of the named attribute in the given type instance. If the user indicates modification "add" for the webject, then the value is added to existing values, if any. If the user indicates modification "delete", then all values are removed from the attribute. If the user indicates modification "replace" (the default modification), then the value replaces any existing attribute value(s).

      Supported API: true
      Parameters:
      typeInstance - The type instance to update.
      name - The logical form of an attribute for which to update content.
      value - The string form of the attribute's new content. This will be translated to Object form as necessary.
      Throws:
      WTException
    • setAttributeValue

      public void setAttributeValue(TypeInstance typeInstance, String name, Object value) throws WTException
      Sets the value of the named attribute in the given type instance. If the user indicates modification "add" for the webject, then the value is added to existing values, if any. If the user indicates modification "delete", then all values are removed from the attribute. If the user indicates modification "replace" (the default modification), then the value replaces any existing attribute value(s).

      Supported API: true
      Parameters:
      typeInstance - The type instance to update.
      name - The logical form of an attribute for which to update content.
      value - If the value is a String form of the attribute's new content, it will be translated to Object form as necessary. Otherwise the value itself is used.
      Throws:
      WTException
    • setAttributeValue

      protected void setAttributeValue(TypeInstance typeInstance, AttributeTypeIdentifier attrTypeId, AttributeIdentifier ai, Object value) throws WTException
      Sets the value of the attribute in the type instance.

      Supported API: true
      Parameters:
      typeInstance - The type instance to modify.
      attrTypeId - The type of the attribute identifier.
      ai - The attribute whose value will be modified.
      value - The new value to set for the attribute.
      Throws:
      WTException
    • setAttributeValue

      protected void setAttributeValue(TypeInstance typeInstance, AttributeTypeIdentifier attrTypeId, Object value) throws WTException
      Sets the value of the attribute in the type instance.

      Supported API: true
      Parameters:
      typeInstance - The type instance to modify.
      attrTypeId - The type of the attribute identifier.
      value - The new value to set for the attribute.
      Throws:
      WTException
    • setModification

      protected void setModification(ActionWebject.Modification modification)
      Overrides the value of the modification parameter.

      Supported API: true
      Parameters:
      modification - The new value.
    • newTypeInstance

      public com.infoengine.object.factory.Element newTypeInstance(String type) throws WTException
      Uses the NewEntityCommand to construct a new type instance for the given type.

      Supported API: true
      Parameters:
      type - Specifies the string form of a type identifier for which to create a new type instance, e.g. "WCTYPE|wt.part.WTPart".
      Returns:
      Element
      Throws:
      WTException
    • newTypeInstance

      public com.infoengine.object.factory.Element newTypeInstance(String type, String persistenceIdentifier) throws WTException
      Uses the NewEntityCommand to construct a new type instance for the given type. The new type instance will be assigned the specified persistence identifier.

      Supported API: true
      Parameters:
      type - The type for which to create a new type instance, e.g. "WCTYPE|wt.part.WTPart".
      persistenceIdentifier - The persistence identifier to assign to the new type instance.
      Returns:
      Element
      Throws:
      WTException