X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2Fxml%2FFlowBeanDefinitionParser.java;h=ca64d12f5296802d0bd40f9316317a49c5eec4cc;hb=503e687f9e541a995f33851e6909e388fe8da0c5;hp=23b05074840ef8b1ac9bc3eb0e0c397a0b96ccd0;hpb=fa15e0d0a70b92ba12153f5d5d02d7e900fc25d2;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java index 23b050748..ca64d12f5 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/xml/FlowBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2012 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,13 +42,24 @@ public class FlowBeanDefinitionParser extends AbstractSingleBeanDefinitionParser { private Log log = LogFactory.getLog(FlowBeanDefinitionParser.class); + /** Whether the user has already be warned on path attribute usage. */ + private Boolean warnedAboutPathAttribute = false; + @SuppressWarnings("unchecked") @Override protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { String path = element.getAttribute("path"); - if (StringUtils.hasText(path)) - log.warn("The 'path' attribute is not used anymore to build flows"); + if (StringUtils.hasText(path)) { + builder.addPropertyValue("path", path); + + // warns user only once + if (!warnedAboutPathAttribute) + log.warn("The path=\"\" attribute is deprecated" + + " and will be removed in a later release." + + " Use ."); + warnedAboutPathAttribute = true; + } String spec = element.getAttribute("spec"); if (StringUtils.hasText(spec))