/** * Set the {@link ExtensionContext} on the {@link org.milyn.container.ExecutionContext}. * @param extensionContext Extension Context. * @param executionContext Execution Context. */ public static void setExtensionContext(ExtensionContext extensionContext, ExecutionContext executionContext) { executionContext.setAttribute(EXEC_CONTEXT_KEY, extensionContext); }
/** * Set the {@link NamespaceDeclarationStack} for the current message on the current {@link ExecutionContext}. * @param namespaceDeclarationStack The {@link NamespaceDeclarationStack} instance. * @param executionContext The execution context. */ public static void setNamespaceDeclarationStack(NamespaceDeclarationStack namespaceDeclarationStack, ExecutionContext executionContext) { executionContext.setAttribute(NamespaceDeclarationStack.class, namespaceDeclarationStack); }
/** * Set the {@link ExtensionContext} on the {@link org.milyn.container.ExecutionContext}. * @param extensionContext Extension Context. * @param executionContext Execution Context. */ public static void setExtensionContext(ExtensionContext extensionContext, ExecutionContext executionContext) { executionContext.setAttribute(EXEC_CONTEXT_KEY, extensionContext); }
/** * Set the {@link NamespaceDeclarationStack} for the current message on the current {@link ExecutionContext}. * @param namespaceDeclarationStack The {@link NamespaceDeclarationStack} instance. * @param executionContext The execution context. */ public static void setNamespaceDeclarationStack(NamespaceDeclarationStack namespaceDeclarationStack, ExecutionContext executionContext) { executionContext.setAttribute(NamespaceDeclarationStack.class, namespaceDeclarationStack); }
/** * Set the {@link NamespaceDeclarationStack} for the current message on the current {@link ExecutionContext}. * @param namespaceDeclarationStack The {@link NamespaceDeclarationStack} instance. * @param executionContext The execution context. */ public static void setNamespaceDeclarationStack(NamespaceDeclarationStack namespaceDeclarationStack, ExecutionContext executionContext) { executionContext.setAttribute(NamespaceDeclarationStack.class, namespaceDeclarationStack); }
/** * Set the {@link NamespaceDeclarationStack} for the current message on the current {@link ExecutionContext}. * @param namespaceDeclarationStack The {@link NamespaceDeclarationStack} instance. * @param executionContext The execution context. */ public static void setNamespaceDeclarationStack(NamespaceDeclarationStack namespaceDeclarationStack, ExecutionContext executionContext) { executionContext.setAttribute(NamespaceDeclarationStack.class, namespaceDeclarationStack); }
/** * Set the {@link ExtensionContext} on the {@link org.milyn.container.ExecutionContext}. * @param extensionContext Extension Context. * @param executionContext Execution Context. */ public static void setExtensionContext(ExtensionContext extensionContext, ExecutionContext executionContext) { executionContext.setAttribute(EXEC_CONTEXT_KEY, extensionContext); }
public static void setResults(ExecutionContext executionContext, Result... results) { if(results != null) { executionContext.setAttribute(CONTEXT_KEY, results); } else { executionContext.removeAttribute(CONTEXT_KEY); } }
private static Map<String, ElementToNodeModel> getElementToNodeModelMap(ExecutionContext executionContext) { @SuppressWarnings("unchecked") Map<String, ElementToNodeModel> map = (Map<String, ElementToNodeModel>) executionContext.getAttribute(ElementToNodeModel.class); if(map == null) { map = new HashMap<String, ElementToNodeModel>(); executionContext.setAttribute(ElementToNodeModel.class, map); } return map; }
public static void setResults(ExecutionContext executionContext, Result... results) { if(results != null) { executionContext.setAttribute(CONTEXT_KEY, results); } else { executionContext.removeAttribute(CONTEXT_KEY); } }
public static void setResults(ExecutionContext executionContext, Result... results) { if(results != null) { executionContext.setAttribute(CONTEXT_KEY, results); } else { executionContext.removeAttribute(CONTEXT_KEY); } }
public static void setSource(ExecutionContext executionContext, Source source) { if(source != null) { executionContext.setAttribute(CONTEXT_KEY, source); } else { executionContext.removeAttribute(CONTEXT_KEY); } }
private static Map<String, ElementToNodeModel> getElementToNodeModelMap(ExecutionContext executionContext) { @SuppressWarnings("unchecked") Map<String, ElementToNodeModel> map = (Map<String, ElementToNodeModel>) executionContext.getAttribute(ElementToNodeModel.class); if(map == null) { map = new HashMap<String, ElementToNodeModel>(); executionContext.setAttribute(ElementToNodeModel.class, map); } return map; }
public static Map<String, String> getNamespacePrefixMappings(ExecutionContext executionContext) { Map<String, String> namespacePrefixMappings = (Map<String, String>) executionContext.getAttribute(NamespaceReaper.class); if(namespacePrefixMappings == null) { namespacePrefixMappings = new LinkedHashMap<String, String>(); executionContext.setAttribute(NamespaceReaper.class, namespacePrefixMappings); } return namespacePrefixMappings; } }
public static void setSource(ExecutionContext executionContext, Source source) { if(source != null) { executionContext.setAttribute(CONTEXT_KEY, source); } else { executionContext.removeAttribute(CONTEXT_KEY); } }
public static Map<String, String> getNamespacePrefixMappings(ExecutionContext executionContext) { Map<String, String> namespacePrefixMappings = (Map<String, String>) executionContext.getAttribute(NamespaceReaper.class); if(namespacePrefixMappings == null) { namespacePrefixMappings = new LinkedHashMap<String, String>(); executionContext.setAttribute(NamespaceReaper.class, namespacePrefixMappings); } return namespacePrefixMappings; } }
private static Map<String, ElementToNodeModel> getElementToNodeModelMap(ExecutionContext executionContext) { @SuppressWarnings("unchecked") Map<String, ElementToNodeModel> map = (Map<String, ElementToNodeModel>) executionContext.getAttribute(ElementToNodeModel.class); if(map == null) { map = new HashMap<String, ElementToNodeModel>(); executionContext.setAttribute(ElementToNodeModel.class, map); } return map; }
public static void setResults(ExecutionContext executionContext, Result... results) { if(results != null) { executionContext.setAttribute(CONTEXT_KEY, results); } else { executionContext.removeAttribute(CONTEXT_KEY); } }
public static DOMModel getModel(ExecutionContext executionContext) { DOMModel nodeModel = (DOMModel) executionContext.getAttribute(DOMModel.class); if(nodeModel == null) { nodeModel = new DOMModel(); executionContext.setAttribute(DOMModel.class, nodeModel); } return nodeModel; } }
public static BeanRepository getBeanRepository(ExecutionContext executionContext) { BeanRepository beanRepository = (BeanRepository) executionContext.getAttribute(BEAN_REPOSITORY_CONTEXT_KEY); if(beanRepository == null) { beanRepository = new BeanRepository(executionContext.getBeanContext()); executionContext.setAttribute(BEAN_REPOSITORY_CONTEXT_KEY, beanRepository); } return beanRepository; }