org.jfrog.build.vcs.perforce
Class PerforceClient

java.lang.Object
  extended by org.jfrog.build.vcs.perforce.PerforceClient

public class PerforceClient
extends java.lang.Object

Client to communicate with perforce.


Nested Class Summary
static class PerforceClient.Builder
           
 
Constructor Summary
PerforceClient(com.perforce.p4java.server.IOptionsServer server, com.perforce.p4java.client.IClient client)
           
 
Method Summary
 void closeConnection()
           
 void commitWorkingCopy(int changeListId, java.lang.String commitMessage)
           
 void createLabel(java.lang.String labelName, java.lang.String description, java.lang.String changeListId)
           
 int createNewChangeList()
          Creates a new changelist and returns it's id number
 void deleteChangeList(int changeListId)
           
 void deleteLabel(java.lang.String labelName)
           
 void editFile(int changeListId, java.io.File file)
           
 int getDefaultChangeListId()
           
 void initConnection()
           
 void revertWorkingCopy(int changeListId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerforceClient

public PerforceClient(com.perforce.p4java.server.IOptionsServer server,
                      com.perforce.p4java.client.IClient client)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

initConnection

public void initConnection()
                    throws java.lang.Exception
Throws:
java.lang.Exception

createNewChangeList

public int createNewChangeList()
                        throws java.io.IOException
Creates a new changelist and returns it's id number

Returns:
The id of the newly created changelist
Throws:
java.io.IOException - In case of errors communicating with perforce server

editFile

public void editFile(int changeListId,
                     java.io.File file)
              throws java.io.IOException
Throws:
java.io.IOException

commitWorkingCopy

public void commitWorkingCopy(int changeListId,
                              java.lang.String commitMessage)
                       throws java.io.IOException
Throws:
java.io.IOException

createLabel

public void createLabel(java.lang.String labelName,
                        java.lang.String description,
                        java.lang.String changeListId)
                 throws java.io.IOException
Throws:
java.io.IOException

deleteLabel

public void deleteLabel(java.lang.String labelName)
                 throws java.io.IOException
Throws:
java.io.IOException

revertWorkingCopy

public void revertWorkingCopy(int changeListId)
                       throws java.io.IOException
Throws:
java.io.IOException

getDefaultChangeListId

public int getDefaultChangeListId()
                           throws java.io.IOException
Throws:
java.io.IOException

deleteChangeList

public void deleteChangeList(int changeListId)
                      throws java.io.IOException
Throws:
java.io.IOException

closeConnection

public void closeConnection()
                     throws java.io.IOException
Throws:
java.io.IOException