Package org.jitterbit.integration.data.structure

Examples of org.jitterbit.integration.data.structure.DataStructure


        processInputStructure();
        processOutputStructure();
    }

    private void processInputStructure() {
        DataStructure input = tf.getInputStructure();
        if (input == null) {
            return;
        }
        switch (input.getStructureType()) {
        case WebServiceRequest: {
            WebServiceCall replacement = replaceWebServiceCall((WebServiceStructure) input);
            tf.setInputStructure(replacement.getInputStructure());
            break;
        }
View Full Code Here


        return (WebServiceCall) service.getReplacement(wsCallId);
    }


    private void processOutputStructure() {
        DataStructure output = tf.getOutputStructure();
        if (output == null) {
            return;
        }
        switch (output.getStructureType()) {
        case WebServiceRequest: {
            WebServiceCall replacement = replaceWebServiceCall((WebServiceStructure) output);
            tf.setOutputStructure(replacement.getInputStructure());
            break;
        }
View Full Code Here

    public void applyToTransformation(Transformation tf) throws WizardPageException {
        JmsMessage msg = getSelectedEntity();
        if (msg != null) {
            tf.setTargetJmsMessage(msg);
            DataStructure output = getStructure(msg);
            tf.setOutputStructure(output);
            tf.setTargetTextDocumentId(msg.getPayloadTextDocumentId());
            // TODO: The message properties.
        } else {
            // TODO: This may happen if the user deleted the JMS message before completing
View Full Code Here

        Transformation tf = getFirstTransformation(pipeline);
        return (tf != null ? checkInputStructure(tf) : false);
    }

    private boolean checkInputStructure(Transformation tf) {
        DataStructure input = tf.getInputStructure();
        return (input instanceof WebServiceRequestStructure) && checkWsCall((WebServiceRequestStructure) input);
    }
View Full Code Here

    private boolean checkLastTransformation(Transformation last) {
        if (last == null) {
            return false;
        }
        DataStructure output = last.getOutputStructure();
        return (output instanceof WebServiceResponseStructure) && checkWsCall((WebServiceResponseStructure) output);
    }
View Full Code Here

            // Special case of Web Service Request as input: We consider this to be OK since this
            // operation can be used as a sibling operation that implements Hosted Web Service Call
            // Forwarding for a hosted WS operation.
            // TODO: Either check that this operation is indeed used for call forwarding, or give
            // a validation warning.
            DataStructure input = tf.getInputStructure();
            if (input == null) {
                String msg = "The transformation \"" + tf.getName() + "\" does not have an input structure.";
                ErrorLog.log(getClass(), msg, new Exception(msg));
                return true;
            }
            DataStructureType type = input.getStructureType();
            return !type.isSourceDataRequired() || type == DataStructureType.WebServiceRequest;
        }
View Full Code Here

        ValidationContext context = collector.context();
        return new OperationChainModel(operation, context.getDataStore(), context.getDependencies());
    }
   
    private void validateFunctionJoins(Iterable<Operation> previousOperations) {
        DataStructure input = getInputStructure();
        if (input == null) {
            return;
        }
        for (Operation prev : previousOperations) {
            validateFunctionJoin(input, prev);
View Full Code Here

    private void validateFunctionJoin(DataStructure input, Operation previousOp) {
        assert (input != null) : "This method should not be called with a null input structure";
        OperationFunctionInfo info = new OperationFunctionInfo(previousOp);
        Function last = info.getLastNonPassThroughFunction();
        if (last != null) {
            DataStructure output = last.getOutputStructure();
            if (output != null && input.isCompatibleWith(output)) {
                return;
            }
        }
        fatal("The source structure of this operation is not compatible with the target structure of the "
View Full Code Here

        Persistor root = p.getFirstChild(INPUT);
        if (root == null) {
            // See comment in isApplicable() for an explanation
            return null;
        }
        DataStructure struct = null;
        DataStructureType type = DataStructureType.valueOf(root.getString(TYPE));
        switch (type) {
        case ComplexText:
        case Text:
            // Special case for TextStructures: They have already been fully restored as part of
            // the TextDocument they belong to. We can return here.
            return lookupTextStructure(root, lookup);
        case WebServiceRequest:
            // Special case for WebServiceStructures: They have already been fully restored as part
            // of
            // the WebServiceCall they belong to. We can return here.
            return lookupWebServiceCall(root, lookup).getInputStructure();
        case WebServiceResponse:
            return lookupWebServiceCall(root, lookup).getOutputStructure();
        case None:
            struct = new NoStructure();
            break;
        case Database:
            struct = createDatabaseInputStructure(tf, lookup);
            break;
        case LDAP:
            struct = createLdapInputStructure(tf, lookup);
            break;
        default:
            throw new RuntimeException("Unexpected structure type: " + type);
        }
        struct.restoreFrom(root);
        return struct;
    }
View Full Code Here

        Persistor root = p.getFirstChild(OUTPUT);
        if (root == null) {
            // See comment in isApplicable() for an explanation
            return null;
        }
        DataStructure struct = null;
        DataStructureType type = DataStructureType.valueOf(root.getString(TYPE));
        switch (type) {
        case ComplexText:
        case Text:
            // Special case for TextStructures: They have already been fully restored as part of
            // the TextDocument they belong to. We can return here.
            return lookupTextStructure(root, lookup);
        case WebServiceRequest:
            // Special case for WebServiceStructures: They have already been fully restored as part
            // of
            // the WebServiceCall they belong to. We can return here.
            return lookupWebServiceCall(root, lookup).getInputStructure();
        case WebServiceResponse:
            return lookupWebServiceCall(root, lookup).getOutputStructure();
        case None:
            struct = new NoStructure();
            break;
        case Database:
            struct = createDatabaseOutputStructure(tf, lookup);
            break;
        case LDAP:
            struct = createLdapOutputStructure(tf, lookup);
            break;
        default:
            throw new RuntimeException("Unexpected structure type: " + type);
        }
        struct.restoreFrom(root);
        return struct;
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.structure.DataStructure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.