com.groupdocs.annotation.domain
Enum AccessRights

java.lang.Object
  extended by java.lang.Enum<AccessRights>
      extended by com.groupdocs.annotation.domain.AccessRights
All Implemented Interfaces:
Serializable, Comparable<AccessRights>

public enum AccessRights
extends Enum<AccessRights>

Collaborator access rights object

Author:
Aleksey Permyakov

Enum Constant Summary
All
          All rights
CAN_ANNOTATE
          Rights to annotate document
CAN_DELETE
          Rights to delete annotation from document
CAN_DOWNLOAD
          Rights to download document
CAN_EXPORT
          Rights to export document
CAN_REDACT
          Rights to change annotation in document
CAN_VIEW
          Rights to view document
 
Method Summary
 boolean equals(int id)
          Check if access rights is equal
static int from(AccessRights... accessRights)
          Combine access rights integer value from few @{AccessRights} objects Sample: int integerCombinedValue = AccessRights.from(AccessRights.CAN_VIEW, AccessRights.CAN_DOWNLOAD);
 boolean is(int value)
          Check that access right contains in provided access right value Sample: AccessRights.CAN_VIEW.is(integerCombinedValue)
 String toString()
          Convert value to string
 int value()
          Get value
static AccessRights valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AccessRights[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CAN_VIEW

public static final AccessRights CAN_VIEW
Rights to view document


CAN_ANNOTATE

public static final AccessRights CAN_ANNOTATE
Rights to annotate document


CAN_DOWNLOAD

public static final AccessRights CAN_DOWNLOAD
Rights to download document


CAN_EXPORT

public static final AccessRights CAN_EXPORT
Rights to export document


CAN_DELETE

public static final AccessRights CAN_DELETE
Rights to delete annotation from document


CAN_REDACT

public static final AccessRights CAN_REDACT
Rights to change annotation in document


All

public static final AccessRights All
All rights

Method Detail

values

public static AccessRights[] 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 (AccessRights c : AccessRights.values())
    System.out.println(c);

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

valueOf

public static AccessRights 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

equals

public boolean equals(int id)
Check if access rights is equal

Parameters:
id - access rights value to compare
Returns:

toString

public String toString()
Convert value to string

Overrides:
toString in class Enum<AccessRights>
Returns:
value

value

public int value()
Get value

Returns:
value

from

public static int from(AccessRights... accessRights)
Combine access rights integer value from few @{AccessRights} objects Sample: int integerCombinedValue = AccessRights.from(AccessRights.CAN_VIEW, AccessRights.CAN_DOWNLOAD);

Parameters:
accessRights - access rights to combine
Returns:
combined value

is

public boolean is(int value)
Check that access right contains in provided access right value Sample: AccessRights.CAN_VIEW.is(integerCombinedValue)

Parameters:
value - access right to check
Returns:
true if provided access value contains access right constant


Copyright © 2014. All rights reserved.