Annotation of java/classes/org/w3c/jigsaw/acl/HTTPPermission.java, revision 1.3
1.1 bmahe 1: // HTTPPermission.java
1.3 ! ylafon 2: // $Id: HTTPPermission.java,v 1.2 1999/04/23 14:06:46 bmahe Exp $
1.1 bmahe 3: // (c) COPYRIGHT MIT, INRIA and Keio, 1999.
4: // Please first read the full copyright statement in file COPYRIGHT.html
1.3 ! ylafon 5:
1.1 bmahe 6: package org.w3c.jigsaw.acl;
7:
8: import java.security.acl.Permission;
9:
10: import org.w3c.jigsaw.http.Request;
11:
12: /**
1.3 ! ylafon 13: * @version $Revision: 1.2 $
1.1 bmahe 14: * @author Benoît Mahé (bmahe@w3.org)
15: */
16: public class HTTPPermission implements Permission {
1.3 ! ylafon 17:
1.1 bmahe 18: protected String method = null;
19:
20: protected String getMethod() {
21: return method;
22: }
23:
24: public HTTPPermission(Request request) {
25: this.method = request.getMethod();
26: }
27:
28: public boolean equals(Object another) {
29: if (another instanceof HTTPPermission) {
30: return method.equals(((HTTPPermission)another).getMethod());
1.2 bmahe 31: } else {
32: return method.equals(another.toString());
1.1 bmahe 33: }
34: }
35:
36: public String toString() {
37: return method+" permission";
38: }
39:
40: }
Webmaster