/** * Get the {@link ExtensionContext} from the {@link org.milyn.container.ExecutionContext}. * @param executionContext Execution Context. * @return Extension Context. */ public static ExtensionContext getExtensionContext(ExecutionContext executionContext) { return (ExtensionContext) executionContext.getAttribute(EXEC_CONTEXT_KEY); }
/** * Get the {@link ExtensionContext} from the {@link org.milyn.container.ExecutionContext}. * @param executionContext Execution Context. * @return Extension Context. */ public static ExtensionContext getExtensionContext(ExecutionContext executionContext) { return (ExtensionContext) executionContext.getAttribute(EXEC_CONTEXT_KEY); }
/** * Get the {@link NamespaceDeclarationStack} for the current message from the current {@link ExecutionContext}. * @param executionContext The execution context. */ public static NamespaceDeclarationStack getNamespaceDeclarationStack(ExecutionContext executionContext) { return (NamespaceDeclarationStack) executionContext.getAttribute(NamespaceDeclarationStack.class); } }
/** * Get the {@link ExtensionContext} from the {@link org.milyn.container.ExecutionContext}. * @param executionContext Execution Context. * @return Extension Context. */ public static ExtensionContext getExtensionContext(ExecutionContext executionContext) { return (ExtensionContext) executionContext.getAttribute(EXEC_CONTEXT_KEY); }
/** * Get the {@link NamespaceDeclarationStack} for the current message from the current {@link ExecutionContext}. * @param executionContext The execution context. */ public static NamespaceDeclarationStack getNamespaceDeclarationStack(ExecutionContext executionContext) { return (NamespaceDeclarationStack) executionContext.getAttribute(NamespaceDeclarationStack.class); } }
/** * Get the {@link NamespaceDeclarationStack} for the current message from the current {@link ExecutionContext}. * @param executionContext The execution context. */ public static NamespaceDeclarationStack getNamespaceDeclarationStack(ExecutionContext executionContext) { return (NamespaceDeclarationStack) executionContext.getAttribute(NamespaceDeclarationStack.class); } }
@SuppressWarnings ( "unchecked" ) public static List<String> getListFileNames( final ExecutionContext executionContext ) { return (List<String>) executionContext.getAttribute( ALL_LIST_FILE_NAME_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 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; } }
@SuppressWarnings("unchecked") public static Stack<XMLReader> getReaders(ExecutionContext execContext) { Stack<XMLReader> readers = (Stack<XMLReader>) execContext.getAttribute(XMLReader.class); if(readers == null) { readers = new Stack<XMLReader>(); setReaders(readers, execContext); } return readers; }
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 Stack<XMLReader> getReaders(ExecutionContext execContext) { Stack<XMLReader> readers = (Stack<XMLReader>) execContext.getAttribute(XMLReader.class); if(readers == null) { readers = new Stack<XMLReader>(); setReaders(readers, execContext); } return readers; }
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; }
@SuppressWarnings("unchecked") public static Stack<XMLReader> getReaders(ExecutionContext execContext) { Stack<XMLReader> readers = (Stack<XMLReader>) execContext.getAttribute(XMLReader.class); if(readers == null) { readers = new Stack<XMLReader>(); setReaders(readers, execContext); } return readers; }
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 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 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 void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException { SmooksResourceConfiguration config = ExtensionContext.getExtensionContext(executionContext).getResourceStack().peek(); Integer index = (Integer) executionContext.getAttribute(ParameterIndexInitializer.PARAMETER_INDEX); ResourceConfigUtil.setProperty(config, "index", Integer.toString(index), executionContext); executionContext.setAttribute(ParameterIndexInitializer.PARAMETER_INDEX, index + 1); }