Search in sources :

Example 16 with StepSource

use of com.twinsoft.convertigo.beans.core.StepSource in project convertigo by convertigo.

the class TransactionStep method stepMoved.

@Override
public void stepMoved(StepEvent stepEvent) {
    super.stepMoved(stepEvent);
    StepSource source = new StepSource(this, connectionStringDefinition);
    if (source != null && !source.isEmpty()) {
        source.updateTargetStep((Step) stepEvent.getSource(), (String) stepEvent.data);
    }
}
Also used : StepSource(com.twinsoft.convertigo.beans.core.StepSource)

Example 17 with StepSource

use of com.twinsoft.convertigo.beans.core.StepSource in project convertigo by convertigo.

the class XMLSortStep method getTargetXPath.

@Override
protected String getTargetXPath() throws EngineException {
    String xpath = "";
    StepSource source = getSource();
    if (!source.isEmpty()) {
        Step sourceStep = source.getStep();
        if (sourceStep instanceof IteratorStep) {
            xpath = source.getXpath().substring(1);
        }
    }
    return xpath;
}
Also used : StepSource(com.twinsoft.convertigo.beans.core.StepSource) Step(com.twinsoft.convertigo.beans.core.Step)

Example 18 with StepSource

use of com.twinsoft.convertigo.beans.core.StepSource in project convertigo by convertigo.

the class XMLConcatStep method getActionValue.

@Override
protected String getActionValue() throws EngineException {
    String nodeValue = super.getActionValue();
    XMLVector<XMLVector<Object>> sourcesDefinition = getSourcesDefinition();
    if (sourcesDefinition.size() > 0) {
        StepSource source = null;
        NodeList list = null;
        for (int i = 0; i < sourcesDefinition.size(); i++) {
            nodeValue += nodeValue.equals("") ? "" : separator;
            source = getDefinitionsSource(i);
            if (source != null) {
                list = source.getContextValues();
                if (list != null) {
                    int len = list.getLength();
                    for (int j = 0; j < len; j++) {
                        String text = getNodeValue(list.item(j));
                        nodeValue += ((text == null) ? getDefinitionsDefaultValue(i) : text);
                        nodeValue += ((j < len - 1) ? separator : "");
                    }
                } else {
                    nodeValue += getDefinitionsDefaultValue(i);
                }
            } else {
                nodeValue += getDefinitionsDefaultValue(i);
            }
        }
    }
    return nodeValue;
}
Also used : StepSource(com.twinsoft.convertigo.beans.core.StepSource) XMLVector(com.twinsoft.convertigo.beans.common.XMLVector) NodeList(org.w3c.dom.NodeList)

Aggregations

StepSource (com.twinsoft.convertigo.beans.core.StepSource)18 NodeList (org.w3c.dom.NodeList)7 EngineException (com.twinsoft.convertigo.engine.EngineException)5 Step (com.twinsoft.convertigo.beans.core.Step)4 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 CommunicationException (javapns.communication.exceptions.CommunicationException)3 KeystoreException (javapns.communication.exceptions.KeystoreException)3 JSONException (org.codehaus.jettison.json.JSONException)3 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)2 Undefined (org.mozilla.javascript.Undefined)2 Message (com.google.android.gcm.server.Message)1 MulticastResult (com.google.android.gcm.server.MulticastResult)1 Result (com.google.android.gcm.server.Result)1 Sender (com.google.android.gcm.server.Sender)1 XMLVector (com.twinsoft.convertigo.beans.common.XMLVector)1 OutputFilter (com.twinsoft.convertigo.beans.core.Sequence.OutputFilter)1 ProjectExplorerView (com.twinsoft.convertigo.eclipse.views.projectexplorer.ProjectExplorerView)1 StepSourceEvent (com.twinsoft.convertigo.eclipse.views.projectexplorer.StepSourceEvent)1 DatabaseObjectTreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.DatabaseObjectTreeObject)1