public org.jdom.Element encode (final FlowExpressionId fei) { final org.jdom.Element elt = new org.jdom.Element(FLOW_EXPRESSION_ID, XMLNS); WicUtils.setAttribute (elt, OWFE_VERSION, fei.getOwfeVersion()); WicUtils.setAttribute (elt, ENGINE_ID, fei.getEngineId()); WicUtils.setAttribute (elt, INITIAL_ENGINE_ID, fei.getInitialEngineId()); WicUtils.setAttribute (elt, WORKFLOW_DEFINITION_URL, fei.getWorkflowDefinitionUrl()); WicUtils.setAttribute (elt, WORKFLOW_DEFINITION_NAME, fei.getWorkflowDefinitionName()); WicUtils.setAttribute (elt, WORKFLOW_DEFINITION_REVISION, fei.getWorkflowDefinitionRevision()); WicUtils.setAttribute (elt, WORKFLOW_INSTANCE_ID, ""+fei.getWorkflowInstanceId()); WicUtils.setAttribute (elt, EXPRESSION_NAME, fei.getExpressionName()); WicUtils.setAttribute (elt, EXPRESSION_ID, ""+fei.getExpressionId()); return elt; }
/** * A wrap around WicUtils.enforceElement(), it takes care of * passing the representation name as the second param of the * wrapped call. */ public org.jdom.Element enforceElement (final Object o) throws CodingException { return WicUtils.enforceElement(o, this.getRepresentationName()); }
public static long getLong (org.jdom.Element elt, String attributeName, long defaultValue) throws CodingException { return getLong(elt, attributeName, new Long(defaultValue)); }
elt = WicUtils.fetchElementFromStream((java.io.InputStream)o);
/** * This method is public because it is used by * openwfe.org.wfibuilder.WorkflowDefinition.outputAsXml() */ public org.jdom.Element encode (final Filter f) { org.jdom.Element elt = null; if (f.getType() == Filter.TYPE_OPEN) elt = new org.jdom.Element(OPEN_FILTER, XMLNS); else elt = new org.jdom.Element(CLOSED_FILTER, XMLNS); WicUtils.setAttribute(elt, NAME, f.getName()); WicUtils.setAttribute(elt, ADD_ALLOWED, ""+f.isAddAllowed()); WicUtils.setAttribute(elt, REMOVE_ALLOWED, ""+f.isRemoveAllowed()); encodeEntryList(elt, f); return elt; }
protected org.jdom.Element encodeSuper (WorkItem wi) throws CodingException { final org.jdom.Element elt = new org.jdom.Element(WORKITEM, XMLNS); if (wi.getLastModified() != null) WicUtils.setAttribute(elt, LAST_MODIFIED, wi.getLastModified()); // // attributes org.jdom.Element as = new org.jdom.Element(ATTRIBUTES, XMLNS); org.jdom.Element smap = encodeAttribute(wi.getAttributes()); if (smap != null) as.addContent(smap); elt.addContent(as); // // the end return elt; }
public org.jdom.Element encodeAsXml (Header h) throws CodingException { org.jdom.Element eh = new org.jdom.Element(HEADER); //Utils.setAttribute(eh, STRING_ID, h.getStringId()); // transient... WicUtils.setAttribute(eh, LAST_MODIFIED, ""+h.getLastModified()); WicUtils.setAttribute(eh, LOCKED, ""+h.isLocked()); // // workitem id eh.addContent(encode(h.getExpressionId())); // // attributes org.jdom.Element as = new org.jdom.Element(ATTRIBUTES); org.jdom.Element smap = encodeAttribute(h.getAttributes()); if (smap != null) as.addContent(smap); eh.addContent(as); return eh; }
protected org.jdom.Element encodeAsXml (final CancelItem ci) throws CodingException { if (log.isDebugEnabled()) log.debug("encodeAsXml() "+ci.getId()); org.jdom.Element elt = encodeSuper(ci); elt.setName(CANCELITEM); // // expressionId org.jdom.Element ei = new org.jdom.Element(LAST_EXPRESSION_ID, XMLNS); ei.addContent(encode(ci.getId())); elt.addContent(ei); // // participant name WicUtils.setAttribute (elt, PARTICIPANT_NAME, ci.getParticipantName()); // // done return elt; }
WicUtils.setAttribute (elt, PARTICIPANT_NAME, wi.getParticipantName()); WicUtils.setAttribute (elt, DISPATCH_TIME, wi.getDispatchTime());