1 23 package org.objectweb.clif.scenario.util.isac.util.tree; 24 25 import java.util.Hashtable ; 26 27 import org.apache.log4j.Category; 28 import org.objectweb.clif.scenario.util.isac.util.tree.nodes.NonePluginNode; 29 35 public class NodeDescription { 36 static Category cat = Category.getInstance(NodeDescription.class.getName()) ; 37 38 private String type; 39 private Hashtable params; 40 private String plugin; 41 private String actionName; 42 43 50 public NodeDescription(String type) { 51 cat.debug("-> constructor") ; 52 this.type = type; 53 this.params = new Hashtable () ; 54 this.plugin = null; 55 this.actionName = null; 56 } 57 58 64 public NodeDescription(NodeDescription node) { 65 cat.debug("-> constructor : copy") ; 66 if (node != null) { 67 this.type = new String (node.getType()); 68 this.params = (Hashtable ) node.getParams().clone(); 69 if (node.getPlugin() != null) 70 this.plugin = new String (node.getPlugin()); 71 if (node.getActionName() != null) 72 this.actionName = new String (node.getActionName()); 73 } 74 } 75 76 81 public String getActionName() { 82 cat.debug("-> getActionName") ; 83 return actionName; 84 } 85 86 91 public Hashtable getParams() { 92 cat.debug("-> getParams") ; 93 return params; 94 } 95 96 101 public String getPlugin() { 102 cat.debug("-> getPlugin") ; 103 return plugin; 104 } 105 106 111 public String getType() { 112 cat.debug("-> getType") ; 113 return type; 114 } 115 116 122 public void setActionName(String string) { 123 cat.debug("-> setActionName") ; 124 actionName = string; 125 } 126 127 133 public void setParams(Hashtable hashtable) { 134 cat.debug("-> setParams") ; 135 params = hashtable; 136 } 137 138 144 public void setPlugin(String string) { 145 cat.debug("-> setPlugin") ; 146 plugin = string; 147 } 148 149 157 public static NodeDescription createNonePluginNode(String type) { 158 cat.debug("-> createNonePluginNode") ; 159 NodeDescription node = NonePluginNode.createNodeDescription(type) ; 160 161 162 return node; 163 } 164 165 169 public String toString() { 170 return new String ("{type:"+type+",params:"+params+",plugin"+plugin+",an:"+actionName+"}") ; 171 } 172 } | Popular Tags |