Esempio n. 1
0
 public Step(Resolver resolver, Map attributes) {
   this(resolver, "");
   Log.debug("Instantiating " + getClass());
   if (Log.expectDebugOutput) {
     Iterator iter = attributes.keySet().iterator();
     while (iter.hasNext()) {
       String key = (String) iter.next();
       Log.debug(key + "=" + attributes.get(key));
     }
   }
   parseStepAttributes(attributes);
 }
Esempio n. 2
0
 /** Add an attribute to the given XML Element. Attributes are kept in alphabetical order. */
 protected Element addAttributes(Element el) {
   // Use a TreeMap to keep the attributes sorted on output
   Map atts = new TreeMap(getAttributes());
   Iterator iter = atts.keySet().iterator();
   while (iter.hasNext()) {
     String key = (String) iter.next();
     String value = (String) atts.get(key);
     if (value == null) {
       Log.warn("Attribute '" + key + "' value was null in step " + getXMLTag());
       value = "";
     }
     el.setAttribute(key, value);
   }
   return el;
 }
Esempio n. 3
0
 /** Only exposed so that Script may invoke it on load from disk. */
 protected final void parseStepAttributes(Map attributes) {
   Log.debug("Parsing attributes for " + getClass());
   description = (String) attributes.get(TAG_DESC);
 }