[svn r172] updated x4o
This commit is contained in:
parent
7db709e9b6
commit
7a797028ac
13 changed files with 64 additions and 260 deletions
|
|
@ -6,10 +6,8 @@ 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.context.BindingRuleHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
|
||||
import java.util.Map;
|
||||
import com.idcanet.x4o.element.ElementBindingHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -18,16 +16,8 @@ import java.util.Map;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Feb 24, 2006
|
||||
*/
|
||||
public class FoeiEventBindingRuleHandler implements BindingRuleHandler {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parameters
|
||||
*/
|
||||
public void setParameters(Map<String,String> parameters) {
|
||||
public class FoeiEventBindingRuleHandler implements ElementBindingHandler {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param object1
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import com.idcanet.foei.core.FoeiProcessFactory;
|
|||
import com.idcanet.foei.event.EventInput;
|
||||
import com.idcanet.foei.event.EventOutput;
|
||||
import com.idcanet.foei.event.EventPort;
|
||||
import com.idcanet.x4o.context.GlobalParameterHandler;
|
||||
import com.idcanet.x4o.element.AbstractElementParameterHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
import com.idcanet.x4o.element.ElementException;
|
||||
|
||||
|
|
@ -41,14 +41,13 @@ import com.idcanet.x4o.element.ElementException;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Apr 15, 2006
|
||||
*/
|
||||
public class BindAttributeHandler implements GlobalParameterHandler {
|
||||
|
||||
private String parameterName =null;
|
||||
public class BindAttributeHandler extends AbstractElementParameterHandler {
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String)
|
||||
*/
|
||||
public void doParameter(Element element,String parameterValue) {
|
||||
@Override
|
||||
public void doParameterStartTag(Element element,String parameterValue) throws Exception {
|
||||
String[] port = parameterValue.split(":");
|
||||
if(port.length!=2) {
|
||||
return;
|
||||
|
|
@ -80,22 +79,4 @@ public class BindAttributeHandler implements GlobalParameterHandler {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#getParameterName()
|
||||
*/
|
||||
public String getParameterName() {
|
||||
return parameterName;
|
||||
}
|
||||
|
||||
public void setParameterName(String parameterName) {
|
||||
this.parameterName=parameterName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.idcanet.x4o.context.GlobalParameterHandler#getProcessCloseTag()
|
||||
*/
|
||||
public Boolean getProcessCloseTag() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,10 +28,8 @@ package com.idcanet.foei.core.x4o;
|
|||
|
||||
import com.idcanet.foei.event.EventStep;
|
||||
import com.idcanet.foei.event.EventStepController;
|
||||
import com.idcanet.x4o.context.BindingRuleHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
|
||||
import java.util.Map;
|
||||
import com.idcanet.x4o.element.ElementBindingHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -39,9 +37,7 @@ import java.util.Map;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Apr 16, 2006
|
||||
*/
|
||||
public class EventStepBindRuleHandler implements BindingRuleHandler {
|
||||
|
||||
private Map<String, String> parameters = null;
|
||||
public class EventStepBindRuleHandler implements ElementBindingHandler {
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.BindingRuleHandler#canBind(java.lang.Object, java.lang.Object)
|
||||
|
|
@ -66,11 +62,4 @@ public class EventStepBindRuleHandler implements BindingRuleHandler {
|
|||
Object child = element.getElementObject();
|
||||
((EventStepController)parent).addEventStep((EventStep)child);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.BindingRuleHandler#setParameters(java.util.Map)
|
||||
*/
|
||||
public void setParameters(Map<String, String> parameters) {
|
||||
this.parameters=parameters;
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ package com.idcanet.foei.core.x4o;
|
|||
|
||||
import com.idcanet.foei.core.FoeiProcess;
|
||||
import com.idcanet.foei.core.FoeiProcessFactory;
|
||||
import com.idcanet.x4o.context.GlobalParameterHandler;
|
||||
import com.idcanet.x4o.element.AbstractElementParameterHandler;
|
||||
import com.idcanet.x4o.element.Element;
|
||||
|
||||
/**
|
||||
|
|
@ -37,14 +37,13 @@ import com.idcanet.x4o.element.Element;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 Jul 8, 2006
|
||||
*/
|
||||
public class IdAttributeHandler implements GlobalParameterHandler {
|
||||
public class IdAttributeHandler extends AbstractElementParameterHandler {
|
||||
|
||||
private String parameterName =null;
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#doParameter(java.lang.Object, java.lang.String)
|
||||
*/
|
||||
public void doParameter(Element element,String parameterValue) {
|
||||
@Override
|
||||
public void doParameterStartTag(Element element,String parameterValue) throws Exception {
|
||||
// add to objext context
|
||||
if(element.getElementObject()==null | "".equals(parameterValue)) {
|
||||
parameterValue= "auto."+Integer.toHexString(element.getElementObject().hashCode());
|
||||
|
|
@ -53,22 +52,4 @@ public class IdAttributeHandler implements GlobalParameterHandler {
|
|||
FoeiProcess process = FoeiProcessFactory.getFoeiProcess();
|
||||
process.addEventObject(element.getElementObject(),parameterValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.idca.foei.xml.x2o.eld.GlobalParameterHandler#getParameterName()
|
||||
*/
|
||||
public String getParameterName() {
|
||||
return parameterName;
|
||||
}
|
||||
|
||||
public void setParameterName(String parameterName) {
|
||||
this.parameterName=parameterName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.idcanet.x4o.context.GlobalParameterHandler#getProcessCloseTag()
|
||||
*/
|
||||
public Boolean getProcessCloseTag() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue