1 23 24 package com.sun.enterprise.management.selfmanagement; 25 26 import com.sun.enterprise.admin.selfmanagement.event.Event; 27 28 34 class Rule { 35 36 final static int ENABLED = 0; 37 38 final static int INACTIVE = 1; 39 40 final static int DISABLED = 2; 41 42 final static int NOACTION = 3; 43 44 private String name = null; 45 46 private String description = null; 47 48 private int state = -1; 49 50 private Event event = null; 51 52 private Object actionMBean = null; 53 54 private boolean isEnabled = false; 55 56 57 Rule(String ruleName, String ruleDescription) { 58 name = ruleName; 59 ruleDescription = ruleDescription; 60 } 61 62 63 void setName(String ruleName) { 64 name = ruleName; 65 } 66 67 68 69 String getName() { 70 return name; 71 } 72 73 74 String getDescription() { 75 return description; 76 } 77 78 79 void setState(int ruleState) { 80 state = ruleState; 81 } 82 83 84 int getState() { 85 return state; 86 } 87 88 89 void setEvent(Event ruleEvent) { 90 event = ruleEvent; 91 } 92 93 94 Event getEvent() { 95 return event; 96 } 97 98 99 void setAction(Object actionInstance) { 100 actionMBean = actionInstance; 101 } 102 103 104 Object getAction() { 105 return actionMBean; 106 } 107 108 109 void setEnabled(boolean status) { 110 isEnabled = status; 111 } 112 113 114 boolean isEnabled() { 115 return isEnabled; 116 } 117 } 118 | Popular Tags |