public WebUserDataPermission(String urlPattern, String[] HTTPMethods, String transportType) { super(urlPattern); urlPatternSpec = new URLPatternSpec(urlPattern); httpMethodSpec = new HTTPMethodSpec(HTTPMethods, transportType == null? "NONE": transportType); }
public int hashCode() { if (cachedHashCode == 0) { cachedHashCode = urlPatternSpec.hashCode() ^ httpMethodSpec.hashCode(); } return cachedHashCode; }
public WebResourcePermission(HttpServletRequest request) { super(URLPatternSpec.encodeColons(request)); urlPatternSpec = new URLPatternSpec(getName()); httpMethodSpec = new HTTPMethodSpec(request.getMethod(), HTTPMethodSpec.NA); }
public boolean equals(Object o) { if (o == null || !(o instanceof WebResourcePermission)) return false; WebResourcePermission other = (WebResourcePermission) o; return urlPatternSpec.equals(other.urlPatternSpec) && httpMethodSpec.equals(other.httpMethodSpec); }
/** Returns the hash code value for this WebUserDataPermission. The properties * of the returned hash code must be as follows: * - During the lifetime of a Java application, the hashCode method shall * return the same integer value every time it is called on a * WebUserDataPermission object. The value returned by hashCode for a * particular EJBMethod permission need not remain consistent from one * execution of an application to another. * - If two WebUserDataPermission objects are equal according to the equals * method, then calling the hashCode method on each of the two Permission * objects must produce the same integer result (within an application). * @return the int hash code. */ public int hashCode() { int hashCode = urlSpec.hash(); if( httpMethods != null ) hashCode += httpMethods.hashCode(); return hashCode; }
private synchronized void writeObject(ObjectOutputStream out) throws IOException { out.writeUTF(urlPatternSpec.getPatternSpec()); out.writeUTF(httpMethodSpec.getActions()); }
public WebResourcePermission(HttpServletRequest request) { super(URLPatternSpec.encodeColons(request)); urlPatternSpec = new URLPatternSpec(getName()); httpMethodSpec = new HTTPMethodSpec(request.getMethod(), HTTPMethodSpec.NA); }
public boolean equals(Object o) { if (o == null || !(o instanceof WebUserDataPermission)) return false; WebUserDataPermission other = (WebUserDataPermission) o; return urlPatternSpec.equals(other.urlPatternSpec) && httpMethodSpec.equals(other.httpMethodSpec); }
/** Returns the hash code value for this WebUserDataPermission. The properties * of the returned hash code must be as follows: * - During the lifetime of a Java application, the hashCode method shall * return the same integer value every time it is called on a * WebUserDataPermission object. The value returned by hashCode for a * particular EJBMethod permission need not remain consistent from one * execution of an application to another. * - If two WebUserDataPermission objects are equal according to the equals * method, then calling the hashCode method on each of the two Permission * objects must produce the same integer result (within an application). * @return the int hash code. */ public int hashCode() { int hashCode = urlSpec.hash(); if( httpMethods != null ) hashCode += httpMethods.hashCode(); return hashCode; }
private synchronized void writeObject(ObjectOutputStream out) throws IOException { out.writeUTF(urlPatternSpec.getPatternSpec()); out.writeUTF(httpMethodSpec.getActions()); }
public WebUserDataPermission(String name, String actions) { super(name); urlPatternSpec = new URLPatternSpec(name); httpMethodSpec = new HTTPMethodSpec(actions, true); }
public WebResourcePermission(HttpServletRequest request) { super(URLPatternSpec.encodeColons(request)); urlPatternSpec = new URLPatternSpec(getName()); httpMethodSpec = new HTTPMethodSpec(request.getMethod(), HTTPMethodSpec.NA); }
public int hashCode() { if (cachedHashCode == 0) { cachedHashCode = urlPatternSpec.hashCode() ^ httpMethodSpec.hashCode(); } return cachedHashCode; }
public boolean equals(Object o) { if (o == null || !(o instanceof WebResourcePermission)) return false; WebResourcePermission other = (WebResourcePermission) o; return urlPatternSpec.equals(other.urlPatternSpec) && httpMethodSpec.equals(other.httpMethodSpec); }
/** Returns the hash code value for this WebUserDataPermission. The properties * of the returned hash code must be as follows: * - During the lifetime of a Java application, the hashCode method shall * return the same integer value every time it is called on a * WebUserDataPermission object. The value returned by hashCode for a * particular EJBMethod permission need not remain consistent from one * execution of an application to another. * - If two WebUserDataPermission objects are equal according to the equals * method, then calling the hashCode method on each of the two Permission * objects must produce the same integer result (within an application). * @return the int hash code. */ public int hashCode() { int hashCode = urlSpec.hash(); if( httpMethods != null ) hashCode += httpMethods.hashCode(); return hashCode; }
private synchronized void writeObject(ObjectOutputStream out) throws IOException { out.writeUTF(urlPatternSpec.getPatternSpec()); out.writeUTF(httpMethodSpec.getActions()); }
public WebResourcePermission(String urlPattern, String[] HTTPMethods) { super(urlPattern); urlPatternSpec = new URLPatternSpec(urlPattern); httpMethodSpec = new HTTPMethodSpec(HTTPMethods); }