public ShortAdminRule newRule() { ShortAdminRule rule = new ShortAdminRule(); rule.setAccess(AdminGrantType.USER); rule.setPriority(0); return rule; }
public ShortRule newRule() { ShortRule rule = new ShortRule(); rule.setAccess(GrantType.ALLOW); rule.setPriority(0); return rule; }
@Override public RuleFilter clone() { return new RuleFilter(this); }
public RuleFilter setRole(SpecialFilterType type) { role.setType(type); return this; }
private static Boolean getFilterDefault(RuleFilter.TextFilter filter) { return filter==null? null: (filter.isIncludeDefault() || filter .getType()==RuleFilter.FilterType.DEFAULT); }
public RuleFilter setSourceAddress(String dotted) { sourceAddress.setText(dotted); return this; }
public RuleFilter setInstance(SpecialFilterType type) { instance.setType(type); return this; }
public IdNameFilter(String name, boolean includeDefault) { setName(name); this.includeDefault = includeDefault; }
@Override public int hashCode() { int hash = 7; hash = 37 * hash + (this.user != null ? this.user.hashCode() : 0); hash = 37 * hash + (this.role != null ? this.role.hashCode() : 0); hash = 37 * hash + (this.instance != null ? this.instance.hashCode() : 0); hash = 37 * hash + (this.sourceAddress != null ? this.sourceAddress.hashCode() : 0); hash = 37 * hash + (this.service != null ? this.service.hashCode() : 0); hash = 37 * hash + (this.request != null ? this.request.hashCode() : 0); hash = 37 * hash + (this.workspace != null ? this.workspace.hashCode() : 0); hash = 37 * hash + (this.layer != null ? this.layer.hashCode() : 0); //NOTE: ipaddress not in hashcode bc it is not used for caching return hash; }
public RuleFilter setSourceAddress(SpecialFilterType type) { sourceAddress.setType(type); return this; }
public RuleFilter setLayer(String name) { layer.setText(name); return this; }
@Override public int hashCode() { int hash = 7; hash = 37 * hash + (this.user != null ? this.user.hashCode() : 0); hash = 37 * hash + (this.role != null ? this.role.hashCode() : 0); hash = 37 * hash + (this.instance != null ? this.instance.hashCode() : 0); hash = 37 * hash + (this.sourceAddress != null ? this.sourceAddress.hashCode() : 0); hash = 37 * hash + (this.service != null ? this.service.hashCode() : 0); hash = 37 * hash + (this.request != null ? this.request.hashCode() : 0); hash = 37 * hash + (this.workspace != null ? this.workspace.hashCode() : 0); hash = 37 * hash + (this.layer != null ? this.layer.hashCode() : 0); //NOTE: ipaddress not in hashcode bc it is not used for caching return hash; }
public RuleFilter setRequest(SpecialFilterType type) { request.setType(type); return this; }
public RuleFilter setSourceAddress(String dotted) { sourceAddress.setText(dotted); return this; }
public RuleFilter setLayer(SpecialFilterType type) { layer.setType(type); return this; }
public RuleFilter setUser(SpecialFilterType type) { user.setType(type); return this; }
public RuleFilter setWorkspace(SpecialFilterType type) { workspace.setType(type); return this; }