Interface IUserGroup
- All Superinterfaces:
IServerResource
- All Known Implementing Classes:
UserGroup
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
FieldsModifier and TypeFieldDescriptionstatic final intUsed as a default value in MaxOpenFiles, for backwards compatibility with old servers.static final intUsed to signal that a specific user group max value (eg.static final intUsed to signal that a specific user group max value (eg. -
Method Summary
Modifier and TypeMethodDescriptionintGet the maximum lock time for queries by members of this group.intGet Maximum amount of megabytes of random-access memory that a command can use when run by any member of the group.intGet the maximum files that can be opened by members of this group.intGet the maximum number of results returned for queries by members of this group.intGet the maximum number of scan rows returned for queries by members of this group.getName()Get the group's name.Get a list of owner names for this group.intGet the password timeout value associated with this user group.Get the list of known subgroups of this groups.intGet the timeout value for commands by members of this group.getUsers()Get a list of user names for this group.booleanReturn true if this group is a sub group of another group on this server.voidsetMaxLockTime(int maxLockTimeOfMilliSeconds) Set the maximum lock time for queries by members of this group.voidsetMaxMemory(int maxMemory) Set Maximum amount of megabytes of random-access memory that a command can use when run by any member of the group.voidsetMaxOpenFiles(int maxOpenFiles) Set maximum files that can be opened by members of this group.voidsetMaxResults(int maxResults) Set the maximum number of results returned for queries by members of this group.voidsetMaxScanRows(int maxScanRows) Set the maximum number of scan rows returned for queries by members of this group.voidSet the group's name.voidSet the list of owner names for this group.voidsetPasswordTimeout(int passwordTimeoutOfSeconds) Set the password timeout value associated with this user group.voidsetSubGroup(boolean subGroup) Set whether this group is a sub group of another group on this server.voidsetSubgroups(List<String> subgroups) Set the list of known subgroups of this groups.voidsetTimeout(int timeoutOfSeconds) Set the timeout value for commands by members of this group.voidSet the list of user names for this group.Methods inherited from interface com.perforce.p4java.core.IServerResource
canRefresh, canUpdate, clearRawFields, complete, getRawField, getRawFields, hasRawField, refresh, setRawField, setRawFields, setServer, update, update, update
-
Field Details
-
UNSET
static final int UNSETUsed to signal that a specific user group max value (eg. MaxScanRows or password timeout) is unset.- See Also:
-
UNLIMITED
static final int UNLIMITEDUsed to signal that a specific user group max value (eg. MaxScanRows or password timeout) is unlimited.- See Also:
-
UNDEFINED
static final int UNDEFINEDUsed as a default value in MaxOpenFiles, for backwards compatibility with old servers.- See Also:
-
-
Method Details
-
getName
String getName()Get the group's name.- Returns:
- name
-
setName
Set the group's name.- Parameters:
name- name
-
getMaxResults
int getMaxResults()Get the maximum number of results returned for queries by members of this group.- Returns:
- max results
-
setMaxResults
void setMaxResults(int maxResults) Set the maximum number of results returned for queries by members of this group.- Parameters:
maxResults- max results
-
getMaxScanRows
int getMaxScanRows()Get the maximum number of scan rows returned for queries by members of this group.- Returns:
- max rows
-
setMaxScanRows
void setMaxScanRows(int maxScanRows) Set the maximum number of scan rows returned for queries by members of this group.- Parameters:
maxScanRows- max rows
-
getMaxLockTime
int getMaxLockTime()Get the maximum lock time for queries by members of this group.- Returns:
- max lock time - milliseconds
-
setMaxLockTime
void setMaxLockTime(int maxLockTimeOfMilliSeconds) Set the maximum lock time for queries by members of this group.- Parameters:
maxLockTimeOfMilliSeconds- - milliseconds
-
getMaxOpenFiles
int getMaxOpenFiles()Get the maximum files that can be opened by members of this group.- Returns:
- max open files
-
setMaxOpenFiles
void setMaxOpenFiles(int maxOpenFiles) Set maximum files that can be opened by members of this group.- Parameters:
maxOpenFiles- max open files
-
getTimeout
int getTimeout()Get the timeout value for commands by members of this group.- Returns:
- seconds
-
setTimeout
void setTimeout(int timeoutOfSeconds) Set the timeout value for commands by members of this group.- Parameters:
timeoutOfSeconds- - seconds
-
getPasswordTimeout
int getPasswordTimeout()Get the password timeout value associated with this user group.- Returns:
- max password time out - seconds
- Since:
- 2011.1
-
setPasswordTimeout
void setPasswordTimeout(int passwordTimeoutOfSeconds) Set the password timeout value associated with this user group.- Parameters:
passwordTimeoutOfSeconds- - seconds- 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).
- Returns:
- if true
-
setSubGroup
void setSubGroup(boolean subGroup) Set whether this group is a sub group of another group on this server.- Parameters:
subGroup- sub group
-
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.- Returns:
- subgroups
-
setSubgroups
Set the list of known subgroups of this groups.- Parameters:
subgroups- list of subgroups
-
getOwners
Get a list of owner names for this group. Will be null or empty if this group has no owners.- Returns:
- owners
-
setOwners
Set the list of owner names for this group.- Parameters:
owners- list of owners
-
getUsers
Get a list of user names for this group. Will be null or empty if this group has no users.- Returns:
- list of users
-
setUsers
Set the list of user names for this group.- Parameters:
users- users
-
getMaxMemory
int getMaxMemory()Get Maximum amount of megabytes of random-access memory that a command can use when run by any member of the group.- Returns:
- amount of memory in MB
-
setMaxMemory
void setMaxMemory(int maxMemory) Set Maximum amount of megabytes of random-access memory that a command can use when run by any member of the group.- Parameters:
maxMemory- - in MB
-