public class ConnectionHelper extends SessionHelper implements AutoCloseable
Constructor and Description |
---|
ConnectionHelper(hudson.model.ItemGroup context,
String credentialID,
hudson.model.TaskListener listener) |
ConnectionHelper(hudson.model.Item job,
String credentialID,
hudson.model.TaskListener listener) |
ConnectionHelper(P4BaseCredentials credential) |
ConnectionHelper(P4BaseCredentials credential,
hudson.model.TaskListener listener) |
ConnectionHelper(hudson.model.Run run,
String credentialID,
hudson.model.TaskListener listener) |
ConnectionHelper(String credentialID,
hudson.model.TaskListener listener)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected String |
buildRevisionLimit(String path,
P4Ref from,
P4Ref to)
Build a revision limit spec.
|
void |
close() |
String |
counterToChange(String name)
Look for a counter and return a change or reference.
|
void |
deleteClient(String name)
Delete a client workspace
|
List<com.perforce.p4java.core.file.IFileSpec> |
getChangeFiles(long id,
int limit) |
com.perforce.p4java.core.IChangelistSummary |
getChangeSummary(long id) |
List<com.perforce.p4java.core.file.IFileSpec> |
getCommitFiles(String repo,
String sha) |
String |
getCounter(String id)
Get Perforce Counter
|
List<com.perforce.p4java.core.file.IFileSpec> |
getDirs(List<String> paths)
Gets a list of Dirs given a path (multi-branch?)
|
String |
getEmail(String userName) |
com.perforce.p4java.graph.ICommit |
getGraphCommit(String sha,
String repo) |
P4Ref |
getGraphHead(String repo)
Get the last SHA commited to the specified repo.
|
long |
getHead(String path,
P4Ref from,
P4Ref to)
Get the latest change on the given path
|
long |
getHeadLimit() |
List<com.perforce.p4java.core.IFix> |
getJobs(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.
|
long |
getLowestHead(String path,
P4Ref from,
P4Ref to)
Get the lowest change on the given path
|
protected int |
getMaxChangeLimit() |
List<com.perforce.p4java.core.file.IFileSpec> |
getShelvedFiles(int id)
Find all files within a shelf.
|
List<com.perforce.p4java.core.IStreamSummary> |
getStreams(List<String> paths)
Gets a list of Dirs given a path (multi-stream?)
|
String |
getSwarm() |
boolean |
hasFile(String depotPath) |
boolean |
isClient(String name)
Test if given name is a client
|
boolean |
isCounter(String name)
Test if given name is a counter
|
boolean |
isLabel(String name)
Test if given name is a label
|
String |
labelToChange(String name)
Look for a label and return a change or static label.
|
List<com.perforce.p4java.core.IRepo> |
listAllRepos()
List all Graph Repos
|
List<P4Ref> |
listCommits(List<P4Ref> fromRefs,
P4Ref to)
List graph Commits with in range of SHAs
|
List<com.perforce.p4java.core.IRepo> |
listRepos(String path)
List of Graph Repos based on a path
|
void |
setLabel(com.perforce.p4java.impl.generic.core.Label label)
Create/Update a Perforce Label
|
abort, checkVersion, disconnect, getConnection, getP4SCM, getTicket, getTrust, getValidate, hasAborted, invalidateSession, invalidateSession, isConnected, isUnicode, login, logout
findCredential, findCredential, findCredential, findCredential, getAuthorisationConfig, getCredential, getListener, getPort, getRetry, getTick, getUser, log
@Deprecated public ConnectionHelper(String credentialID, hudson.model.TaskListener listener) throws IOException
IOException
public ConnectionHelper(hudson.model.ItemGroup context, String credentialID, hudson.model.TaskListener listener) throws IOException
IOException
public ConnectionHelper(hudson.model.Item job, String credentialID, hudson.model.TaskListener listener) throws IOException
IOException
public ConnectionHelper(hudson.model.Run run, String credentialID, hudson.model.TaskListener listener) throws IOException
IOException
public ConnectionHelper(P4BaseCredentials credential, hudson.model.TaskListener listener) throws IOException
IOException
public ConnectionHelper(P4BaseCredentials credential) throws IOException
IOException
public List<com.perforce.p4java.core.file.IFileSpec> getDirs(List<String> paths) throws Exception
paths
- list of paths to look for dirs (only takes * as wildcard)Exception
- push up stackpublic List<com.perforce.p4java.core.IStreamSummary> getStreams(List<String> paths) throws Exception
paths
- list of path to look for streams (takes ... or * as wildcard)Exception
- push up stackpublic com.perforce.p4java.core.IChangelistSummary getChangeSummary(long id) throws com.perforce.p4java.exception.P4JavaException
com.perforce.p4java.exception.P4JavaException
public List<com.perforce.p4java.core.IFix> getJobs(int id) throws com.perforce.p4java.exception.P4JavaException
com.perforce.p4java.exception.P4JavaException
public boolean isCounter(String name) throws Exception
name
- Couner nameException
- push up stackpublic String getCounter(String id) throws Exception
id
- Counter nameException
- push up stackpublic boolean isLabel(String name) throws Exception
name
- Label nameException
- push up stackpublic String labelToChange(String name)
name
- labelpublic String counterToChange(String name)
name
- counterpublic boolean isClient(String name) throws Exception
name
- Client nameException
- push up stackpublic void deleteClient(String name) throws Exception
name
- Client nameException
- push up stackpublic com.perforce.p4java.impl.generic.core.Label getLabel(String id) throws Exception
id
- Label nameException
- push up stackpublic void setLabel(com.perforce.p4java.impl.generic.core.Label label) throws Exception
label
- Label nameException
- push up stackpublic List<com.perforce.p4java.core.file.IFileSpec> getLabelFiles(String id, int limit) throws Exception
id
- Label name or change number (as string)limit
- Max results (-m value)Exception
- push up stackpublic List<com.perforce.p4java.core.file.IFileSpec> getChangeFiles(long id, int limit) throws Exception
Exception
public List<com.perforce.p4java.core.file.IFileSpec> getShelvedFiles(int id) throws Exception
id
- Shelf IDException
- push up stackpublic String getSwarm() throws com.perforce.p4java.exception.P4JavaException
com.perforce.p4java.exception.P4JavaException
public long getHead(String path, P4Ref from, P4Ref to) throws Exception
path
- Perforce depot path //foo/...from
- From revision (change or label)to
- To revision (change or label)Exception
- push up stackprotected String buildRevisionLimit(String path, P4Ref from, P4Ref to)
path
- Perforce depot or client path //foo/...from
- From revision (change or label)to
- To revision (change or label)public long getLowestHead(String path, P4Ref from, P4Ref to) throws Exception
path
- Perforce depot path //foo/...from
- revision specifierto
- revision specifierException
- push up stackpublic com.perforce.p4java.graph.ICommit getGraphCommit(String sha, String repo) throws com.perforce.p4java.exception.P4JavaException
com.perforce.p4java.exception.P4JavaException
public List<com.perforce.p4java.core.file.IFileSpec> getCommitFiles(String repo, String sha) throws com.perforce.p4java.exception.P4JavaException
com.perforce.p4java.exception.P4JavaException
public P4Ref getGraphHead(String repo)
repo
- a graph repopublic List<P4Ref> listCommits(List<P4Ref> fromRefs, P4Ref to) throws Exception
fromRefs
- Array of potential SHAs (include other repos)to
- The last SHA to list commitsException
- push up stackpublic List<com.perforce.p4java.core.IRepo> listAllRepos() throws Exception
Exception
- push up stackpublic List<com.perforce.p4java.core.IRepo> listRepos(String path) throws Exception
path
- Path filterException
- push up stackprotected int getMaxChangeLimit()
public long getHeadLimit()
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2016–2022. All rights reserved.