litesoft
@ 491
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 |
package org.litesoft.initfrom.client.support; import org.litesoft.core.util.*; public enum Role implements BitAccessor { EndUser, EndUserManager, Developer, Customer, QueueAdmin; public static String[] OPTIONS = UtilsCommon.toStringArray( Role.values() ); private int mBit = Permissions.BIT.next(); public int getBit() { return mBit; } public static int getBitFor( String pRole ) { return UtilsCommon.deNull( valueFor( pRole ), Permissions.BIT ).getBit(); } public static Role valueFor( String pRole ) { return UtilsCommon.enumFromString( Role.class, pRole ); } } |