|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.perforce.p4java.ant.tasks.PerforceTask
com.perforce.p4java.ant.tasks.ServerTask
public abstract class ServerTask
Base class for Perforce server specific Ant tasks. It initializes an instance of the Perforce server.
PerforceTask
Nested Class Summary | |
---|---|
class |
ServerTask.GlobalOption
This inner class is used for handling nested "globaloption" elements. |
Nested classes/interfaces inherited from class com.perforce.p4java.ant.tasks.PerforceTask |
---|
PerforceTask.Field, PerforceTask.File |
Field Summary | |
---|---|
protected boolean |
allHosts
If true, corresponds to -a flag on login. |
protected Options |
commandOptions
Options for Perforce command. |
protected java.util.List<ServerTask.GlobalOption> |
globaloptions
Collection of globaloptions (name-value pairs) contained in the "globaloption" nested elements. |
protected java.lang.String |
hostName
If not null, specifies the host name used by the server's commands. |
static java.lang.String |
P4_SERVER_PROTOCOL_PROPERTIES_FILE
Default Perforce server protocol-specific properties file name. |
static java.lang.String |
P4_SERVER_USAGE_PROPERTIES_FILE
Default Perforce server usage properties file name. |
protected IOptionsServer |
p4Server
Perforce server. |
protected java.lang.String |
programName
If not null, will be used to identify the P4Java application's program name to the Perforce server. |
protected java.lang.String |
programVersion
If not null, will be used to identify the P4Java application's program version to the Perforce server. |
protected java.lang.String |
protocolPropertiesFile
Perforce server protocol-specific properties file. |
protected java.util.Properties |
protocolProps
Protocol-specific properties. |
protected java.lang.String |
textLanguage
If not null, use this field to tell the server which language to use in text messages it sends back to the client. |
protected java.lang.String |
unsetClientName
If set, this will be used as the name of the client when no client has actually been explicitly set for the associated server(s). |
protected java.lang.String |
unsetUserName
What will be sent to the Perforce server with each command as the user name if no user name has been explicitly set for servers associated with this UsageOption. |
protected java.lang.String |
usagePropertiesFile
Perforce server usage properties file. |
protected java.util.Properties |
usageProps
Perforce server usage properties. |
protected java.lang.String |
workingDirectory
If not null, this specifies the Perforce server's idea of each command's working directory for the associated server object. |
Fields inherited from class com.perforce.p4java.ant.tasks.PerforceTask |
---|
charset, client, failOnError, fields, FILE_TOKEN_REGEX_PATTERN, fileList, files, fileSpecs, LINE_PADDING, LINE_SEPARATOR, p4Messages, passwd, port, protocol, retFileSpecs, retStatusMessage, user |
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 | |
---|---|
ServerTask()
Default constructor. |
Method Summary | |
---|---|
protected void |
cleanupP4()
Cleanup the Perforce server instance. |
protected void |
cleanupP4Server()
Cleanup the Perforce server instance. |
ServerTask.GlobalOption |
createGlobalOption()
This method is called by an Ant factory method to instantiates a collection of "globaloption" nested elements. |
protected java.util.Properties |
getGlobalOptions()
Combine all of the globaloptions specified by the "globaloption" nested elements. |
IOptionsServer |
getP4Server()
Gets the p4 server. |
protected void |
initP4()
Initialize the Perforce server instance. |
protected void |
initP4Server()
Initialize an instance of the Perforce server from the factory using the specified protocol, server port, protocol specific properties and usage options. |
protected void |
initP4ServerOptions()
Initialize the Perforce server options, such as protocol-specific properties and usage options. |
void |
setAllHosts(boolean allHosts)
Sets the all hosts. |
void |
setHostName(java.lang.String hostName)
Sets the host name. |
void |
setP4Server(IOptionsServer p4Server)
Sets the p4 server. |
void |
setProgramName(java.lang.String programName)
Sets the program name. |
void |
setProgramVersion(java.lang.String programVersion)
Sets the program version. |
void |
setProtocolPropertiesFile(java.lang.String protocolPropertiesFile)
Sets the protocol properties file. |
void |
setProtocolProps(java.util.Properties protocolProps)
Sets the protocol props. |
void |
setTextLanguage(java.lang.String textLanguage)
Sets the text language. |
void |
setUnsetClientName(java.lang.String unsetClientName)
Sets the unset client name. |
void |
setUnsetUserName(java.lang.String unsetUserName)
Sets the unset user name. |
void |
setUsagePropertiesFile(java.lang.String usagePropertiesFile)
Sets the usage properties file. |
void |
setUsageProps(java.util.Properties usageProps)
Sets the usage props. |
void |
setWorkingDirectory(java.lang.String workingDirectory)
Sets the working directory. |
Methods inherited from class com.perforce.p4java.ant.tasks.PerforceTask |
---|
addFileset, createField, createFile, execP4Command, execute, getFields, getFiles, getFileSpecs, getRetFileSpecs, getRetStatusMessage, init, isEmpty, logChangelistSummaries, logChangelistSummary, logExtendedFileSpec, logExtendedFileSpecs, logFileDiff, logFileDiffs, logFileLineMatch, logFileLineMatches, logFileSpec, logFileSpecs, logFix, logFixes, logJob, logJobs, parseChangelist, setCharset, setClient, setFailOnError, setFiles, setPasswd, setPort, setProtocol, setUser |
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 |
---|
protected java.util.List<ServerTask.GlobalOption> globaloptions
public static final java.lang.String P4_SERVER_PROTOCOL_PROPERTIES_FILE
public static final java.lang.String P4_SERVER_USAGE_PROPERTIES_FILE
protected IOptionsServer p4Server
protected java.lang.String protocolPropertiesFile
protected java.lang.String usagePropertiesFile
protected java.util.Properties protocolProps
protected java.util.Properties usageProps
protected java.lang.String programName
protected java.lang.String programVersion
protected java.lang.String workingDirectory
This affects all commands on the associated server from this point on, and the passed-in path should be both absolute and valid, otherwise strange errors may appear from the server. If workingDirectory is null, the Java VM's actual current working directory at the time this object is constructed is used instead (which is almost always a safe option unless you're using Perforce alt roots).
Note: no checking is done at any time for correctness (or otherwise) of the workingDirectory option.
protected java.lang.String hostName
protected java.lang.String textLanguage
protected java.lang.String unsetUserName
protected java.lang.String unsetClientName
protected boolean allHosts
protected Options commandOptions
Constructor Detail |
---|
public ServerTask()
Method Detail |
---|
public ServerTask.GlobalOption createGlobalOption()
public IOptionsServer getP4Server()
public void setP4Server(IOptionsServer p4Server)
p4Server
- the new p4 serverpublic void setProtocolPropertiesFile(java.lang.String protocolPropertiesFile)
protocolPropertiesFile
- the new protocol properties filepublic void setUsagePropertiesFile(java.lang.String usagePropertiesFile)
usagePropertiesFile
- the new usage properties filepublic void setProtocolProps(java.util.Properties protocolProps)
protocolProps
- the new protocol propspublic void setUsageProps(java.util.Properties usageProps)
usageProps
- the new usage propspublic void setProgramName(java.lang.String programName)
programName
- the new program namepublic void setProgramVersion(java.lang.String programVersion)
programVersion
- the new program versionpublic void setWorkingDirectory(java.lang.String workingDirectory)
workingDirectory
- the new working directorypublic void setHostName(java.lang.String hostName)
hostName
- the new host namepublic void setTextLanguage(java.lang.String textLanguage)
textLanguage
- the new text languagepublic void setUnsetUserName(java.lang.String unsetUserName)
unsetUserName
- the new unset user namepublic void setUnsetClientName(java.lang.String unsetClientName)
unsetClientName
- the new unset client namepublic void setAllHosts(boolean allHosts)
allHosts
- the new all hostsprotected void initP4Server()
protected void initP4ServerOptions()
protected void cleanupP4Server()
protected void initP4() throws org.apache.tools.ant.BuildException
initP4
in class PerforceTask
org.apache.tools.ant.BuildException
- the build exceptionPerforceTask.initP4()
protected void cleanupP4() throws org.apache.tools.ant.BuildException
cleanupP4
in class PerforceTask
org.apache.tools.ant.BuildException
- the build exceptionPerforceTask.cleanupP4()
protected java.util.Properties getGlobalOptions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |