/** * Puts an entry composed of two strings (a StringAttribute will also * be created for the value). */ public void puts (final String key, final String value) { getMap().put(new StringAttribute(key), new StringAttribute(value)); }
/** * Returns a copy of this StringAttribute. */ public Object clone () { try { return new StringAttribute (new String (toString().getBytes(Utils.getEncoding()), Utils.getEncoding())); } catch (final java.io.UnsupportedEncodingException e) { throw new IllegalArgumentException ("clone() failure "+e); } }
@Override public Object getValue() { if (super.getValue() instanceof String) { String comment = (String) super.getValue(); return StringEscapeUtils.escapeHtml(comment); } else { openwfe.org.engine.workitem.StringAttribute comment = (openwfe.org.engine.workitem.StringAttribute) super.getValue(); comment.setValue(StringEscapeUtils.escapeHtml(comment.getValue().toString())); return comment; } } });
public Object encode (final Attribute a, final java.util.Map args) throws CodingException { final org.jdom.Element elt = newElement(); elt.addContent((String)((StringAttribute)a).getValue()); return elt; }
System.out.println("\"" + (subject!=null ? subject.toString() : "") + "\""); System.out.println("Dispatch time : " + sma.get(Header.DISPATCH_TIME)); System.out.println("Last modified : " + header.getLastModified());
/** * Removes a given entry. */ public void remove (final String key) { log.debug("remove() key '"+key+"'"); getMap().remove(new StringAttribute(key)); }
final String skey = key.toString();
/** * Returns the attribute corresponding to the given String key. */ public Attribute aget (final String key) { return (Attribute)getMap().get(new StringAttribute(key)); }
/** * Puts in the map a new entry. A previous entry with the same key name * will get overriden. */ public void aput (final String key, final Attribute value) { getMap().put(new StringAttribute(key), value); }
Attribute attribute = item.getAttribute(name); if(attribute instanceof StringAttribute){ return ((StringAttribute)attribute).toString();
/** * The implementation of cget() as defined in the parent * class CollectionAttribute. */ public Attribute cget (final String key) { if (key.equals(K_KEYSET)) return new ListAttribute(this.map.keySet()); return (Attribute)this.map.get(new StringAttribute(key)); }
while (it.hasNext()) String attributeName = ((StringAttribute)it.next()).toString();
/** * The equivalent of put(new StringAttribute(key), value). But this * is mainly a method required by CollectionAttribute, the parent class. * This method is used by setField in CollectionAttribute, * it has thus an internal value rather than an API value. */ public void cput (final String key, final Attribute value) { this.put(new StringAttribute(key), value); }
String s = assignTo.toString(); if (s.length() > 0) { newc.createNodeData(WorkflowConstants.ATTRIBUTE_ASSIGN_TO, vf.createValue(s));
private void addFieldWithValue (final String assignation, //final InFlowWorkItem parentWi, final InFlowWorkItem newWi) { final String[] ss = assignation.split(" *= *"); final String fieldName = ss[0].trim(); final String value = ss[1].trim(); if (log.isDebugEnabled()) { log.debug ("addFieldWithValue() newWi['"+fieldName+"'] = '"+value+"'"); } newWi.getAttributes().put (new StringAttribute(fieldName), new StringAttribute(value)); }
public Attribute decode (final Object o, final java.util.Map args) throws CodingException { final org.jdom.Element elt = enforceElement(o); return new StringAttribute(XmlUtils.fetchTextContent(elt)); }
private void addFieldAlias (final String aliasing, final InFlowWorkItem parentWi, final InFlowWorkItem newWi) { final String[] ss = aliasing.split(" *as *"); final String newFieldName = ss[0].trim(); final String parentFieldName = ss[1].trim(); final Attribute parentValue = parentWi.getAttribute(parentFieldName); if (parentValue != null) { newWi.getAttributes() .put(new StringAttribute(newFieldName), parentValue); } }
private static void fillMap (final MapAttribute ma, final java.util.Map m) { java.util.Iterator it = m.keySet().iterator(); while (it.hasNext()) { Object k = it.next(); Object v = m.get(k); if (ma instanceof StringMapAttribute) ma.put(new StringAttribute(k.toString()), java2owfe(v)); else ma.put(java2owfe(k), java2owfe(v)); } }