public class UserGroup extends ServerResource implements IUserGroup
refreshable, server, updateableUNLIMITED, UNSET| Constructor and Description |
|---|
UserGroup()
Default constructor.
|
UserGroup(Map<String,Object> map)
Construct a new user group impl from the passed-in map.
|
| Modifier and Type | Method and Description |
|---|---|
UserGroup |
addOwner(String owner) |
UserGroup |
addSubgroup(String subgroup) |
UserGroup |
addUser(String user) |
int |
getMaxLockTime()
Get the maximum lock time for queries by members of this group.
|
int |
getMaxResults()
Get the maximum number of results returned for queries by members
of this group.
|
int |
getMaxScanRows()
Get the maximum number of scan rows returned for queries by members
of this group.
|
String |
getName()
Get the group's name.
|
List<String> |
getOwners()
Get a list of owner names for this group.
|
int |
getPasswordTimeout()
Get the password timeout value associated with this user group.
|
List<String> |
getSubgroups()
Get the list of known subgroups of this groups.
|
int |
getTimeout()
Get the timeout value for commands by members of this group.
|
List<String> |
getUsers()
Get a list of user names for this group.
|
boolean |
isSubGroup()
Return true if this group is a sub group of another group on this server.
|
static UserGroup |
newUserGroup(String name,
List<String> users)
Simple convenience factory method to return a new local UserGroup object.
|
int |
parseGroupIntValue(String str)
Parse a Perforce server-side string representing a user group integer
value (such as timeout).
|
void |
refresh()
Refresh the underlying object from the Perforce server.
|
void |
setMaxLockTime(int maxLockTimeOfMilliSeconds)
Set the maximum lock time for queries by members of this group.
|
void |
setMaxResults(int maxResults)
Set the maximum number of results returned for queries by members
of this group.
|
void |
setMaxScanRows(int maxScanRows)
Set the maximum number of scan rows returned for queries by members
of this group.
|
void |
setName(String name)
Set the group's name.
|
void |
setOwners(List<String> owners)
Deprecated.
Please use method
addOwner(String owner) |
void |
setPasswordTimeout(int passwordTimeoutOfSeconds)
Set the password timeout value associated with this user group.
|
void |
setSubGroup(boolean subGroup)
Set whether this group is a sub group of another group on this server.
|
void |
setSubgroups(List<String> subgroups)
Deprecated.
Please use method
addSubgroup(String subgroup) |
void |
setTimeout(int timeoutOfSeconds)
Set the timeout value for commands by members of this group.
|
void |
setUsers(List<String> users)
Deprecated.
Please use method
addUser(String user) |
void |
update()
Update the Perforce server object associated with the underlying P4Java object,
if possible.
|
canRefresh, canUpdate, complete, setRefreshable, setServer, update, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanRefresh, canUpdate, setServer, update, updatepublic UserGroup()
public UserGroup(@Nullable Map<String,Object> map)
Sets superclass IServerResource fields complete, completeable, refereable and updateable to true.
public static UserGroup newUserGroup(@Nonnull String name, @Nonnull List<String> users)
All fields not passed as parameters here default to the defaults applied by the associated default UserGroup constructor.
name - non-null name for the UserGroup.users - possibly-null list of users to be associated with the group.public void setUsers(List<String> users)
addUser(String user)IUserGroupsetUsers in interface IUserGrouppublic int parseGroupIntValue(String str)
public int getMaxLockTime()
IUserGroupgetMaxLockTime in interface IUserGrouppublic void setMaxLockTime(int maxLockTimeOfMilliSeconds)
IUserGroupsetMaxLockTime in interface IUserGroupmaxLockTimeOfMilliSeconds - - millisecondspublic int getMaxResults()
IUserGroupgetMaxResults in interface IUserGrouppublic void setMaxResults(int maxResults)
IUserGroupsetMaxResults in interface IUserGrouppublic int getMaxScanRows()
IUserGroupgetMaxScanRows in interface IUserGrouppublic void setMaxScanRows(int maxScanRows)
IUserGroupsetMaxScanRows in interface IUserGrouppublic String getName()
IUserGroupgetName in interface IUserGrouppublic void setName(String name)
IUserGroupsetName in interface IUserGrouppublic List<String> getOwners()
IUserGroupgetOwners in interface IUserGrouppublic int getPasswordTimeout()
IUserGroupgetPasswordTimeout in interface IUserGrouppublic void setPasswordTimeout(int passwordTimeoutOfSeconds)
IUserGroupsetPasswordTimeout in interface IUserGrouppasswordTimeoutOfSeconds - - secondspublic List<String> getSubgroups()
IUserGroupgetSubgroups in interface IUserGrouppublic int getTimeout()
IUserGroupgetTimeout in interface IUserGrouppublic void setTimeout(int timeoutOfSeconds)
IUserGroupsetTimeout in interface IUserGrouptimeoutOfSeconds - - secondspublic List<String> getUsers()
IUserGroupgetUsers in interface IUserGrouppublic boolean isSubGroup()
IUserGroupNote that this method will always return false on an IUserGroup object retrieved from the IServer.getUserGroup() method (this is a restriction imposed by the Perforce server).
isSubGroup in interface IUserGrouppublic void setSubGroup(boolean subGroup)
IUserGroupsetSubGroup in interface IUserGrouppublic void refresh()
throws ConnectionException,
RequestException,
AccessException
IServerResourceThe details of what "refreshable" means in this context are always object-dependent, but typically mean that "live" data and metadata will be updated from the server.
The results of calling this method on objects whose canRefresh method returns false are undefined (but will generally result in a UnimplementedError being thrown).
refresh in interface IServerResourcerefresh in class ServerResourceConnectionException - 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 callerIServerResource.refresh()public void update()
throws ConnectionException,
RequestException,
AccessException
IServerResourceThe results of calling this method on objects whose canUpdate method returns false are undefined (but will generally result in a UnimplementedError being thrown).
update in interface IServerResourceupdate in class ServerResourceConnectionException - 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 callerIServerResource.update()public void setSubgroups(List<String> subgroups)
addSubgroup(String subgroup)IUserGroupsetSubgroups in interface IUserGrouppublic void setOwners(List<String> owners)
addOwner(String owner)IUserGroupsetOwners in interface IUserGroupCopyright © 2017 Perforce Software. All Rights Reserved.