KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > IPAcl > JDMAccess


1 /*
2  * @(#)file JDMAccess.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 4.9
5  * @(#)date 08/02/09
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12
13 /* Generated By:JJTree: Do not edit this line. JDMAccess.java */
14
15 package com.sun.jmx.snmp.IPAcl;
16
17
18 /**
19  * @version 4.9 12/19/03
20  * @author Sun Microsystems, Inc.
21  */

22 class JDMAccess extends SimpleNode {
23   protected int access= -1;
24
25   JDMAccess(int id) {
26     super(id);
27   }
28
29   JDMAccess(Parser p, int id) {
30     super(p, id);
31   }
32
33   public static Node jjtCreate(int id) {
34       return new JDMAccess(id);
35   }
36
37   public static Node jjtCreate(Parser p, int id) {
38       return new JDMAccess(p, id);
39   }
40
41   protected void putPermission(AclEntryImpl entry) {
42     if (access == ParserConstants.RO) {
43        // We have a read-only access.
44
//
45
entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
46     }
47     if (access == ParserConstants.RW) {
48        // We have a read-write access.
49
//
50
entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
51        entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getWRITE());
52     }
53   }
54 }
55
Popular Tags