|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.perforce.maven.scm.provider.p4.command.P4Executor
public abstract class P4Executor
Base class for Perforce server and client commands. It defines some common properties and methods shared by most Perforce commands. This class is further extended by a base server and a base client classes.
Field Summary | |
---|---|
protected com.perforce.p4java.client.IClient |
client
Perforce client. |
protected org.apache.maven.scm.ScmFileSet |
fileSet
SCM file set. |
protected org.apache.maven.scm.log.ScmLogger |
logger
SCM logger. |
static String |
P4_CHANGELIST_DESCRIPTION_PROPERTY
The Constant P4_CHANGELIST_PROPERTY. |
static String |
P4_CHANGELIST_PROPERTY
The Constant P4_CHANGELIST_PROPERTY. |
static String |
P4_CHARSET_PROPERTY
The Constant P4_CHARSET_PROPERTY. |
static String |
P4_CLIENT_PROPERTY
The Constant P4_CLIENT_PROPERTY. |
static String |
P4_FROM_CHANGELIST_PROPERTY
The Constant P4_FROM_CHANGELIST_PROPERTY. |
static String |
P4_JOBS_PROPERTY
The Constant P4_JOBS_PROPERTY. |
static String |
P4_LOCK_TAG_PROPERTY
The Constant P4_LOCK_TAG_PROPERTY. |
static String |
P4_PASSWD_PROPERTY
The Constant P4_PASSWD_PROPERTY. |
static String |
P4_PORT_PROPERTY
The Constant P4_PORT_PROPERTY. |
static String |
P4_TO_CHANGELIST_PROPERTY
The Constant P4_TO_CHANGELIST_PROPERTY. |
static String |
P4_USER_PROPERTY
The Constant P4_USER_PROPERTY. |
protected String |
p4Charset
Character set used for translation of unicode files. |
protected String |
p4Client
Perforce client. |
protected boolean |
p4ClientCreated
Perforce client created. |
protected com.perforce.p4java.option.server.LoginOptions |
p4LoginOptions
The p4 login options. |
protected String |
p4Passwd
Perforce password. |
protected String |
p4Port
Perforce port. |
protected com.perforce.p4java.option.UsageOptions |
p4ServerOptions
Perforce server options. |
protected Properties |
p4ServerProperties
Perforce server properties. |
protected String |
p4User
Perforce user. |
protected P4ScmProviderRepository |
repository
P4 SCM provider repository. |
protected com.perforce.p4java.server.IOptionsServer |
server
Perforce server. |
Constructor Summary | |
---|---|
P4Executor(P4ScmProviderRepository repository,
org.apache.maven.scm.ScmFileSet fileSet,
org.apache.maven.scm.log.ScmLogger logger)
Instantiates a new p4 command helper. |
Method Summary | |
---|---|
protected abstract void |
cleanP4()
Cleanup Perforce server and client instances; logout, disconnect, etc. |
protected com.perforce.p4java.impl.generic.client.ClientView.ClientViewMapping |
createClientViewMapping(P4ScmProviderRepository repo,
File basedir)
Creates the client view mapping. |
static String |
encodeWildcards(String filePath)
Perforce wildcards expansion. |
protected String |
generateClientName()
Generate a Perforce client workspace name. |
static String |
getCanonicalRepoPath(String repoPath)
Gets the canonical repo path. |
com.perforce.p4java.client.IClient |
getClient()
Gets the client. |
org.apache.maven.scm.ScmFileSet |
getFileSet()
Gets the file set. |
org.apache.maven.scm.log.ScmLogger |
getLogger()
Gets the logger. |
String |
getP4Charset()
Gets the p4 charset. |
String |
getP4Client()
Gets the p4 client. |
com.perforce.p4java.option.server.LoginOptions |
getP4LoginOptions()
Gets the p4 login options. |
String |
getP4Passwd()
Gets the p4 passwd. |
String |
getP4Port()
Gets the p4 port. |
com.perforce.p4java.option.UsageOptions |
getP4ServerOptions()
Gets the p4 server options. |
Properties |
getP4ServerProperties()
Gets the p4 server properties. |
String |
getP4User()
Gets the p4 user. |
String |
getRepoLocation(String path)
Gets the repo location. |
String |
getRepoPath(P4ScmProviderRepository repo,
File basedir)
Gets the repo path. |
P4ScmProviderRepository |
getRepository()
Gets the repository. |
com.perforce.p4java.server.IOptionsServer |
getServer()
Gets the server. |
protected abstract void |
initP4()
Initialize Perforce server and client instances. |
boolean |
isClientNameGenerated()
Checks if is client name generated. |
static boolean |
isEmpty(String value)
Checks if is empty. |
boolean |
isP4ClientCreated()
Checks if is p4 client created. |
static int |
parseChangelist(String changelist)
Parse the changelist string to a changelist number. |
void |
setClient(com.perforce.p4java.client.IClient client)
Sets the client. |
void |
setFileSet(org.apache.maven.scm.ScmFileSet fileSet)
Sets the file set. |
void |
setLogger(org.apache.maven.scm.log.ScmLogger logger)
Sets the logger. |
void |
setP4Charset(String p4Charset)
Sets the p4 charset. |
void |
setP4Client(String p4Client)
Sets the p4 client. |
void |
setP4ClientCreated(boolean p4ClientCreated)
Sets the p4 client created. |
void |
setP4LoginOptions(com.perforce.p4java.option.server.LoginOptions p4LoginOptions)
Sets the p4 login options. |
void |
setP4Passwd(String p4Passwd)
Sets the p4 passwd. |
void |
setP4Port(String p4Port)
Sets the p4 port. |
void |
setP4ServerOptions(com.perforce.p4java.option.UsageOptions p4ServerOptions)
Sets the p4 server options. |
void |
setP4ServerProperties(Properties p4ServerProperties)
Sets the p4 server properties. |
void |
setP4User(String p4User)
Sets the p4 user. |
void |
setRepository(P4ScmProviderRepository repository)
Sets the repository. |
void |
setServer(com.perforce.p4java.server.IOptionsServer server)
Sets the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String P4_PORT_PROPERTY
public static final String P4_USER_PROPERTY
public static final String P4_PASSWD_PROPERTY
public static final String P4_CHARSET_PROPERTY
public static final String P4_CLIENT_PROPERTY
public static final String P4_JOBS_PROPERTY
public static final String P4_CHANGELIST_PROPERTY
public static final String P4_CHANGELIST_DESCRIPTION_PROPERTY
public static final String P4_FROM_CHANGELIST_PROPERTY
public static final String P4_TO_CHANGELIST_PROPERTY
public static final String P4_LOCK_TAG_PROPERTY
protected com.perforce.p4java.server.IOptionsServer server
protected com.perforce.p4java.client.IClient client
protected Properties p4ServerProperties
protected com.perforce.p4java.option.UsageOptions p4ServerOptions
protected com.perforce.p4java.option.server.LoginOptions p4LoginOptions
protected org.apache.maven.scm.log.ScmLogger logger
protected P4ScmProviderRepository repository
protected org.apache.maven.scm.ScmFileSet fileSet
protected String p4Client
protected String p4Charset
protected String p4Port
protected String p4User
protected String p4Passwd
protected boolean p4ClientCreated
Constructor Detail |
---|
public P4Executor(P4ScmProviderRepository repository, org.apache.maven.scm.ScmFileSet fileSet, org.apache.maven.scm.log.ScmLogger logger) throws org.apache.maven.scm.ScmException
repository
- the repositoryfileSet
- the file setlogger
- the logger
org.apache.maven.scm.ScmException
- the scm exceptionMethod Detail |
---|
public com.perforce.p4java.server.IOptionsServer getServer()
public void setServer(com.perforce.p4java.server.IOptionsServer server)
server
- the new serverpublic com.perforce.p4java.client.IClient getClient()
public void setClient(com.perforce.p4java.client.IClient client)
client
- the new clientpublic Properties getP4ServerProperties()
public void setP4ServerProperties(Properties p4ServerProperties)
p4ServerProperties
- the new p4 server propertiespublic com.perforce.p4java.option.UsageOptions getP4ServerOptions()
public void setP4ServerOptions(com.perforce.p4java.option.UsageOptions p4ServerOptions)
p4ServerOptions
- the new p4 server optionspublic com.perforce.p4java.option.server.LoginOptions getP4LoginOptions()
public void setP4LoginOptions(com.perforce.p4java.option.server.LoginOptions p4LoginOptions)
p4LoginOptions
- the new p4 login optionspublic org.apache.maven.scm.log.ScmLogger getLogger()
public void setLogger(org.apache.maven.scm.log.ScmLogger logger)
logger
- the new loggerpublic P4ScmProviderRepository getRepository()
public void setRepository(P4ScmProviderRepository repository)
repository
- the new repositorypublic org.apache.maven.scm.ScmFileSet getFileSet()
public void setFileSet(org.apache.maven.scm.ScmFileSet fileSet)
fileSet
- the new file setpublic String getP4Client()
public void setP4Client(String p4Client)
p4Client
- the new p4 clientpublic String getP4Charset()
public void setP4Charset(String p4Charset)
p4Charset
- the new p4 charsetpublic String getP4Port()
public void setP4Port(String p4Port)
p4Port
- the new p4 portpublic String getP4User()
public void setP4User(String p4User)
p4User
- the new p4 userpublic String getP4Passwd()
public void setP4Passwd(String p4Passwd)
p4Passwd
- the new p4 passwdpublic boolean isP4ClientCreated()
public void setP4ClientCreated(boolean p4ClientCreated)
p4ClientCreated
- the new p4 client createdprotected abstract void initP4() throws org.apache.maven.scm.ScmException
org.apache.maven.scm.ScmException
- the scm exceptionprotected abstract void cleanP4() throws org.apache.maven.scm.ScmException
org.apache.maven.scm.ScmException
- the scm exceptionprotected String generateClientName()
public boolean isClientNameGenerated()
protected com.perforce.p4java.impl.generic.client.ClientView.ClientViewMapping createClientViewMapping(P4ScmProviderRepository repo, File basedir)
repo
- the repobasedir
- the basedir
public String getRepoLocation(String path)
path
- the path
public String getRepoPath(P4ScmProviderRepository repo, File basedir)
repo
- the repobasedir
- the basedir
public static String getCanonicalRepoPath(String repoPath)
repoPath
- the repo path
public static int parseChangelist(String changelist)
changelist
- the changelist
public static String encodeWildcards(String filePath)
filePath
- the file path
public static boolean isEmpty(String value)
value
- the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |