}
if (state.getInputMapper() == null
&& (this.inputAttributes.size() > 0 || this.inputMapping.size() > 0)) {
if (WebflowModelXmlUtils.isVersion1Flow(state)) {
InputMapper entry = new InputMapper();
entry.createNew(stateClone);
for (IInputAttribute a : this.inputAttributes) {
entry.addInputAttribute(a);
}
for (IMapping a : this.inputMapping) {
entry.addMapping(a);
}
stateClone.setInputMapper(entry);
}
else {
stateClone.removeAllInputAttribute();
for (IInputAttribute a : this.inputAttributes) {
stateClone.addInputAttribute(a);
}
stateClone.setInputMapper(null);
}
}
else if (this.inputAttributes.size() == 0 && this.inputMapping.size() == 0) {
stateClone.setInputMapper(null);
}
else {
stateClone.getInputMapper().removeAllInputAttribute();
stateClone.getInputMapper().removeAllMapping();
for (IInputAttribute a : this.inputAttributes) {
stateClone.getInputMapper().addInputAttribute(a);
}
for (IMapping a : this.inputMapping) {
stateClone.getInputMapper().addMapping(a);
}
}
if (state.getGlobalTransitions() == null && this.globalTransitions.size() > 0) {
GlobalTransitions entry = new GlobalTransitions();
entry.createNew(stateClone);
for (IStateTransition a : this.globalTransitions) {
entry.addGlobalTransition(a);
}
stateClone.setGlobalTransitions(entry);
}
else if (this.globalTransitions.size() == 0) {
stateClone.setGlobalTransitions(null);