1. /*
  2. * @(#)file JDMAccess.java
  3. * @(#)author Sun Microsystems, Inc.
  4. * @(#)version 4.9
  5. * @(#)date 04/09/15
  6. *
  7. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  8. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  9. *
  10. */
  11. /* Generated By:JJTree: Do not edit this line. JDMAccess.java */
  12. package com.sun.jmx.snmp.IPAcl;
  13. /**
  14. * @version 4.9 12/19/03
  15. * @author Sun Microsystems, Inc.
  16. */
  17. class JDMAccess extends SimpleNode {
  18. protected int access= -1;
  19. JDMAccess(int id) {
  20. super(id);
  21. }
  22. JDMAccess(Parser p, int id) {
  23. super(p, id);
  24. }
  25. public static Node jjtCreate(int id) {
  26. return new JDMAccess(id);
  27. }
  28. public static Node jjtCreate(Parser p, int id) {
  29. return new JDMAccess(p, id);
  30. }
  31. protected void putPermission(AclEntryImpl entry) {
  32. if (access == ParserConstants.RO) {
  33. // We have a read-only access.
  34. //
  35. entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
  36. }
  37. if (access == ParserConstants.RW) {
  38. // We have a read-write access.
  39. //
  40. entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getREAD());
  41. entry.addPermission(com.sun.jmx.snmp.IPAcl.SnmpAcl.getWRITE());
  42. }
  43. }
  44. }