Interface IBranchDelegator
- All Known Subinterfaces:
IOptionsServer,IServer,IStreamingServer
- All Known Implementing Classes:
BranchDelegator,NtsServerImpl,OneShotServerImpl,RpcServer,Server
public interface IBranchDelegator
-
Method Summary
Modifier and TypeMethodDescriptioncreateBranchSpec(IBranchSpec branchSpec) TODO: This should be moved up to Server and changed to delegate to createBranchSpec with an options class.deleteBranchSpec(String branchSpecName, boolean force) Deprecated.deleteBranchSpec(String branchSpecName, DeleteBranchSpecOptions opts) Delete a named Perforce branch spec from the Perforce server.getBranchSpec(String name) Get the branch spec for the given name.getBranchSpec(String name, GetBranchSpecOptions opts) Get a specific named Perforce branch spec from the Perforce server.updateBranchSpec(IBranchSpec branchSpec) Update the data fields in an existing branch spec.
-
Method Details
-
getBranchSpec
Get a specific named Perforce branch spec from the Perforce server.Note that since the Perforce server usually interprets asking for a non-existent branch spec as equivalent to asking for a template for a new branch spec, you will normally always get back a result here. It is best to first use the getBranchSpecList method to see if the branch spec exists, then use this method to retrieve a specific branch spec once you know it exists.
- Parameters:
name- non-null Perforce branch name.opts- GetBranchSpecOptions object describing optional parameters; if null, no options are set.- Returns:
- potentially-null IBranchSpec for the named Perforce branch spec.
- Throws:
P4JavaException- if any error occurs in the processing of this method.- Since:
- 2011.2
-
deleteBranchSpec
Delete a named Perforce branch spec from the Perforce server.- Parameters:
branchSpecName- non-null name of the branch spec to be deleted.opts- DeleteBranchSpecOptions object describing optional parameters; if null, no options are set.- Returns:
- non-null result message string from the Perforce server; this may include form trigger output pre-pended and / or appended to the "normal" message
- Throws:
P4JavaException- if any error occurs in the processing of this method.
-
getBranchSpec
IBranchSpec getBranchSpec(String name) throws ConnectionException, RequestException, AccessException Get the branch spec for the given name.- Parameters:
name- the name of the branch- Returns:
- a populated branch spec object
- Throws:
ConnectionException- when there is an error talking to the Helix serverRequestException- when there is a problem with the data provided in the requestAccessException- when access to the branch command is not authorised
-
createBranchSpec
String createBranchSpec(@Nonnull IBranchSpec branchSpec) throws ConnectionException, RequestException, AccessException TODO: This should be moved up to Server and changed to delegate to createBranchSpec with an options class. This would also allow for a force option.- Parameters:
branchSpec- the spec object containing the branch data fields.- Returns:
- The name of the newly create branch spec
- Throws:
ConnectionException- when there is an error talking to the Helix serverRequestException- when there is a problem with the data provided in the requestAccessException- when access to the branch command is not authorised
-
updateBranchSpec
String updateBranchSpec(@Nonnull IBranchSpec branchSpec) throws ConnectionException, RequestException, AccessException Update the data fields in an existing branch spec.- Parameters:
branchSpec- the branch data- Returns:
- the name of the updated spec
- Throws:
ConnectionException- when there is an error talking to the Helix serverRequestException- when there is a problem with the data provided in the requestAccessException- when access to the branch command is not authorised
-
deleteBranchSpec
String deleteBranchSpec(String branchSpecName, boolean force) throws ConnectionException, RequestException, AccessException Deprecated.Delete a branch spec specifing whether it should be a forced operation.- Parameters:
branchSpecName- the name of the spec to deleteforce- whether to force the operation through- Returns:
- name of the deleted spec
- Throws:
ConnectionException- when there is an error talking to the Helix serverRequestException- when there is a problem with the data provided in the requestAccessException- when access to the branch command is not authorised
-
deleteBranchSpec(String, DeleteBranchSpecOptions)instead