Package org.jitterbit.integration.data.structure

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


            old = getInputStructure();
            // TODO: Compare the old with the new. If equal, do not apply
            if (old != null) {
                old.removePropertyChangeListener(inputStructureListener);
            }
            DataStructureType type = struct.getStructureType();
            if (type == DataStructureType.XML) {
                // The XML structure info is stored directly in the
                // TransformationsTab --> use the key-value pairs
                // to store the info:
                XmlStructure xml = (XmlStructure) struct;
View Full Code Here


     * @see #getOutputStructure()
     */
    @Override
    public DataStructure getInputStructure() {
        synchronized (getDataLock()) {
            DataStructureType type = getSourceType();
            if (type == null) {
                return null;
            } else if (type == DataStructureType.XML) {
                XmlStructure struct = new XmlStructure();
                struct.setFilePath(getProperty(SOURCE_XML));
View Full Code Here

            old = getOutputStructure();
            // TODO: Compare the old with the new. If equal, do not apply
            if (old != null) {
                old.removePropertyChangeListener(outputStructureListener);
            }
            DataStructureType type = struct.getStructureType();
            switch (type) {
            case XML:
                // The XML structure info is stored directly in the
                // TransformationsTab --> use the key-value pairs
                // to store the info:
View Full Code Here

     * @see #getInputStructure()
     */
    @Override
    public DataStructure getOutputStructure() {
        synchronized (getDataLock()) {
            DataStructureType type = getTargetType();
            if (type == null) {
                return null;
            } else if (type == DataStructureType.XML) {
                XmlStructure struct = new XmlStructure();
                struct.setFilePath(getProperty(TARGET_XML));
View Full Code Here

     *
     * @return <code>true</code> if this transformation uses an XML based structure as input or
     *         output; otherwise <code>false</code>
     */
    public boolean isXmlTransformation() {
        DataStructureType source = getSourceType();
        if (source != null && source.isXmlBased()) {
            return true;
        }
        DataStructureType target = getTargetType();
        if (target != null && target.isXmlBased()) {
            return true;
        }
        // TODO: (1.4) Check if this transformation uses a JMS message with XML payload
        return false;
    }
View Full Code Here

        checkTransformationJoin(first, second);
    }
   
    private void checkTransformationJoin(Transformation first, Transformation second) {
        DataStructure in = second.getInputStructure();
        DataStructureType type = in.getStructureType();
        // For certain types of input to the second transformation it does not matter what
        // the output of the first transformation is.
        if (type != DataStructureType.None && type != DataStructureType.Database) {
            if (!second.acceptsOutputFrom(first)) {
                warning(ValidationUtils.getIllegalFunctionJoinMessage());
View Full Code Here

        return false;
    }
   
    private boolean canTargetAcceptOutput(DataStructure output) {
        assert (output != null);
        DataStructureType structureType = output.getStructureType();
        if (target == null) {
            // We allow (None) as target for transformations to a text structure. This is
            // because people occasionally need to create dummy transformations to set
            // global data elements, and the simplest way to do that is to use a text target.
            // TODO: Give a warning?
View Full Code Here

        return false;
    }
   
    private boolean canSourceProduceInput(DataStructure input) {
        assert (input != null);
        DataStructureType structureType = input.getStructureType();
        if (source == null) {
            // (none) as source is valid in two cases:
            // 1. The transformation does not have any input
            // 2. The transformation uses a WebServiceRequest as input, in which case
            // it can be used in a sibling operation to a hosted webervice operation.
            return !structureType.isSourceDataRequired() || structureType == DataStructureType.WebServiceRequest;
        } else if (source == SystemSource.SOURCE_FROM_PREVIOUS_OPERATION || source == SystemSource.FROM_HTTP_ENDPOINT) {
            structureType.isExternalSourceAccepted();
            return true;
        } else if (source == SystemSource.WEB_SERVICE_CALL) {
            return structureType == DataStructureType.WebServiceRequest;
        } else {
            // Databases are special, since the Database source itself
View Full Code Here

            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

    private static final String WSCALL_ID = "wsCallId";

    public static void saveInputStructure(Transformation tf, DataStructure input, Persistor p) {
        if (isApplicable(input)) {
            DataStructureType type = input.getStructureType();
            Persistor root = p.createChild(INPUT);
            root.putString(TYPE, type.name());
            if (type.isTextBased()) {
                // Special case for TextStructures: We restore them directly from the TextDocument,
                // using the document ID
                root.putString(DOC_ID, tf.getSourceTextDocumentId().toString());
            } else if (type == DataStructureType.WebServiceRequest || type == DataStructureType.WebServiceResponse) {
                // Special case for WebServiceCalls: We restore them directly from the
View Full Code Here

TOP

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

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.