Class AbstractCreateStructureCmd

  • All Implemented Interfaces:
    Command
    Direct Known Subclasses:
    CreateStructureCmd, CreateStructureInStructureCmd

    public abstract class AbstractCreateStructureCmd
    extends java.lang.Object
    implements Command
    A base class to hold duplicate information for commands that create structures. This class implements the logic of the applyTo(DomainObject) method so that child implementations need only to implement the abstract methods.
    Since:
    Tracker Id 383
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean applyTo​(DomainObject domainObject)
      Applies this command to the given domain object.
      java.lang.String getName()
      Returns the name of this command.
      DataType getNewDataType()
      Get the new structure data type which was created.
      java.lang.String getStatusMsg()
      Returns the status message indicating the status of the command.
      • Methods inherited from class java.lang.Object

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

      • applyTo

        public boolean applyTo​(DomainObject domainObject)
        Applies this command to the given domain object.

        This method is a Form Template method in that child subclasses do not need to override the method, but only need to implement the methods that this method calls.

        Specified by:
        applyTo in interface Command
        Parameters:
        domainObject - The domain object that is associated with this command
        Returns:
        true if the command applied successfully
        See Also:
        Command.applyTo(DomainObject)
      • getNewDataType

        public DataType getNewDataType()
        Get the new structure data type which was created.
        Returns:
        new structure.
      • getStatusMsg

        public java.lang.String getStatusMsg()
        Description copied from interface: Command
        Returns the status message indicating the status of the command.
        Specified by:
        getStatusMsg in interface Command
        Returns:
        reason for failure, or null if the status of the command was successful
        See Also:
        Command.getStatusMsg()
      • getName

        public java.lang.String getName()
        Description copied from interface: Command
        Returns the name of this command.
        Specified by:
        getName in interface Command
        Returns:
        the name of this command
        See Also:
        Command.getName()