|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tek42.perforce.Depot
public class Depot
Represents the root object from which to interact with a Perforce server.
As an example of usage:
// Setup
Depot depot = new Depot();
depot.setPort("perforce.com:1666");
depot.setUser("username");
depot.setPassword("password");
depot.setWorkspace("workspace");
// Test
depot.isValid() // returns true if so
// Look at the last change for a project...
List<Changelist> changes = depot.getChanges().getChangelists("//depot/ProjectName/...", -1, 1);
System.out.println(Last Change is: " + changes.get(0));
| Constructor Summary | |
|---|---|
Depot()
|
|
Depot(ExecutorFactory factory)
|
|
| Method Summary | |
|---|---|
void |
appendPath(java.lang.String path)
Append the path element to the existing path. |
Changes |
getChanges()
Retrieves the Changes object for interacting with this depot's changelists |
java.lang.String |
getClient()
Returns the P4CLIENT. |
Counters |
getCounters()
Retrieves the Counters object for interacting with this depot's counters. |
ExecutorFactory |
getExecFactory()
Ensures that the latest settings are reflected in the ExecutorFactory before it is used. |
java.lang.String |
getExecutable()
Returns the path to the executable. |
Groups |
getGroups()
Retrieves the Groups object for interacting with this depot's groups. |
Labels |
getLabels()
Retrieves the labels object for interacting with this depot's labels. |
org.slf4j.Logger |
getLogger()
|
java.lang.String |
getP4Ticket()
Returns the ticket value for this depot's user. |
java.lang.String |
getPassword()
Returns the P4PASSWORD. |
java.lang.String |
getPath()
Returns the path |
Env |
getPerforceEnv()
Obtain a legacy perforce Env object for using legacy API. |
java.lang.String |
getPort()
Returns the P4PORT. |
java.lang.String |
getProperty(java.lang.String key)
Gets a property specified by key |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String def)
Gets a value specified by key. |
long |
getServerTimeout()
Return the server timeout threshold. |
Status |
getStatus()
Retrieves the status object for interacting with the depot's status. |
java.lang.String |
getSystemDrive()
Returns the system drive |
java.lang.String |
getSystemRoot()
Returns the system root. |
java.lang.String |
getUser()
Returns the P4USER. |
Users |
getUsers()
Retrieves the Users object for interacting with this depot's users. |
Workspaces |
getWorkspaces()
Retrieves the Workspaces object for interacting with this depot's workspaces |
java.lang.String |
info()
Returns the output created by "p4 info" |
static boolean |
safeEquals(java.lang.String newValue,
java.lang.String currentValue)
|
void |
setClient(java.lang.String client)
Sets the P4CLIENT in the class information. |
void |
setExecutable(java.lang.String exe)
Sets up the path to reach the p4 executable. |
void |
setP4Ticket(java.lang.String ticket)
If using tickets, set the value of the ticket for this depot's user. |
void |
setPassword(java.lang.String password)
Sets the P4PASSWD in the class information. |
void |
setPath(java.lang.String path)
Sets the PATH in the class information. |
void |
setPort(java.lang.String port)
Sets the P4PORT in the class information. |
void |
setServerTimeout(long threshold)
Set the server timeout threshold. |
void |
setSystemDrive(java.lang.String drive)
Sets the SystemDrive in the class information. |
void |
setSystemRoot(java.lang.String root)
Sets the SystemRoot in the class information. |
void |
setUser(java.lang.String user)
Sets the P4USER in the class information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Depot()
public Depot(ExecutorFactory factory)
| Method Detail |
|---|
public ExecutorFactory getExecFactory()
public org.slf4j.Logger getLogger()
public Env getPerforceEnv()
Env objectpublic Changes getChanges()
public Workspaces getWorkspaces()
public Users getUsers()
public Labels getLabels()
public Groups getGroups()
public Counters getCounters()
Counters object for interacting with this depot's counters.
public Status getStatus()
E.g., depot.getStatus().isValid() for checking if the settings are correct.
public java.lang.String info()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getProperty(java.lang.String key)
key -
public java.lang.String getProperty(java.lang.String key,
java.lang.String def)
key - def -
public void setUser(java.lang.String user)
user - P4USER value.public java.lang.String getUser()
public void setClient(java.lang.String client)
user - P4CLIENT value.public java.lang.String getClient()
public void setPort(java.lang.String port)
user - P4PORT value.public java.lang.String getPort()
public void setPassword(java.lang.String password)
user - P4PASSWD value.public java.lang.String getPassword()
public void setPath(java.lang.String path)
path - PATH value.public void appendPath(java.lang.String path)
path - the path element to be appended.public java.lang.String getPath()
public void setSystemDrive(java.lang.String drive)
user - SystemDrive value.public java.lang.String getSystemDrive()
public void setSystemRoot(java.lang.String root)
user - SystemRoot value.public java.lang.String getSystemRoot()
public void setExecutable(java.lang.String exe)
p4.executable=/usr/bin/p4 # This will work p4.executable=/usr/bin/ # This will work p4.executable=/usr/bin # This won't work
exe - Full path to the p4 executable.public java.lang.String getExecutable()
public void setServerTimeout(long threshold)
threshold - public long getServerTimeout()
public java.lang.String getP4Ticket()
public void setP4Ticket(java.lang.String ticket)
ticket - the p4Ticket to set
public static boolean safeEquals(java.lang.String newValue,
java.lang.String currentValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||