Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional.perforce
Class P4Base

    java.lang.Object
      |
      +--org.apache.tools.ant.Task
            |
            +--org.apache.tools.ant.taskdefs.optional.perforce.P4Base

Direct Known Subclasses:
  P4Change, P4Edit, P4Have, P4Label, P4Submit, P4Sync

public abstract class P4Base
extends Task

Base class for Perforce (P4) ANT tasks. See individual task for example usage.

Author:
  Les Hughes
See Also:
  `P4Sync`, `P4Have`, `P4Change`, `P4Edit`, `P4Submit`, `P4Label`, `Exec`

Field Summary
`protected java.lang.String` | `P4Client` Perforce Client (eg myclientspec)
`protected java.lang.String` | `P4CmdOpts` Perforce command opts.
`protected java.lang.String` | `P4Opts` Perforce 'global' opts.
`protected java.lang.String` | `P4Port` Perforce Server Port (eg KM01:1666)
`protected java.lang.String` | `P4User` Perforce User (eg fbloggs)
`protected java.lang.String` | `P4View` Perforce view for commands (eg //projects/foobar/main/source/...
`protected java.lang.String` | `shell` The OS shell to use (cmd.exe or /bin/sh)
`protected org.apache.tools.ant.taskdefs.optional.perforce.Perl5Util` | `util` Perl5 regexp in Java - cool eh?

Fields inherited from class org.apache.tools.ant.Task
`description, location, project, target, taskName, taskType, wrapper`

Constructor Summary
`P4Base()`

Method Summary
`protected void` | `execP4Command(java.lang.String command)`
`protected void` | `execP4Command(java.lang.String command, P4Handler handler)` Execute P4 command assembled by subclasses.
`void` | `init()` Called by the project to let the task initialize properly.
`void` | `setClient(java.lang.String P4Client)`
`void` | `setCmdopts(java.lang.String P4CmdOpts)`
`void` | `setPort(java.lang.String P4Port)`
`void` | `setUser(java.lang.String P4User)`
`void` | `setView(java.lang.String P4View)`

Methods inherited from class org.apache.tools.ant.Task
`execute, getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### util

    protected org.apache.tools.ant.taskdefs.optional.perforce.Perl5Util util

  Perl5 regexp in Java - cool eh?

### shell

    protected java.lang.String shell

  The OS shell to use (cmd.exe or /bin/sh)

### P4Port

    protected java.lang.String P4Port

  Perforce Server Port (eg KM01:1666)

### P4Client

    protected java.lang.String P4Client

  Perforce Client (eg myclientspec)

### P4User

    protected java.lang.String P4User

  Perforce User (eg fbloggs)

### P4View

    protected java.lang.String P4View

  Perforce view for commands (eg //projects/foobar/main/source/... )

### P4Opts

    protected java.lang.String P4Opts

  Perforce 'global' opts. Forms half of low level API

### P4CmdOpts

    protected java.lang.String P4CmdOpts

  Perforce command opts. Forms half of low level API

Constructor Detail

### P4Base

    public P4Base()

Method Detail

### setPort

    public void setPort(java.lang.String P4Port)

### setClient

    public void setClient(java.lang.String P4Client)

### setUser

    public void setUser(java.lang.String P4User)

### setView

    public void setView(java.lang.String P4View)

### setCmdopts

    public void setCmdopts(java.lang.String P4CmdOpts)

### init

    public void init()

  Description copied from class: `Task`
  Called by the project to let the task initialize properly.
  Overrides:
    `init` in class `Task`
  Following copied from class: `org.apache.tools.ant.Task`
  Throws:
    `BuildException` - if someting goes wrong with the build

### execP4Command

    protected void execP4Command(java.lang.String command)
                          throws BuildException

### execP4Command

    protected void execP4Command(java.lang.String command,
                                 P4Handler handler)
                          throws BuildException

  Execute P4 command assembled by subclasses.
  Parameters:
    `command` - The command to run
    `p4input` - Input to be fed to command on stdin
    `handler` - A P4Handler to process any input and output

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 Apache Software Foundation. All Rights Reserved.