public class GroupDelegator extends BaseDelegator implements IGroupDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
Constructor and Description |
---|
GroupDelegator(IOptionsServer server)
Instantiate a new GroupDelegator for the given server implementation.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createUserGroup(IUserGroup group)
Implemented on behalf of IServer for backwards compatibility.
|
java.lang.String |
createUserGroup(IUserGroup group,
UpdateUserGroupOptions opts)
Create a new Perforce user group on the Perforce server.
|
java.lang.String |
deleteUserGroup(IUserGroup group)
Implemented on behalf of IServer for backwards compatibility.
|
java.lang.String |
deleteUserGroup(IUserGroup group,
UpdateUserGroupOptions opts)
Delete a Perforce user group from the Perforce server.
|
IUserGroup |
getUserGroup(java.lang.String name)
Get the named Perforce user group.
|
java.lang.String |
updateUserGroup(IUserGroup group,
boolean updateIfOwner)
Implemented on behalf of IServer for backwards compatibility.
|
java.lang.String |
updateUserGroup(IUserGroup group,
UpdateUserGroupOptions opts)
Update a Perforce user group on the Perforce server.
|
public GroupDelegator(IOptionsServer server)
server
- the server to delegate forpublic IUserGroup getUserGroup(@Nonnull java.lang.String name) throws ConnectionException, RequestException, AccessException
IGroupDelegator
getUserGroup
in interface IGroupDelegator
name
- non-null group name.ConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the request.AccessException
- if the Perforce server denies access to the caller.public java.lang.String deleteUserGroup(@Nonnull IUserGroup group, @Nullable UpdateUserGroupOptions opts) throws P4JavaException
IGroupDelegator
deleteUserGroup
in interface IGroupDelegator
group
- non-null group to be deleted.opts
- which delete options to be appliedConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the request.AccessException
- if the Perforce server denies access to the caller.P4JavaException
public java.lang.String createUserGroup(@Nonnull IUserGroup group, @Nullable UpdateUserGroupOptions opts) throws P4JavaException
IGroupDelegator
createUserGroup
in interface IGroupDelegator
group
- non-null IUserGroup to be created.opts
- which create options to be appliedConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the request.AccessException
- if the Perforce server denies access to the caller.P4JavaException
public java.lang.String updateUserGroup(@Nonnull IUserGroup group, @Nullable UpdateUserGroupOptions opts) throws P4JavaException
IGroupDelegator
updateUserGroup
in interface IGroupDelegator
group
- non-null user group to be updated.opts
- which update options to be appliedConnectionException
- if the Perforce server is unreachable or is not connected.RequestException
- if the Perforce server encounters an error during its
processing of the request.AccessException
- if the Perforce server denies access to the caller.P4JavaException
public java.lang.String createUserGroup(@Nonnull IUserGroup group) throws ConnectionException, RequestException, AccessException
group
- groupConnectionException
- on errorRequestException
- on errorAccessException
- on errorpublic java.lang.String updateUserGroup(@Nonnull IUserGroup group, boolean updateIfOwner) throws ConnectionException, RequestException, AccessException
group
- groupupdateIfOwner
- updateIfOwnerConnectionException
- on errorRequestException
- on errorAccessException
- on errorpublic java.lang.String deleteUserGroup(@Nonnull IUserGroup group) throws ConnectionException, RequestException, AccessException
group
- groupConnectionException
- on errorRequestException
- on errorAccessException
- on error