CCMCreateTask (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.ccm, class: CCMCreateTask

# Class CCMCreateTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.optional.ccm.Continuus
org.apache.tools.ant.taskdefs.optional.ccm.CCMCreateTask

All Implemented Interfaces:
  `Cloneable, ExecuteStreamHandler`

public class CCMCreateTask extends Continuus implements ExecuteStreamHandler
Creates new Continuus ccm task and sets it as the default.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `FLAG_COMMENT`
  /comment -- comments associated to the task
  `static final String`
  `FLAG_PLATFORM`
  /platform flag -- target platform
  `static final String`
  `FLAG_RELEASE`
  /release flag
  `static final String`
  `FLAG_RESOLVER`
  /resolver flag
  `static final String`
  `FLAG_SUBSYSTEM`
  /release flag
  `static final String`
  `FLAG_TASK`
  -task flag -- associate checkout task with task

  ### Fields inherited from class Continuus

  `COMMAND_CHECKIN, COMMAND_CHECKOUT, COMMAND_CREATE_TASK, COMMAND_DEFAULT_TASK, COMMAND_RECONFIGURE`
  Modifier and Type
  Field
  Description
  `static final String`
  `COMMAND_CHECKIN`
  The 'Checkin' command
  `static final String`
  `COMMAND_CHECKOUT`
  The 'Checkout' command
  `static final String`
  `COMMAND_CREATE_TASK`
  The 'CreateTask' command
  `static final String`
  `COMMAND_DEFAULT_TASK`
  The 'Reconfigure' command
  `static final String`
  `COMMAND_RECONFIGURE`
  The 'Reconfigure' command

  ### Fields inherited from class Task

  `target, taskName, taskType, wrapper`
  Modifier and Type
  Field
  Description
  `protected Target`
  `target`
  Deprecated.
  since 1.6.x.
  `protected String`
  `taskName`
  Deprecated.
  since 1.6.x.
  `protected String`
  `taskType`
  Deprecated.
  since 1.6.x.
  `protected RuntimeConfigurable`
  `wrapper`
  Deprecated.
  since 1.6.x.

  ### Fields inherited from class ProjectComponent

  `description, location, project`
  Modifier and Type
  Field
  Description
  `protected String`
  `description`
  Deprecated.
  since 1.6.x.
  `protected Location`
  `location`
  Deprecated.
  since 1.6.x.
  `protected Project`
  `project`
  Deprecated.
  since 1.6.x.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CCMCreateTask()`
  Constructor for CCMCreateTask.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `execute()`
  Executes the task.
  `String`
  `getComment()`
  Get the value of comment.
  `String`
  `getPlatform()`
  Get the value of platform.
  `String`
  `getRelease()`
  Get the value of release.
  `String`
  `getResolver()`
  Get the value of resolver.
  `String`
  `getSubSystem()`
  Get the value of subSystem.
  `String`
  `getTask()`
  Get the value of task.
  `void`
  `setComment(String v)`
  Specifies a comment.
  `void`
  `setPlatform(String v)`
  Specifies the target platform.
  `void`
  `setProcessErrorStream(InputStream is)`
  Install a handler for the error stream of the subprocess.
  `void`
  `setProcessInputStream(OutputStream param1)`
  Install a handler for the input stream of the subprocess.
  `void`
  `setProcessOutputStream(InputStream is)`
  read the output stream to retrieve the new task number.
  `void`
  `setRelease(String v)`
  Specify the CCM release.
  `void`
  `setResolver(String v)`
  Specifies the resolver.
  `void`
  `setSubSystem(String v)`
  Specifies the subsystem.
  `void`
  `setTask(String v)`
  Specifies the task number used to checkin the file (may use 'default').
  `void`
  `start()`
  Start handling of the streams.
  `void`
  `stop()`
  Stop handling of the streams - will not be restarted.

  ### Methods inherited from class Continuus

  `getCcmAction, getCcmCommand, run, run, setCcmAction, setCcmDir`
  Modifier and Type
  Method
  Description
  `String`
  `getCcmAction()`
  Get the value of ccmAction.
  `protected final String`
  `getCcmCommand()`
  Builds and returns the command string to execute ccm
  `protected int`
  `run(Commandline cmd)`
  Run the command.
  `protected int`
  `run(Commandline cmd, ExecuteStreamHandler handler)`
  Run the command.
  `void`
  `setCcmAction(String v)`
  Set the value of ccmAction.
  `final void`
  `setCcmDir(String dir)`
  Set the directory where the ccm executable is located.

  ### Methods inherited from class Task

  `bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`
  Modifier and Type
  Method
  Description
  `final void`
  `bindToOwner(Task owner)`
  Bind a task to another; use this when configuring a newly created task to do work on behalf of another.
  `Target`
  `getOwningTarget()`
  Returns the container target of this task.
  `RuntimeConfigurable`
  `getRuntimeConfigurableWrapper()`
  Returns the wrapper used for runtime configuration.
  `String`
  `getTaskName()`
  Returns the name to use in logging messages.
  `String`
  `getTaskType()`
  Return the type of task.
  `protected RuntimeConfigurable`
  `getWrapper()`
  Return the runtime configurable structure for this task.
  `protected void`
  `handleErrorFlush(String output)`
  Handles an error line by logging it with the WARN priority.
  `protected void`
  `handleErrorOutput(String output)`
  Handles an error output by logging it with the WARN priority.
  `protected void`
  `handleFlush(String output)`
  Handles output by logging it with the INFO priority.
  `protected int`
  `handleInput(byte[] buffer, int offset, int length)`
  Handle an input request by this task.
  `protected void`
  `handleOutput(String output)`
  Handles output by logging it with the INFO priority.
  `void`
  `init()`
  Called by the project to let the task initialize properly.
  `protected final boolean`
  `isInvalid()`
  Has this task been marked invalid?
  `void`
  `log(String msg)`
  Logs a message with the default (INFO) priority.
  `void`
  `log(String msg, int msgLevel)`
  Logs a message with the given priority.
  `void`
  `log(String msg, Throwable t, int msgLevel)`
  Logs a message with the given priority.
  `void`
  `log(Throwable t, int msgLevel)`
  Logs a message with the given priority.
  `void`
  `maybeConfigure()`
  Configures this task - if it hasn't been done already.
  `final void`
  `perform()`
  Performs this task if it's still valid, or gets a replacement version and performs that otherwise.
  `void`
  `reconfigure()`
  Force the task to be reconfigured from its RuntimeConfigurable.
  `void`
  `setOwningTarget(Target target)`
  Sets the target container of this task.
  `void`
  `setRuntimeConfigurableWrapper(RuntimeConfigurable wrapper)`
  Sets the wrapper to be used for runtime configuration.
  `void`
  `setTaskName(String name)`
  Sets the name to use in logging messages.
  `void`
  `setTaskType(String type)`
  Sets the name with which the task has been invoked.

  ### Methods inherited from class ProjectComponent

  `clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`
  Modifier and Type
  Method
  Description
  `Object`
  `clone()`
  `String`
  `getDescription()`
  Returns the description of the current action.
  `Location`
  `getLocation()`
  Returns the file/location where this task was defined.
  `Project`
  `getProject()`
  Returns the project to which this component belongs.
  `void`
  `setDescription(String desc)`
  Sets a description of the current action.
  `void`
  `setLocation(Location location)`
  Sets the file/location where this task was defined.
  `void`
  `setProject(Project project)`
  Sets the project object of this component.

  ### Methods inherited from class Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FLAG_COMMENT

    public static final String FLAG_COMMENT
    /comment -- comments associated to the task
    See Also:
      - Constant Field Values

  - ### FLAG_PLATFORM

    public static final String FLAG_PLATFORM
    /platform flag -- target platform
    See Also:
      - Constant Field Values

  - ### FLAG_RESOLVER

    public static final String FLAG_RESOLVER
    /resolver flag
    See Also:
      - Constant Field Values

  - ### FLAG_RELEASE

    public static final String FLAG_RELEASE
    /release flag
    See Also:
      - Constant Field Values

  - ### FLAG_SUBSYSTEM

    public static final String FLAG_SUBSYSTEM
    /release flag
    See Also:
      - Constant Field Values

  - ### FLAG_TASK

    public static final String FLAG_TASK
    -task flag -- associate checkout task with task
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CCMCreateTask

    public CCMCreateTask()
    Constructor for CCMCreateTask.

- ## Method Details

  - ### execute

    public void execute() throws BuildException
    Executes the task.

    Builds a command line to execute ccm and then calls Exec's run method to execute the command line.

    Overrides:
      `execute` in class `Task`
    Throws:
      `BuildException` - on error

  - ### getComment

    public String getComment()
    Get the value of comment.
    Returns:
      value of comment.

  - ### setComment

    public void setComment(String v)
    Specifies a comment.
    Parameters:
      `v` - Value to assign to comment.

  - ### getPlatform

    public String getPlatform()
    Get the value of platform.
    Returns:
      value of platform.

  - ### setPlatform

    public void setPlatform(String v)
    Specifies the target platform.
    Parameters:
      `v` - Value to assign to platform.

  - ### getResolver

    public String getResolver()
    Get the value of resolver.
    Returns:
      value of resolver.

  - ### setResolver

    public void setResolver(String v)
    Specifies the resolver.
    Parameters:
      `v` - Value to assign to resolver.

  - ### getRelease

    public String getRelease()
    Get the value of release.
    Returns:
      value of release.

  - ### setRelease

    public void setRelease(String v)
    Specify the CCM release.
    Parameters:
      `v` - Value to assign to release.

  - ### getSubSystem

    public String getSubSystem()
    Get the value of subSystem.
    Returns:
      value of subSystem.

  - ### setSubSystem

    public void setSubSystem(String v)
    Specifies the subsystem.
    Parameters:
      `v` - Value to assign to subSystem.

  - ### getTask

    public String getTask()
    Get the value of task.
    Returns:
      value of task.

  - ### setTask

    public void setTask(String v)
    Specifies the task number used to checkin the file (may use 'default').
    Parameters:
      `v` - Value to assign to task.

  - ### start

    public void start() throws IOException
    Description copied from interface: `ExecuteStreamHandler`
    Start handling of the streams.
    Specified by:
      `start` in interface `ExecuteStreamHandler`
    Throws:
      `IOException` - on error

  - ### stop

    public void stop()
    Description copied from interface: `ExecuteStreamHandler`
    Stop handling of the streams - will not be restarted.
    Specified by:
      `stop` in interface `ExecuteStreamHandler`

  - ### setProcessInputStream

    public void setProcessInputStream(OutputStream param1) throws IOException
    Description copied from interface: `ExecuteStreamHandler`
    Install a handler for the input stream of the subprocess.
    Specified by:
      `setProcessInputStream` in interface `ExecuteStreamHandler`
    Parameters:
      `param1` - the output stream
    Throws:
      `IOException` - on error

  - ### setProcessErrorStream

    public void setProcessErrorStream(InputStream is) throws IOException
    Description copied from interface: `ExecuteStreamHandler`
    Install a handler for the error stream of the subprocess.
    Specified by:
      `setProcessErrorStream` in interface `ExecuteStreamHandler`
    Parameters:
      `is` - the input stream
    Throws:
      `IOException` - on error

  - ### setProcessOutputStream

    public void setProcessOutputStream(InputStream is) throws IOException
    read the output stream to retrieve the new task number.
    Specified by:
      `setProcessOutputStream` in interface `ExecuteStreamHandler`
    Parameters:
      `is` - InputStream
    Throws:
      `IOException` - on error