|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.perforce.p4java.impl.generic.core.ServerResource
com.perforce.p4java.impl.generic.core.UserGroup
public class UserGroup
Simple generic implementation class for the IUserGroup interface.
Field Summary | |
---|---|
static String |
UNLIMITED_STR
How the Perforce server represents an unlimited group value as a string. |
static String |
UNSET_STR
How the Perforce server represents an unset group value as a string. |
Fields inherited from class com.perforce.p4java.impl.generic.core.ServerResource |
---|
refreshable, server, updateable |
Fields inherited from interface com.perforce.p4java.core.IUserGroup |
---|
UNLIMITED, UNSET |
Constructor Summary | |
---|---|
UserGroup()
Default constructor. |
|
UserGroup(Map<String,Object> map)
Construct a new user group impl from the passed-in map. |
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. |
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 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. |
void |
update()
Update the Perforce server object associated with the underlying P4Java object, if possible. |
Methods inherited from class com.perforce.p4java.impl.generic.core.ServerResource |
---|
canRefresh, canUpdate, complete, setRefreshable, setServer, update, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.perforce.p4java.core.IServerResource |
---|
canRefresh, canUpdate, setServer, update, update |
Field Detail |
---|
public static final String UNSET_STR
public static final String UNLIMITED_STR
Constructor Detail |
---|
public UserGroup()
public UserGroup(Map<String,Object> map)
Sets superclass IServerResource fields complete, completeable, refereable and updateable to true.
Method Detail |
---|
public static UserGroup newUserGroup(String name, 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 int getMaxLockTime()
IUserGroup
getMaxLockTime
in interface IUserGroup
IUserGroup.getMaxLockTime()
public int getMaxResults()
IUserGroup
getMaxResults
in interface IUserGroup
IUserGroup.getMaxResults()
public int getMaxScanRows()
IUserGroup
getMaxScanRows
in interface IUserGroup
IUserGroup.getMaxScanRows()
public String getName()
IUserGroup
getName
in interface IUserGroup
IUserGroup.getName()
public List<String> getOwners()
IUserGroup
getOwners
in interface IUserGroup
IUserGroup.getOwners()
public List<String> getSubgroups()
IUserGroup
getSubgroups
in interface IUserGroup
IUserGroup.getSubgroups()
public int getTimeout()
IUserGroup
getTimeout
in interface IUserGroup
IUserGroup.getTimeout()
public List<String> getUsers()
IUserGroup
getUsers
in interface IUserGroup
IUserGroup.getUsers()
public boolean isSubGroup()
IUserGroup
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).
isSubGroup
in interface IUserGroup
IUserGroup.isSubGroup()
public void setName(String name)
IUserGroup
setName
in interface IUserGroup
public void setMaxResults(int maxResults)
IUserGroup
setMaxResults
in interface IUserGroup
public void setMaxScanRows(int maxScanRows)
IUserGroup
setMaxScanRows
in interface IUserGroup
public void setMaxLockTime(int maxLockTime)
IUserGroup
setMaxLockTime
in interface IUserGroup
public void setTimeout(int timeout)
IUserGroup
setTimeout
in interface IUserGroup
public void setSubgroups(List<String> subgroups)
IUserGroup
setSubgroups
in interface IUserGroup
public void setOwners(List<String> owners)
IUserGroup
setOwners
in interface IUserGroup
public void setUsers(List<String> users)
IUserGroup
setUsers
in interface IUserGroup
public void setSubGroup(boolean subGroup)
IUserGroup
setSubGroup
in interface IUserGroup
public int parseGroupIntValue(String str)
public void refresh() throws ConnectionException, RequestException, AccessException
IServerResource
The 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 IServerResource
refresh
in class ServerResource
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 callerServerResource.refresh()
public void update() throws ConnectionException, RequestException, AccessException
IServerResource
The 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 IServerResource
update
in class ServerResource
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 callerServerResource.update()
public int getPasswordTimeout()
IUserGroup
getPasswordTimeout
in interface IUserGroup
IUserGroup.getPasswordTimeout()
public void setPasswordTimeout(int passwordTimeout)
IUserGroup
setPasswordTimeout
in interface IUserGroup
IUserGroup.setPasswordTimeout(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |