public class ConnectionHelper extends Object
Modifier and Type | Field and Description |
---|---|
protected AuthorisationConfig |
authorisationConfig |
protected com.perforce.p4java.server.IOptionsServer |
connection |
protected ConnectionConfig |
connectionConfig |
protected hudson.model.TaskListener |
listener |
Constructor and Description |
---|
ConnectionHelper(P4StandardCredentials credential) |
ConnectionHelper(P4StandardCredentials credential,
hudson.model.TaskListener listener) |
ConnectionHelper(String credentialID,
hudson.model.TaskListener listener) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkVersion(int min)
Checks the Perforce server version number and returns true if greater
than or equal to the min version.
|
void |
disconnect()
Disconnect from the Perforce Server.
|
static P4StandardCredentials |
findCredential(String id)
Finds a Perforce Credential based on the String id.
|
com.perforce.p4java.impl.generic.core.Changelist |
getChange(int id)
Gets the Changelist (p4 describe -s); shouldn't need a client, but
p4-java throws an exception if one is not set.
|
List<com.perforce.p4java.core.file.IFileSpec> |
getChangeFiles(int id) |
com.perforce.p4java.impl.generic.core.Label |
getLabel(String id)
Get Perforce Label
|
List<com.perforce.p4java.core.file.IFileSpec> |
getLabelFiles(String id,
int limit)
Find all files within a label or change.
|
List<com.perforce.p4java.core.file.IFileSpec> |
getShelvedFiles(int id)
Find all files within a shelf.
|
String |
getTrust() |
boolean |
isClient(String name)
Test if given name is a client
|
boolean |
isConnected() |
boolean |
isLabel(String name)
Test if given name is a label
|
boolean |
isUnicode() |
void |
log(String msg) |
boolean |
login() |
void |
logout() |
void |
setLabel(com.perforce.p4java.impl.generic.core.Label label)
Create/Update a Perforce Label
|
void |
stop() |
boolean |
validateFileSpecs(List<com.perforce.p4java.core.file.IFileSpec> fileSpecs,
boolean quiet,
String... ignore) |
void |
validateFileSpecs(List<com.perforce.p4java.core.file.IFileSpec> fileSpecs,
String... ignore)
Look for a message in the returned FileSpec from operation.
|
protected final ConnectionConfig connectionConfig
protected final AuthorisationConfig authorisationConfig
protected com.perforce.p4java.server.IOptionsServer connection
protected final hudson.model.TaskListener listener
public ConnectionHelper(String credentialID, hudson.model.TaskListener listener)
public ConnectionHelper(P4StandardCredentials credential, hudson.model.TaskListener listener)
public ConnectionHelper(P4StandardCredentials credential)
public boolean isConnected()
public boolean isUnicode()
public boolean checkVersion(int min)
min
- public com.perforce.p4java.impl.generic.core.Changelist getChange(int id) throws Exception
id
- Exception
public boolean isLabel(String name) throws Exception
Exception
public boolean isClient(String name) throws Exception
Exception
public com.perforce.p4java.impl.generic.core.Label getLabel(String id) throws Exception
id
- Exception
public void setLabel(com.perforce.p4java.impl.generic.core.Label label) throws Exception
id
- Exception
public List<com.perforce.p4java.core.file.IFileSpec> getLabelFiles(String id, int limit) throws Exception
label
- limit
- Exception
public List<com.perforce.p4java.core.file.IFileSpec> getChangeFiles(int id) throws Exception
Exception
public List<com.perforce.p4java.core.file.IFileSpec> getShelvedFiles(int id) throws Exception
id
- Exception
public void disconnect()
Exception
public void validateFileSpecs(List<com.perforce.p4java.core.file.IFileSpec> fileSpecs, String... ignore) throws Exception
fileSpecs
- ignore
- ConverterException
Exception
public boolean validateFileSpecs(List<com.perforce.p4java.core.file.IFileSpec> fileSpecs, boolean quiet, String... ignore) throws Exception
Exception
public static P4StandardCredentials findCredential(String id)
public void log(String msg)
Copyright © 2004-2015. All Rights Reserved.