www.pudn.com > SecurityFilter.rar > AuthConstraint.java
package dev.trade.common.securityfilter.config; import java.util.*; /** *Title: 权限过滤器
* *Description: 验证配置
* *Copyright: Copyright (c) 2006
* *Company:
* * @author Zheng YanNan * @version 1.0 */ public class AuthConstraint { private Set roles; /** * Constructor */ public AuthConstraint() { roles = new HashSet(); } /** * Add a role. * * @param role role to add */ public void addRole(String role) { roles.add(role); } /** * Get the roles collection. * Returns an empty collection if no roles were present in the config file. */ public Collection getRoles() { return Collections.unmodifiableCollection(roles); } }