com.tek42.perforce.parse
Class Status
java.lang.Object
com.tek42.perforce.parse.AbstractPerforceTemplate
com.tek42.perforce.parse.Status
public class Status
- extends AbstractPerforceTemplate
Allows checking the status of the depot.
- Author:
- Mike Wille
|
Method Summary |
boolean |
exists(String path)
Checks the specified path to see if it exists in the depot. |
boolean |
isValid()
Checks the environment to see if it is valid. |
| Methods inherited from class com.tek42.perforce.parse.AbstractPerforceTemplate |
getExtraParams, getLogger, getP4Exe, getPerforceResponse, getPerforceResponse, getRawPerforceResponseBytes, getRawPerforceResponseLines, hitMax, login, parseList, saveToPerforce |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Status
public Status(Depot depot)
isValid
public boolean isValid()
throws PerforceException
- Checks the environment to see if it is valid. To check the validity of the environment, the user information is
accessed. This ensures that the server can be contacted and that the password is set properly.
If the environment is valid, this method will return true. Otherwise, it will throw a
PerforceException with a message regarding the failure.
- Throws:
PerforceException
exists
public boolean exists(String path)
throws PerforceException
- Checks the specified path to see if it exists in the depot. This may take a bit of time the first time it is
called. It seems perforce takes a bit to wake up.
The path must end with the perforce wildcard: /... Otherwise it will return no results.
Note: this method may move once the API is more complete.
- Parameters:
path - Path to check, example: //depot/MyProject/...
- Returns:
- True if it exists, false if not.
- Throws:
PerforceException
Copyright © 2004-2012 Hudson. All Rights Reserved.