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

      Fields 
      Modifier and Type Field Description
      static int UNDEFINED
      Used as a default value in MaxOpenFiles, for backwards compatibility with old servers.
      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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getMaxLockTime()
      Get the maximum lock time for queries by members of this group.
      int getMaxMemory()
      Get Maximum amount of megabytes of random-access memory that a command can use when run by any member of the group.
      int getMaxOpenFiles()
      Get the maximum files that can be opened 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.
      java.lang.String getName()
      Get the group's name.
      java.util.List<java.lang.String> getOwners()
      Get a list of owner names for this group.
      int getPasswordTimeout()
      Get the password timeout value associated with this user group.
      java.util.List<java.lang.String> getSubgroups()
      Get the list of known subgroups of this groups.
      int getTimeout()
      Get the timeout value for commands by members of this group.
      java.util.List<java.lang.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 maxLockTimeOfMilliSeconds)
      Set the maximum lock time for queries by members of this group.
      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.
      void setMaxOpenFiles​(int maxOpenFiles)
      Set maximum files that can be opened 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​(java.lang.String name)
      Set the group's name.
      void setOwners​(java.util.List<java.lang.String> owners)
      Set the list of owner names for this group.
      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​(java.util.List<java.lang.String> subgroups)
      Set the list of known subgroups of this groups.
      void setTimeout​(int timeoutOfSeconds)
      Set the timeout value for commands by members of this group.
      void setUsers​(java.util.List<java.lang.String> users)
      Set the list of user names for this group.
    • 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
      • UNDEFINED

        static final int UNDEFINED
        Used as a default value in MaxOpenFiles, for backwards compatibility with old servers.
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        java.lang.String getName()
        Get the group's name.
        Returns:
        name
      • setName

        void setName​(java.lang.String name)
        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

        java.util.List<java.lang.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.
        Returns:
        subgroups
      • setSubgroups

        void setSubgroups​(java.util.List<java.lang.String> subgroups)
        Set the list of known subgroups of this groups.
        Parameters:
        subgroups - list of subgroups
      • getOwners

        java.util.List<java.lang.String> getOwners()
        Get a list of owner names for this group. Will be null or empty if this group has no owners.
        Returns:
        owners
      • setOwners

        void setOwners​(java.util.List<java.lang.String> owners)
        Set the list of owner names for this group.
        Parameters:
        owners - list of owners
      • getUsers

        java.util.List<java.lang.String> 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

        void setUsers​(java.util.List<java.lang.String> users)
        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