Annotation of java/classes/org/w3c/jigsaw/acl/HTTPPermission.java, revision 1.1

1.1     ! bmahe       1: // HTTPPermission.java
        !             2: // $Id$
        !             3: // (c) COPYRIGHT MIT, INRIA and Keio, 1999.
        !             4: // Please first read the full copyright statement in file COPYRIGHT.html
        !             5:  
        !             6: package org.w3c.jigsaw.acl;
        !             7: 
        !             8: import java.security.acl.Permission;
        !             9: 
        !            10: import org.w3c.jigsaw.http.Request;
        !            11: 
        !            12: /**
        !            13:  * @version $Revision$
        !            14:  * @author  Benoît Mahé (bmahe@w3.org)
        !            15:  */
        !            16: public class HTTPPermission implements Permission {
        !            17:     
        !            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());
        !            31:        }
        !            32:        return false;
        !            33:     }
        !            34: 
        !            35:     public String toString() {
        !            36:        return method+" permission";
        !            37:     }
        !            38: 
        !            39: }

Webmaster