1 11 12 13 14 15 package com.sun.jmx.snmp.IPAcl; 16 17 18 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 entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD()); 46 } 47 if (access == ParserConstants.RW) { 48 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 |