public static int scopeString2Int ( boolean ignoreScope , String type ) { type = StringUtil . toLowerCase ( type ) ; char c = type . charAt ( 0 ) ; // ignore scope only handles only reconize local,arguments as scope, the rest is ignored if ( ignoreScope ) { if ( ' ' == c ) { if ( "arguments" . equals ( type ) ) return Scope . SCOPE_ARGUMENTS ; } else if ( ' ' == c ) { if ( "local" . equals ( type ) ) return Scope . SCOPE_LOCAL ; // LLL } else if ( ' ' == c ) { if ( "request" . equals ( type ) ) return Scope . SCOPE_REQUEST ; } else if ( ' ' == c ) { if ( "variables" . equals ( type ) ) return Scope . SCOPE_VARIABLES ; } else if ( ' ' == c ) { if ( "server" . equals ( type ) ) return Scope . SCOPE_SERVER ; } return Scope . SCOPE_UNDEFINED ; } if ( ' ' == c ) { if ( "application" . equals ( type ) ) return Scope . SCOPE_APPLICATION ; else if ( "arguments" . equals ( type ) ) return Scope . SCOPE_ARGUMENTS ; } else if ( ' ' == c ) { if ( "cgi" . equals ( type ) ) return Scope . SCOPE_CGI ; if ( "cookie" . equals ( type ) ) return Scope . SCOPE_COOKIE ; if ( "client" . equals ( type ) ) return Scope . SCOPE_CLIENT ; if ( "cluster" . equals ( type ) ) return Scope . SCOPE_CLUSTER ; } else if ( ' ' == c ) { if ( "form" . equals ( type ) ) return Scope . SCOPE_FORM ; } else if ( ' ' == c ) { if ( "local" . equals ( type ) ) return Scope . SCOPE_LOCAL ; // LLL } else if ( ' ' == c ) { if ( "request" . equals ( type ) ) return Scope . SCOPE_REQUEST ; } else if ( ' ' == c ) { if ( "session" . equals ( type ) ) return Scope . SCOPE_SESSION ; if ( "server" . equals ( type ) ) return Scope . SCOPE_SERVER ; } else if ( ' ' == c ) { if ( "url" . equals ( type ) ) return Scope . SCOPE_URL ; } else if ( ' ' == c ) { if ( "variables" . equals ( type ) ) return Scope . SCOPE_VARIABLES ; } return Scope . SCOPE_UNDEFINED ; }
translate a string type definition to its int representation