|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.optional.perforce.P4Base org.apache.tools.ant.taskdefs.optional.perforce.P4Counter
public class P4Counter
Obtains or sets the value of a counter.
When used in its base form (where only the counter name is provided), the counter value will be printed to the output stream. When the value is provided, the counter will be set to the value provided. When a property name is provided, the property will be filled with the value of the counter. You may not specify to both get and set the value of the counter in the same Task.
The user performing this task must have Perforce "review" permissions as defined by Perforce protections in order for this task to succeed.
Example Usage:
Field Summary | |
---|---|
java.lang.String |
counter
name of the counter |
java.lang.String |
property
name of an optional property |
boolean |
shouldSetProperty
flag telling whether a property should be set |
boolean |
shouldSetValue
flag telling whether the value of the counter should be set |
int |
value
new value for the counter |
Fields inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base |
---|
failOnError, P4Client, P4CmdOpts, P4Opts, P4Port, P4User, P4View, shell, util |
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
P4Counter()
|
Method Summary | |
---|---|
void |
execute()
again, properties are mutable in this tsk |
void |
setName(java.lang.String counter)
The name of the counter; required |
void |
setProperty(java.lang.String property)
A property to be set with the value of the counter |
void |
setValue(int value)
The new value for the counter; optional. |
Methods inherited from class org.apache.tools.ant.taskdefs.optional.perforce.P4Base |
---|
execP4Command, execP4Command, getErrorMessage, getInError, init, setClient, setCmdopts, setErrorMessage, setFailonerror, setGlobalopts, setInError, setPort, setUser, setView |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String counter
public java.lang.String property
public boolean shouldSetValue
public boolean shouldSetProperty
public int value
Constructor Detail |
---|
public P4Counter()
Method Detail |
---|
public void setName(java.lang.String counter)
counter
- name of the counterpublic void setValue(int value)
value
- new value for the counterpublic void setProperty(java.lang.String property)
property
- the name of a property to set with the value
of the counterpublic void execute() throws BuildException
execute
in class Task
BuildException
- if the required parameters are not supplied.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |