* @return DOCUMENT ME!
*
* @throws IllegalArgumentException DOCUMENT ME!
*/
private boolean ifGranted(String roles, int grantType) {
AuthorizeTag AuthorizeTag = new AuthorizeTag();
int result = -1;
try {
switch (grantType) {
case ALL_GRANTED:
AuthorizeTag.setIfAllGranted(roles);
break;
case ANY_GRANTED:
AuthorizeTag.setIfAnyGranted(roles);
break;
case NONE_GRANTED:
AuthorizeTag.setIfNotGranted(roles);
break;
default:
throw new IllegalArgumentException("invalid granted type : "
+ grantType + " role=" + roles);
}
result = AuthorizeTag.doStartTag();
} catch (JspException je) {
throw new IllegalArgumentException(je.getMessage());
}
if (Tag.EVAL_BODY_INCLUDE == result) {