Package org.jitterbit.integration.data.script

Examples of org.jitterbit.integration.data.script.ScriptStatus


    private boolean validate() {
        model.setDebugMessage("");
        ScriptValidator validator = new ScriptValidator();
        validator.setSourceDataElementContainer(model.getSourceDataElementContainer());
        String expression = model.getExpressionToTest();
        ScriptStatus status = validator.validate(expression);
        if (status.isInvalid()) {
            model.setDebugMessage(status.getMessage());
            return false;
        }
        return true;
    }
View Full Code Here


                return !required;
            }
            if (parser != null) {
                String expression = ScriptConstants.wrapInTags(value, false);
                Result result = parser.parse(expression);
                ScriptStatus status = result.getStatus();
                if (status.getState() == State.INVALID) {
                    errorMessage = status.getMessage();
                    return false;
                }
            }
            errorMessage = null;
            return true;
View Full Code Here

        }
    }

    @Override
    protected void validateOtherPropertiesThanTheName(ValidationMessageCollector collector) {
        ScriptStatus status = new ScriptValidator().validate(getScript());
        switch (status.getState()) {
        case INVALID:
            collector.addMessage("The script has syntax errors", ValidationStatus.INVALID);
            break;
        case WARNING:
            collector.addMessage(status.getMessage(), ValidationStatus.WARNING);
            break;
        case VALID:
            break; // Nothing to do here
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.script.ScriptStatus

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.