public class LabelsDelegator extends BaseDelegator implements ILabelsDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
LabelsDelegator(IOptionsServer server)
Instantiate a new LabelsDelegator, providing the server object that will be used to
execute Perforce Helix attribute commands.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<ILabelSummary> |
getLabels(java.util.List<IFileSpec> fileList,
GetLabelsOptions opts)
Get a list of Perforce labels, optionally tied to a specific set of files.
|
java.util.List<ILabelSummary> |
getLabels(java.lang.String user,
int maxLabels,
java.lang.String nameFilter,
java.util.List<IFileSpec> fileList)
Get a list of Perforce labels, optionally tied to a specific set of
files.
|
public LabelsDelegator(IOptionsServer server)
server
- a concrete implementation of a Perforce Helix Serverpublic java.util.List<ILabelSummary> getLabels(java.lang.String user, int maxLabels, java.lang.String nameFilter, java.util.List<IFileSpec> fileList) throws ConnectionException, RequestException, AccessException
ILabelsDelegator
Note that the ILabel objects returned here do not have views associated with them (i.e. the getViewMapping() method will return an empty list. If you need to get the view mapping for a specific label, use the getLabel() method.
getLabels
in interface ILabelsDelegator
user
- if non-null, limit labels to those owned by the named usermaxLabels
- if larger than zero, return only the first maxLabels (or
fewer) qualifying labelsnameFilter
- if not null, limits output to labels whose name matches the
nameFilter pattern, e.g. -e 'svr-dev-rel*'fileList
- if not null, limits its report to labels that contain those
filesConnectionException
- 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 callerpublic java.util.List<ILabelSummary> getLabels(java.util.List<IFileSpec> fileList, GetLabelsOptions opts) throws P4JavaException
ILabelsDelegator
Note that the ILabel objects returned here do not have views associated with them (i.e. the getViewMapping() method will return an empty list. If you need to get the view mapping for a specific label, use the getLabel() method.
getLabels
in interface ILabelsDelegator
fileList
- if not null, limits its report to labels that contain those filesopts
- GetLabelsOptions object describing optional parameters; if null, no options are
set.P4JavaException
- if any error occurs in the processing of this method.