Package org.milyn.cdr

Examples of org.milyn.cdr.Parameter


        List<SmooksResourceConfiguration> configList = configurator.toConfig();
        SmooksResourceConfiguration config = configList.get(0);

        if(keyMap != null) {
            Parameter keyMapParam = new Parameter(YamlReader.CONFIG_PARAM_KEY_MAP, keyMap);
            config.setParameter(keyMapParam);
        }

        return configList;
    }
View Full Code Here


  /**
   *
   */
  @SuppressWarnings("unchecked")
  private Map<String, String> initKeyMap() {
    Parameter keyMapParam = config.getParameter(CONFIG_PARAM_KEY_MAP);

       if (keyMapParam != null) {
           Object objValue = keyMapParam.getObjValue();

           if(objValue instanceof Map<?, ?>) {
               return (HashMap<String, String>) objValue;
           } else {
               Element keyMapParamElement = keyMapParam.getXml();

               if(keyMapParamElement != null) {
                   return KeyMapDigester.digest(keyMapParamElement);
               } else {
                 throw new SmooksException("Sorry, the key properties must be available as XML DOM. Please configure using XML.");
View Full Code Here

    public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException {
        ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext);
        SmooksResourceConfiguration config = extensionContext.getResourceStack().peek();

        if(config.getSelector() == null || config.getSelector().equals("none")) {
            Parameter beanIdParam = config.getParameter("beanId");
            String beanId = beanIdParam.getValue();

            SmooksResourceConfiguration beanCreatorConfig = findBeanCreatorConfig(beanId, extensionContext);

            if(beanCreatorConfig == null) {
                throw new SmooksConfigurationException("No <jb:wiring> configurations is found yet for beanId '" + beanId + "'. " +
View Full Code Here

    public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException {
        ExtensionContext extensionContext = ExtensionContext.getExtensionContext(executionContext);
        SmooksResourceConfiguration config = extensionContext.getResourceStack().peek();

        if(config.getSelector() == null || config.getSelector().equals("none")) {
            Parameter beanIdParam = config.getParameter("beanId");
            String beanId = beanIdParam.getValue();

            SmooksResourceConfiguration beanCreatorConfig = findBeanCreatorConfig(beanId, extensionContext);

            if(beanCreatorConfig == null) {
                throw new SmooksConfigurationException("No <jb:bean> configurations is found yet for beanId '" + beanId + "'. " +
View Full Code Here

  /**
   *
   */
  private void initKeyMap() {
    Parameter keyMapParam = config.getParameter(CONFIG_PARAM_KEY_MAP);

       if (keyMapParam != null) {
           Object objValue = keyMapParam.getObjValue();

           if(objValue instanceof Map) {
               keyMap = (HashMap<String, String>) objValue;
           } else {
               Element keyMapParamElement = keyMapParam.getXml();

               if(keyMapParamElement != null) {

                   setKeyMap(KeyMapDigester.digest(keyMapParamElement));

View Full Code Here

        List<SmooksResourceConfiguration> configList = configurator.toConfig();
        SmooksResourceConfiguration config = configList.get(0);

        if(keyMap != null) {
            Parameter keyMapParam = new Parameter(JSONReader.CONFIG_PARAM_KEY_MAP, keyMap);
            config.setParameter(keyMapParam);
        }

        config.setTargetProfile(targetProfile);
View Full Code Here

public class SetElementDataConfigDigester implements DOMVisitAfter {

    public void visitAfter(Element element, ExecutionContext executionContext) throws SmooksException {
        SmooksResourceConfiguration config = ExtensionContext.getExtensionContext(executionContext).getCurrentConfig();

        config.setParameter(new Parameter(SetElementData.ATTRIBUTE_DATA, "##value_as_xml_element").setXML(element));
    }
View Full Code Here

            config.setConditionEvaluator(new BeanMapExpressionEvaluator(value));
        } else if(setOn.equals("conditionRef")) {
            ExtensionContext execentionContext = ExtensionContext.getExtensionContext(executionContext);
            config.setConditionEvaluator(execentionContext.getXmlConfigDigester().getConditionEvaluator(value));
        } else {
            Parameter param = config.setParameter(setOn, value);
            if(xml != null) {
              param.setXML(xml);
            }
        }
    }
View Full Code Here

    /**
   * Iterate over the table smooks-resource instances and sort the SmooksResourceConfigurations
   * on each element.  Ordered by specificity.
   */
  private void sortSmooksResourceConfigurations(Map<String, List<SmooksResourceConfiguration>> table) {
        Parameter sortParam = ParameterAccessor.getParameter("sort.resources", table);
        if(sortParam != null && sortParam.getValue().trim().equalsIgnoreCase("true")) {
            if(!table.isEmpty()) {
                Iterator tableEntrySet = table.entrySet().iterator();

                while(tableEntrySet.hasNext()) {
                    Map.Entry entry = (Map.Entry)tableEntrySet.next();
View Full Code Here

TOP

Related Classes of org.milyn.cdr.Parameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.