Subversion Repository Public Repository

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 UtilsCommon.enumFromString( Role.class, pRole );
    }
}

Commits for litesoft/trunk/Java/DATT/src/org/litesoft/datt/client/support/Role.java

Diff revisions: vs.
Revision Author Commited Message
821 Diff Diff GeorgeS picture GeorgeS Sun 19 Aug, 2012 00:08:41 +0000
804 Diff Diff GeorgeS picture GeorgeS Wed 15 Aug, 2012 12:48:51 +0000
496 Diff Diff GeorgeS picture GeorgeS Sun 11 Sep, 2011 16:58:00 +0000
430 GeorgeS picture GeorgeS Sat 20 Aug, 2011 19:46:21 +0000