version 1.4, 2012/06/16 15:48:44
|
version 1.5, 2013/10/18 13:42:12
|
Line 10 import java.security.acl.Permission;
|
Line 10 import java.security.acl.Permission;
|
import org.w3c.jigsaw.http.Request; |
import org.w3c.jigsaw.http.Request; |
|
|
/** |
/** |
|
* @author Benoît Mahé (bmahe@w3.org) |
* @version $Revision$ |
* @version $Revision$ |
* @author Benoît Mahé (bmahe@w3.org) |
|
*/ |
*/ |
public class HTTPPermission implements Permission { |
public class HTTPPermission implements Permission { |
|
|
protected String method = null; |
protected String method = null; |
|
|
protected String getMethod() { |
protected String getMethod() { |
return method; |
return method; |
} |
} |
|
|
public HTTPPermission(Request request) { |
public HTTPPermission(Request request) { |
this.method = request.getMethod(); |
this.method = request.getMethod(); |
} |
} |
|
|
public boolean equals(Object another) { |
public boolean equals(Object another) { |
if (another instanceof HTTPPermission) { |
if (another instanceof HTTPPermission) { |
return method.equals(((HTTPPermission)another).getMethod()); |
return method.equals(((HTTPPermission) another).getMethod()); |
} else { |
} else { |
return method.equals(another.toString()); |
return method.equals(another.toString()); |
} |
} |
} |
} |
|
|
public boolean equalsString(String another) { |
public boolean equalsString(String another) { |
Line 38 public class HTTPPermission implements P
|
Line 38 public class HTTPPermission implements P
|
} |
} |
|
|
public String toString() { |
public String toString() { |
return method+" permission"; |
return method + " permission"; |
} |
} |
|
|
} |
} |