private static int getMax ( String action ) { int max = NONE ; if ( action == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "WebSphereSecurityPermission action should not be null" ) ; } return max ; } if ( INTERNAL_STR . equalsIgnoreCase ( action ) ) { max = INTERNAL ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "WebSphereSecurityPermission - internal" ) ; } } else if ( PROVIDER_STR . equalsIgnoreCase ( action ) ) { max = PROVIDER ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "WebSphereSecurityPermission - provider" ) ; } } else if ( PRIVILEGED_STR . equalsIgnoreCase ( action ) ) { max = PRIVILEGED ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "WebSphereSecurityPermission - privileged" ) ; } } else { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "WebSphereSecurityPermission invalid action " + action ) ; } throw new IllegalArgumentException ( "invalid permission: " + action ) ; } if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "WebSphereSecurityPermission value = " + max ) ; } return max ; }
Converts an action String to a permission value .