com.perforce.p4java.core
Interface IUserGroup

All Superinterfaces:
IServerResource
All Known Implementing Classes:
UserGroup

public interface IUserGroup
extends IServerResource

Defines Perforce user group attributes and methods. See the main Perforce documentation for a full detailed description of Perforce user groups and the associated methods defined below.

The IUserGroup interface and implementation objects are somewhat unusual in the P4Java object menagerie in that they do not have corresponding summary objects due to the way the Perforce server handles and communicates Perforce user groups. This may change in the future, but in general, with caveats noted below and elsewhere, IUserGroup objects are complete, updateable, and refreshable, and (as explained) have no summary versions.

Note that the getSubgroups() method is not guaranteed to return correct values for IUserGroup objects returned from the getUserGroupList; you normally have to get the group definition from getUserGroup to see the list of that group's sub groups (this is a Perforce server limitation). Conversely, the isSubGroup() method only works for a user group object returned by the list version of the get group(s) commands.

Setter methods defined below only have local effect unless an object update is performed.


Field Summary
static int UNLIMITED
          Used to signal that a specific user group max value (eg.
static int UNSET
          Used to signal that a specific user group max value (eg.
 
Method Summary
 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.
 void setMaxLockTime(int maxLockTime)
          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)
          Set the list of owner names for this group.
 void setPasswordTimeout(int passwordTimeout)
          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)
          Set the list of known subgroups of this groups.
 void setTimeout(int timeout)
          Set the timeout value for commands by members of this group.
 void setUsers(List<String> users)
          Set the list of user names for this group.
 
Methods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, refresh, setServer, update, update, update
 

Field Detail

UNSET

static final int UNSET
Used to signal that a specific user group max value (eg. MaxScanRows or password timeout) is unset.

See Also:
Constant Field Values

UNLIMITED

static final int UNLIMITED
Used to signal that a specific user group max value (eg. MaxScanRows or password timeout) is unlimited.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Get the group's name.


setName

void setName(String name)
Set the group's name.


getMaxResults

int getMaxResults()
Get the maximum number of results returned for queries by members of this group.


setMaxResults

void setMaxResults(int maxResults)
Set the maximum number of results returned for queries by members of this group.


getMaxScanRows

int getMaxScanRows()
Get the maximum number of scan rows returned for queries by members of this group.


setMaxScanRows

void setMaxScanRows(int maxScanRows)
Set the maximum number of scan rows returned for queries by members of this group.


getMaxLockTime

int getMaxLockTime()
Get the maximum lock time for queries by members of this group.


setMaxLockTime

void setMaxLockTime(int maxLockTime)
Set the maximum lock time for queries by members of this group.


getTimeout

int getTimeout()
Get the timeout value for commands by members of this group.


setTimeout

void setTimeout(int timeout)
Set the timeout value for commands by members of this group.


getPasswordTimeout

int getPasswordTimeout()
Get the password timeout value associated with this user group.

Since:
2011.1

setPasswordTimeout

void setPasswordTimeout(int passwordTimeout)
Set the password timeout value associated with this user group.

Since:
2011.1

isSubGroup

boolean isSubGroup()
Return true if this group is a sub group of another group on this server.

Note 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).


setSubGroup

void setSubGroup(boolean subGroup)
Set whether this group is a sub group of another group on this server.


getSubgroups

List<String> getSubgroups()
Get the list of known subgroups of this groups. Will be null or empty if no subgroups exist or if this user group object was returned from the IServer getUserGroupList method.


setSubgroups

void setSubgroups(List<String> subgroups)
Set the list of known subgroups of this groups.


getOwners

List<String> getOwners()
Get a list of owner names for this group. Will be null or empty if this group has no owners.


setOwners

void setOwners(List<String> owners)
Set the list of owner names for this group.


getUsers

List<String> getUsers()
Get a list of user names for this group. Will be null or empty if this group has no users.


setUsers

void setUsers(List<String> users)
Set the list of user names for this group.



Copyright © 2015 Perforce Software. All Rights Reserved.