Class PrepareEntityCommand

java.lang.Object
com.ptc.core.command.common.bean.AbstractCommand
com.ptc.core.command.common.bean.AbstractServerCommand
com.ptc.core.command.common.bean.entity.AbstractEntityCommand
com.ptc.core.command.common.bean.entity.PrepareEntityCommand
All Implemented Interfaces:
Command, com.ptc.core.command.common.ServerCommand, Externalizable, Serializable

public class PrepareEntityCommand extends com.ptc.core.command.common.bean.entity.AbstractEntityCommand implements Externalizable
This command can be used to prepare one or more source objects(TypeInstance) for further processing. The preparation required is identified by the nextOperation property of the filter AttributeContainerSpec or by specialization of this class.

The object returned result may or may not represent a persisted object as this command can prepare templates for new object creation or for performing searches for persistent entities.



Supported API: true

Extendable: true
See Also:
  • Constructor Details

    • PrepareEntityCommand

      public PrepareEntityCommand()


      Supported API: true
  • Method Details

    • setSource

      Sets the source [or input] of the command to the given TypeInstanceIdentifier. The outcome of this is that the object represented by the TypeInstanceIdentifier is prepared based upon the filter and returned as aTypeInstance.

      Supported API: true
      Overrides:
      setSource in class com.ptc.core.command.common.bean.entity.AbstractEntityCommand
      Parameters:
      instanceId -
      Throws:
      WTPropertyVetoException
      UnsupportedOperationException
    • setSource

      public void setSource(TypeInstance instance) throws WTPropertyVetoException, UnsupportedOperationException
      Sets the source [or input] of the command to the given TypeInstance. If the TypeInstance represents an already persistent instance, a fresh copy is returned from persistent storage. Any attributes on the supplied TypeInstance are treated as initial values on the returned TypeInstance, assuming that the attributes are represented in the supplied filter.

      Supported API: true
      Overrides:
      setSource in class com.ptc.core.command.common.bean.entity.AbstractEntityCommand
      Parameters:
      instance -
      Throws:
      WTPropertyVetoException
      UnsupportedOperationException
    • setSource

      public void setSource(TypeInstanceIdentifier instanceId, AttributeContainer instanceData) throws WTPropertyVetoException, UnsupportedOperationException
      Sets the source [or input] of the command to the given TypeInstanceIdentifier. The command result represents a refreshed copy of the object identified by the TypeInstanceIdentifier. If the nextOperation identified in the filter is some form of creation, theAttributeContainer can be used to supply initial values.

      Supported API: true
      Overrides:
      setSource in class com.ptc.core.command.common.bean.entity.AbstractEntityCommand
      Parameters:
      instanceId -
      instanceData -
      Throws:
      WTPropertyVetoException
      UnsupportedOperationException
    • setSource

      public void setSource(TypeIdentifier identifier, AttributeContainer instanceData) throws WTPropertyVetoException, UnsupportedOperationException
      Sets the source [or input] of the command to the given TypeIdentifier. The command result represents a instance of the specified TypeIdentifier based upon the nextOperation specified in the AttributeContainerSpec filter. This method is typically used in some form of creation or search when an existing instance is not required. The supplied AttributeContainer can be used to supply initial values that are populated in the returned instance.

      Supported API: true
      Parameters:
      identifier -
      instanceData -
      Throws:
      WTPropertyVetoException
      UnsupportedOperationException
    • setSource

      public void setSource(TypeIdentifier identifier) throws WTPropertyVetoException, UnsupportedOperationException
      Sets the source [or input] of the command to the given TypeIdentifier. The command result represents a instance of the specified TypeIdentifier based upon the nextOperation specified in the AttributeContainerSpec filter. This method is typically used in some form of creation or search when an existing instance is not required.

      Supported API: true
      Parameters:
      identifier -
      Throws:
      WTPropertyVetoException
      UnsupportedOperationException
    • setSources

      public void setSources(TypeInstanceIdentifier[] instanceIds)
      Sets the sources [or inputs] of the command to the given TypeInstanceIdentifier[]. The outcome of this is that the objects represented by the TypeInstanceIdentifier[] are prepared based upon the filter and returned as aTypeInstance[].

      Supported API: true
      Parameters:
      instanceIds -