litesoft
@ 950
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.nasvideo.client.support; import org.litesoft.commonfoundation.base.*; import org.litesoft.commonfoundation.typeutils.*; import org.litesoft.core.util.*; public enum Role implements BitAccessor { EndUser, EndUserManager, Developer, Customer, QueueAdmin; public static String[] OPTIONS = Strings.toArray( Role.values() ); private int mBit = Permissions.BIT.next(); public int getBit() { return mBit; } public static int getBitFor( String pRole ) { return ConstrainTo.notNull( valueFor( pRole ), Permissions.BIT ).getBit(); } public static Role valueFor( String pRole ) { return Enums.fromString( Role.class, pRole ); } } |