@Test void toRight() { assertSame(Right.VIEW, Right.toRight("view")); assertSame(Right.VIEW, Right.toRight("VIEW")); assertSame(Right.ILLEGAL, Right.toRight("notexist")); }
public static Right toRight(String string) { for (Right right : VALUES) { if (right.name.equalsIgnoreCase(string)) { return right; } } return ILLEGAL; }
Right implements RightDescription, Serializable, Comparable<Right> { public static Right toRight(String string) { for (Right right : VALUES) { if (right.name.equalsIgnoreCase(string)) { return right; } } return ILLEGAL; } }
Right implements RightDescription, Serializable, Comparable<Right> { public static Right toRight(String string) { for (Right right : VALUES) { if (right.name.equalsIgnoreCase(string)) { return right; } } return ILLEGAL; } Right(RightDescription description);   Right(RightDescription description, Set<Right> impliedByRights); private  Right(String name, RuleState defaultState, RuleState tieResolutionPolicy,
        boolean inheritanceOverridePolicy, Set<Right> impliedRights, Set<EntityType> validEntityTypes,
        boolean isReadOnly); private  Right(String name, RuleState defaultState, RuleState tieResolutionPolicy,
        boolean inheritanceOverridePolicy, Set<Right> impliedRights, Set<EntityType> validEntityTypes,
        boolean isReadOnly, Set<Right> impliedByRights); }
Right implements RightDescription, Serializable, Comparable<Right> { public static Right toRight(String string) { for (Right right : VALUES) { if (right.name.equalsIgnoreCase(string)) { return right; } } return ILLEGAL; } Right(RightDescription description);   Right(RightDescription description, Set<Right> impliedByRights); private  Right(String name, RuleState defaultState, RuleState tieResolutionPolicy,
        boolean inheritanceOverridePolicy, Set<Right> impliedRights, Set<EntityType> validEntityTypes,
        boolean isReadOnly); private  Right(String name, RuleState defaultState, RuleState tieResolutionPolicy,
        boolean inheritanceOverridePolicy, Set<Right> impliedRights, Set<EntityType> validEntityTypes,
        boolean isReadOnly, Set<Right> impliedByRights); static List<Right> values(); static Right toRight(String string); static Set<Right> getEnabledRights(EntityType entityType); static Right get(int ordinal); static int size(); static List<String> getAllRightsAsString(); int ordinal(); @Override String getName(); @Override String toString(); @Override Set<Right> getImpliedRights(); @Override Set<EntityType> getTargetedEntityType(); @Override boolean getInheritanceOverridePolicy(); @Override RuleState getTieResolutionPolicy(); @Override RuleState getDefaultState(); @Override boolean isReadOnly(); @Override int compareTo(Right other); }
Right implements RightDescription, Serializable, Comparable<Right> { public static Right toRight(String string) { for (Right right : VALUES) { if (right.name.equalsIgnoreCase(string)) { return right; } } return ILLEGAL; } Right(RightDescription description);   Right(RightDescription description, Set<Right> impliedByRights); private  Right(String name, RuleState defaultState, RuleState tieResolutionPolicy,
        boolean inheritanceOverridePolicy, Set<Right> impliedRights, Set<EntityType> validEntityTypes,
        boolean isReadOnly); private  Right(String name, RuleState defaultState, RuleState tieResolutionPolicy,
        boolean inheritanceOverridePolicy, Set<Right> impliedRights, Set<EntityType> validEntityTypes,
        boolean isReadOnly, Set<Right> impliedByRights); static List<Right> values(); static Right toRight(String string); static Set<Right> getEnabledRights(EntityType entityType); static Right get(int ordinal); static int size(); static List<String> getAllRightsAsString(); int ordinal(); @Override String getName(); @Override String toString(); @Override Set<Right> getImpliedRights(); @Override Set<EntityType> getTargetedEntityType(); @Override boolean getInheritanceOverridePolicy(); @Override RuleState getTieResolutionPolicy(); @Override RuleState getDefaultState(); @Override boolean isReadOnly(); @Override int compareTo(Right other); static final Right LOGIN; static final Right VIEW; static final Right EDIT; static final Right DELETE; static final Right CREATOR; static final Right ADMIN; static final Right PROGRAM; static final Right SCRIPT; static final Right REGISTER; static final Right COMMENT; static final Right CREATE_WIKI; static final Right ILLEGAL; static final String ILLEGAL_RIGHT_NAME; static final Set<EntityType> FARM_ONLY; static final Set<EntityType> WIKI_ONLY; static final Set<EntityType> WIKI_SPACE; static final Set<EntityType> WIKI_SPACE_DOCUMENT; }