Annotation of java/classes/org/w3c/jigsaw/acl/HTTPPermission.java, revision 1.4
1.1 bmahe 1: // HTTPPermission.java
1.4 ! ylafon 2: // $Id: HTTPPermission.java,v 1.3 2000/08/16 21:37:33 ylafon 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.4 ! ylafon 13: * @version $Revision: 1.3 $
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:
1.4 ! ylafon 36: public boolean equalsString(String another) {
! 37: return method.equals(another);
! 38: }
! 39:
1.1 bmahe 40: public String toString() {
41: return method+" permission";
42: }
43:
44: }
Webmaster