/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
/** * delegate for ServletContext.declareRole method * @param roleNames role names to add */ protected void addRoles(String... roleNames) { //Get a reference to the SecurityHandler, which must be ConstraintAware if (_securityHandler != null && _securityHandler instanceof ConstraintAware) { HashSet<String> union = new HashSet<String>(); Set<String> existing = ((ConstraintAware)_securityHandler).getRoles(); if (existing != null) union.addAll(existing); union.addAll(Arrays.asList(roleNames)); ((ConstraintSecurityHandler)_securityHandler).setRoles(union); } }
setRoles(roles);