org.itracker.model
Enum PermissionType

java.lang.Object
  extended by java.lang.Enum<PermissionType>
      extended by org.itracker.model.PermissionType
All Implemented Interfaces:
Serializable, Comparable<PermissionType>

public enum PermissionType
extends Enum<PermissionType>

Enumeration for permission types.

Author:
johnny

Enum Constant Summary
ISSUE_ASSIGN_OTHERS
          Issue Assign to Others Permissions.
ISSUE_ASSIGN_SELF
          Issue Assign to Self Permission.
ISSUE_ASSIGNABLE
          Issue Assignable.
ISSUE_CLOSE
          Issue Close Permission.
ISSUE_CREATE
          Issue Create Permission
ISSUE_CREATE_OTHERS
          Create for Others.
ISSUE_EDIT_ALL
          Issue Edit Permission.
ISSUE_EDIT_FULL
          Full edit permission.
ISSUE_EDIT_USERS
          Edit Users Issues Permission.
ISSUE_UNASSIGN_SELF
          Issue Unassign Self Permission.
ISSUE_VIEW_ALL
          View All Issues Permission.
ISSUE_VIEW_USERS
          View Users Issues Permission.
PRODUCT_ADMIN
          Product Admin Permission
USER_ADMIN
          User Admin Permission.
 
Method Summary
static PermissionType fromCode(int code)
          Returns the enum instance matching the integer value.
 int getCode()
          Returns the integer value representing this enum member.
static PermissionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PermissionType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

USER_ADMIN

public static final PermissionType USER_ADMIN
User Admin Permission. Currently this is equivalent to super user, since the permission can't be granted, and is only available to an admin.


PRODUCT_ADMIN

public static final PermissionType PRODUCT_ADMIN
Product Admin Permission


ISSUE_CREATE

public static final PermissionType ISSUE_CREATE
Issue Create Permission


ISSUE_EDIT_ALL

public static final PermissionType ISSUE_EDIT_ALL
Issue Edit Permission. Users with this permission can edit any issue in the project.


ISSUE_CLOSE

public static final PermissionType ISSUE_CLOSE
Issue Close Permission. Users with this permission can close issues in the project.


ISSUE_ASSIGN_SELF

public static final PermissionType ISSUE_ASSIGN_SELF
Issue Assign to Self Permission. Users with this permission can assign issues to themselves.


ISSUE_ASSIGN_OTHERS

public static final PermissionType ISSUE_ASSIGN_OTHERS
Issue Assign to Others Permissions. Users with this permission can assign issues to anyone, given than those users have the ability to recieve the assignment.


ISSUE_VIEW_ALL

public static final PermissionType ISSUE_VIEW_ALL
View All Issues Permission. Users can view all issues in the project.


ISSUE_VIEW_USERS

public static final PermissionType ISSUE_VIEW_USERS
View Users Issues Permission. Users can view thier own issues. This includes ones they are the creator or owner of.


ISSUE_EDIT_USERS

public static final PermissionType ISSUE_EDIT_USERS
Edit Users Issues Permission. Users with this permission can edit any issue they created or own. They are limited to editing the description, adding history entries, and adding attachments.


ISSUE_UNASSIGN_SELF

public static final PermissionType ISSUE_UNASSIGN_SELF
Issue Unassign Self Permission. Users with this permission can unassign issues they own.


ISSUE_ASSIGNABLE

public static final PermissionType ISSUE_ASSIGNABLE
Issue Assignable. Users with this permission can be assigned any issue in the system. To determine if a user can be assigned an issue, it will be a combination of users with EDIT_ALL, users with EDIT_USERS if they are the creator, and users with this permission and EDIT_USERS.


ISSUE_CREATE_OTHERS

public static final PermissionType ISSUE_CREATE_OTHERS
Create for Others. Users with this permission are allowed to create issues on behalf of other users. The system will treat the issue as if the other user had created it. The actual creator will be logged in the audit log.


ISSUE_EDIT_FULL

public static final PermissionType ISSUE_EDIT_FULL
Full edit permission. This defines what levelof editing a user has for an issue. Without this permission, users will be limited to editing only the description, attachments, custom fields, and history of an issue.

Method Detail

values

public static PermissionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PermissionType c : PermissionType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PermissionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getCode

public int getCode()
Returns the integer value representing this enum member.

Returns:
unique value representing this instance

fromCode

public static PermissionType fromCode(int code)
Returns the enum instance matching the integer value.

Parameters:
value - unique value of the enum instance to return
Returns:
enum instance matching the int value
Throws:
IllegalArgumentExeption - invalid enum value


Copyright © 2002-2012 itracker. All Rights Reserved.