[svn r378] updated x4o
This commit is contained in:
parent
a773fc002e
commit
2ed987361c
|
@ -6,9 +6,9 @@ import com.idcanet.foei.event.EventInput;
|
|||
import com.idcanet.foei.event.EventOutput;
|
||||
import com.idcanet.foei.event.EventStep;
|
||||
import com.idcanet.foei.event.EventStepController;
|
||||
import com.idcanet.x4o.element.AbstractElementBindingHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementBindingException;
|
||||
import com.idcanet.x4o.element.ElementBindingHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -17,7 +17,7 @@ import com.idcanet.x4o.element.ElementBindingHandler;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Feb 24, 2006
|
||||
*/
|
||||
public class FoeiEventBindingRuleHandler implements ElementBindingHandler {
|
||||
public class FoeiEventBindingRuleHandler extends AbstractElementBindingHandler {
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -29,7 +29,15 @@ package com.idcanet.foei.core.impl;
|
|||
import com.idcanet.foei.core.FoeiProcess;
|
||||
import com.idcanet.foei.core.FoeiProcessFactory;
|
||||
import com.idcanet.foei.core.X2OExecutor;
|
||||
import com.idcanet.x4o.core.AbstractX4OPhaseHandler;
|
||||
import com.idcanet.x4o.core.X4OParser;
|
||||
import com.idcanet.x4o.core.X4OPhaseException;
|
||||
import com.idcanet.x4o.core.X4OPhaseHandler;
|
||||
import com.idcanet.x4o.core.X4OPhaseHandlerFactory;
|
||||
import com.idcanet.x4o.core.X4OPhase;
|
||||
import com.idcanet.x4o.eld.EldX4OElementConfigurator;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementContext;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.logging.Level;
|
||||
|
@ -67,8 +75,12 @@ public class X2OExecutorImpl implements X2OExecutor {
|
|||
// config parser
|
||||
FoeiProcess foeiProcess = FoeiProcessFactory.getFoeiProcess();
|
||||
X4OParser parser = new X4OParser("foei");
|
||||
parser.preStart();
|
||||
parser.getElementContext().getProperties().putAll(foeiProcess.getFoeiContext().getStartProperties());
|
||||
|
||||
for (String key:foeiProcess.getFoeiContext().getStartProperties().keySet()) {
|
||||
String value = foeiProcess.getFoeiContext().getStartProperties().get(key);
|
||||
parser.setProperty(key, value);
|
||||
}
|
||||
|
||||
|
||||
logger.info("Executing X2O Parsing.");
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import com.idcanet.foei.event.EventOutput;
|
|||
import com.idcanet.foei.event.EventPort;
|
||||
import com.idcanet.x4o.element.AbstractElementParameterHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementConfiguratorException;
|
||||
import com.idcanet.x4o.element.ElementException;
|
||||
|
||||
/**
|
||||
|
@ -47,7 +48,7 @@ public class BindAttributeHandler extends AbstractElementParameterHandler {
|
|||
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void doParameterStartTag(Element element) throws ElementException {
|
||||
public void doConfigElement(Element element) throws ElementConfiguratorException {
|
||||
String parameterValue = element.getAttributes().get(getParameterName());
|
||||
String[] port = parameterValue.split(":");
|
||||
if(port.length!=2) {
|
||||
|
@ -77,7 +78,7 @@ public class BindAttributeHandler extends AbstractElementParameterHandler {
|
|||
foei.addBinding(outputEventPort,inputEventPort);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ElementConfiguratorException(this,e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ package com.idcanet.foei.core.x4o;
|
|||
|
||||
import com.idcanet.foei.event.EventStep;
|
||||
import com.idcanet.foei.event.EventStepController;
|
||||
import com.idcanet.x4o.element.AbstractElementBindingHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementBindingException;
|
||||
import com.idcanet.x4o.element.ElementBindingHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -38,7 +38,7 @@ import com.idcanet.x4o.element.ElementBindingHandler;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Apr 16, 2006
|
||||
*/
|
||||
public class EventStepBindRuleHandler implements ElementBindingHandler {
|
||||
public class EventStepBindRuleHandler extends AbstractElementBindingHandler {
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.BindingRuleHandler#canBind(java.lang.Object, java.lang.Object)
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.idcanet.foei.core.FoeiProcess;
|
|||
import com.idcanet.foei.core.FoeiProcessFactory;
|
||||
import com.idcanet.x4o.element.AbstractElementParameterHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementException;
|
||||
import com.idcanet.x4o.element.ElementConfiguratorException;
|
||||
|
||||
/**
|
||||
* Handles the id
|
||||
|
@ -44,7 +44,7 @@ public class IdAttributeHandler extends AbstractElementParameterHandler {
|
|||
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void doParameterStartTag(Element element) throws ElementException {
|
||||
public void doConfigElement(Element element) throws ElementConfiguratorException {
|
||||
// add to objext context
|
||||
String parameterValue = element.getAttributes().get(getParameterName());
|
||||
if(element.getElementObject()==null | "".equals(parameterValue)) {
|
||||
|
|
Loading…
Reference in a new issue