Interface ILabelDelegator
-
- All Known Subinterfaces:
IOptionsServer
,IServer
,IStreamingServer
- All Known Implementing Classes:
LabelDelegator
,NtsServerImpl
,OneShotServerImpl
,RpcServer
,Server
public interface ILabelDelegator
Interface to handle the Label command.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
createLabel(ILabel label)
Create a new Perforce label in the Perforce server.java.lang.String
deleteLabel(java.lang.String labelName, boolean force)
Delete a named Perforce label from the Perforce server.java.lang.String
deleteLabel(java.lang.String labelName, DeleteLabelOptions opts)
Delete a named Perforce label from the Perforce server.ILabel
getLabel(java.lang.String labelName)
Get a specific named Perforce label.java.lang.String
updateLabel(ILabel label)
Update an existing Perforce label in the Perforce server.
-
-
-
Method Detail
-
getLabel
ILabel getLabel(java.lang.String labelName) throws ConnectionException, RequestException, AccessException
Get a specific named Perforce label.Unlike the getLabelList method, the getViewMapping method on the returned label will be valid. Note though that changes to the returned label or its view will not be reflected on to the server unless the updateLabel method is called with the label as an argument.
- Parameters:
labelName
- non-null label name- Returns:
- ILabel representing the associated Perforce label, or null if no such label exists on the server.
- Throws:
ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its processing of the requestAccessException
- if the Perforce server denies access to the caller
-
createLabel
java.lang.String createLabel(@Nonnull ILabel label) throws ConnectionException, RequestException, AccessException
Create a new Perforce label in the Perforce server.- Parameters:
label
- non-null ILabel to be saved- 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:
ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its processing of the requestAccessException
- if the Perforce server denies access to the caller
-
updateLabel
java.lang.String updateLabel(@Nonnull ILabel label) throws ConnectionException, RequestException, AccessException
Update an existing Perforce label in the Perforce server.- Parameters:
label
- non-null ILabel to be updated- 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:
ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its processing of the requestAccessException
- if the Perforce server denies access to the caller
-
deleteLabel
java.lang.String deleteLabel(java.lang.String labelName, boolean force) throws ConnectionException, RequestException, AccessException
Delete a named Perforce label from the Perforce server.- Parameters:
labelName
- non-null label nameforce
- if true, forces the deletion of any label; normally labels can only be deleted by their owner- 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:
ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its processing of the requestAccessException
- if the Perforce server denies access to the caller
-
deleteLabel
java.lang.String deleteLabel(java.lang.String labelName, DeleteLabelOptions opts) throws P4JavaException
Delete a named Perforce label from the Perforce server.- Parameters:
labelName
- non-null label nameopts
- DeleteLabelOptions 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.
-
-