/*
* @(#)file JDMAccess.java
* @(#)author Sun Microsystems, Inc.
* @(#)version 4.10
* @(#)date 08/06/10
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*/
/* Generated By:JJTree: Do not edit this line. JDMAccess.java */
package com.sun.jmx.snmp.IPAcl;
/**
* @version 4.10 11/17/05
* @author Sun Microsystems, Inc.
*/
class JDMAccess extends SimpleNode {
protected int access= -1;
JDMAccess(int id) {
super(id);
}
JDMAccess(Parser p, int id) {
super(p, id);
}
public static Node jjtCreate(int id) {
return new JDMAccess(id);
}
public static Node jjtCreate(Parser p, int id) {
return new JDMAccess(p, id);
}
protected void putPermission(AclEntryImpl entry) {
if (access == ParserConstants.RO) {
// We have a read-only access.
//
entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
}
if (access == ParserConstants.RW) {
// We have a read-write access.
//
entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getWRITE());
}
}
}
|