litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package org.litesoft.datt.client.support;
import org.litesoft.core.typeutils.*;
import org.litesoft.core.util.*;
public enum Role implements BitAccessor
{
EndUser,
EndUserManager,
Developer,
Customer,
ProjectAdmin;
public static String[] OPTIONS = Strings.toArray( Role.values() );
private int mBit = Permissions.BIT.next();
@Override
public int getBit()
{
return mBit;
}
public static int getBitFor( String pRole )
{
return Objects.deNull( valueFor( pRole ), Permissions.BIT ).getBit();
}
public static Role valueFor( String pRole )
{
return Enums.fromString( Role.class, pRole );
}
}
|