com.perforce.maven.scm.provider.p4.command
Class P4ServerExecutor

java.lang.Object
  extended by com.perforce.maven.scm.provider.p4.command.P4Executor
      extended by com.perforce.maven.scm.provider.p4.command.P4ServerExecutor
Direct Known Subclasses:
P4ClientExecutor

public class P4ServerExecutor
extends P4Executor

Base class for Perforce server specific command. It initializes an instance of the Perforce server.


Field Summary
 
Fields inherited from class com.perforce.maven.scm.provider.p4.command.P4Executor
client, fileSet, logger, P4_CHANGELIST_DESCRIPTION_PROPERTY, P4_CHANGELIST_PROPERTY, P4_CHARSET_PROPERTY, P4_CLIENT_PROPERTY, P4_FROM_CHANGELIST_PROPERTY, P4_JOBS_PROPERTY, P4_LOCK_TAG_PROPERTY, P4_PASSWD_PROPERTY, P4_PORT_PROPERTY, P4_TO_CHANGELIST_PROPERTY, P4_USER_PROPERTY, p4Charset, p4Client, p4ClientCreated, p4LoginOptions, p4Passwd, p4Port, p4ServerOptions, p4ServerProperties, p4User, repository, server
 
Constructor Summary
P4ServerExecutor(P4ScmProviderRepository repository, org.apache.maven.scm.ScmFileSet fileSet, org.apache.maven.scm.log.ScmLogger logger)
          Instantiates a new p4 server executor.
 
Method Summary
protected  void cleanP4()
          Cleanup Perforce server and client instances; logout, disconnect, etc.
protected  void cleanServer()
          Cleanup the Perforce server instance.
protected  void initP4()
          Initialize Perforce server and client instances.
protected  void initServer()
          Initialize an instance of the Perforce server from the factory using the specified protocol, server port, protocol specific properties and usage options.
 
Methods inherited from class com.perforce.maven.scm.provider.p4.command.P4Executor
createClientViewMapping, encodeWildcards, generateClientName, getCanonicalRepoPath, getClient, getFileSet, getLogger, getP4Charset, getP4Client, getP4LoginOptions, getP4Passwd, getP4Port, getP4ServerOptions, getP4ServerProperties, getP4User, getRepoLocation, getRepoPath, getRepository, getServer, isClientNameGenerated, isEmpty, isP4ClientCreated, parseChangelist, setClient, setFileSet, setLogger, setP4Charset, setP4Client, setP4ClientCreated, setP4LoginOptions, setP4Passwd, setP4Port, setP4ServerOptions, setP4ServerProperties, setP4User, setRepository, setServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P4ServerExecutor

public P4ServerExecutor(P4ScmProviderRepository repository,
                        org.apache.maven.scm.ScmFileSet fileSet,
                        org.apache.maven.scm.log.ScmLogger logger)
                 throws org.apache.maven.scm.ScmException
Instantiates a new p4 server executor.

Parameters:
repository - the repository
fileSet - the file set
logger - the logger
Throws:
org.apache.maven.scm.ScmException - the scm exception
Method Detail

initServer

protected void initServer()
                   throws org.apache.maven.scm.ScmException
Initialize an instance of the Perforce server from the factory using the specified protocol, server port, protocol specific properties and usage options. Register callback on the server. Connect to server; set the user (if present) to server and login to the server with the user's password (if present).

Throws:
org.apache.maven.scm.ScmException - the scm exception

cleanServer

protected void cleanServer()
                    throws org.apache.maven.scm.ScmException
Cleanup the Perforce server instance. Disconnect from the Perforce server. Also, set the server to null. Note: It does not logout, because that will delete the user's ticket.

Throws:
org.apache.maven.scm.ScmException - the scm exception

initP4

protected void initP4()
               throws org.apache.maven.scm.ScmException
Description copied from class: P4Executor
Initialize Perforce server and client instances. This should be implemented in the Perforce server and client subclasses.

Specified by:
initP4 in class P4Executor
Throws:
org.apache.maven.scm.ScmException - the scm exception
See Also:
P4Executor.initP4()

cleanP4

protected void cleanP4()
                throws org.apache.maven.scm.ScmException
Description copied from class: P4Executor
Cleanup Perforce server and client instances; logout, disconnect, etc. This should be implemented by the Perforce server and client subclasses.

Specified by:
cleanP4 in class P4Executor
Throws:
org.apache.maven.scm.ScmException - the scm exception
See Also:
P4Executor.cleanP4()


Copyright © 2003-2011 Perforce Software. All Rights Reserved.