Class CopyCommand

  • All Implemented Interfaces:
    Command

    public class CopyCommand
    extends java.lang.Object
    implements Command

    Copy a specified literal value, or a context attribute stored under the fromKey (if any), to the toKey.

    Version:
    $Revision: 480477 $ $Date: 2006-11-29 08:34:52 +0000 (Wed, 29 Nov 2006) $
    • Constructor Summary

      Constructors 
      Constructor Description
      CopyCommand()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean execute​(Context context)
      Copy a specified literal value, or a context attribute stored under the fromKey (if any), to the toKey.
      java.lang.String getFromKey()
      Return the context attribute key for the source attribute.
      java.lang.String getToKey()
      Return the context attribute key for the destination attribute.
      java.lang.String getValue()
      Return the literal value to be copied.
      void setFromKey​(java.lang.String fromKey)
      Set the context attribute key for the source attribute.
      void setToKey​(java.lang.String toKey)
      Set the context attribute key for the destination attribute.
      void setValue​(java.lang.String value)
      Set the literal value to be copied.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fromKey

        private java.lang.String fromKey
      • toKey

        private java.lang.String toKey
      • value

        private java.lang.String value
    • Constructor Detail

      • CopyCommand

        public CopyCommand()
    • Method Detail

      • getFromKey

        public java.lang.String getFromKey()

        Return the context attribute key for the source attribute.

        Returns:
        The source attribute key.
      • setFromKey

        public void setFromKey​(java.lang.String fromKey)

        Set the context attribute key for the source attribute.

        Parameters:
        fromKey - The new key
      • getToKey

        public java.lang.String getToKey()

        Return the context attribute key for the destination attribute.

        Returns:
        The destination attribute key.
      • setToKey

        public void setToKey​(java.lang.String toKey)

        Set the context attribute key for the destination attribute.

        Parameters:
        toKey - The new key
      • getValue

        public java.lang.String getValue()

        Return the literal value to be copied.

        Returns:
        The literal value.
      • setValue

        public void setValue​(java.lang.String value)

        Set the literal value to be copied.

        Parameters:
        value - The new value
      • execute

        public boolean execute​(Context context)
                        throws java.lang.Exception

        Copy a specified literal value, or a context attribute stored under the fromKey (if any), to the toKey.

        Specified by:
        execute in interface Command
        Parameters:
        context - Context in which we are operating
        Returns:
        false so that processing will continue
        Throws:
        java.lang.Exception - in the if an error occurs during execution.