Package org.jitterbit.integration.data.validation

Examples of org.jitterbit.integration.data.validation.ValidationStatus


    /**
     * Returns the compound (most severe) validation status of this folder and all its descendants.
     *
     */
    public final ValidationStatus getCompoundValidationStatus() {
        ValidationStatus status = getCurrentValidationResult().status();
        if (status == ValidationStatus.INVALID) {
            return status;
        }
        for (IntegrationEntity child : getAllChildren()) {
            ValidationStatus childStatus = child.getValidationStatus();
            if (childStatus.isMoreSevere(status)) {
                status = childStatus;
                if (status == ValidationStatus.INVALID) {
                    break;
                }
            }
View Full Code Here


        }
    }

    @Override
    public ValidationStatus getValidationStatus() {
        ValidationStatus status = super.getValidationStatus();
        if (status == ValidationStatus.INVALID) {
            return status;
        }
        for (IntegrationEntity child : getAllChildren()) {
            ValidationStatus childStatus = child.getValidationStatus();
            if (childStatus.isMoreSevere(status)) {
                status = childStatus;
                if (status == ValidationStatus.INVALID) {
                    break;
                }
            }
View Full Code Here

        };
    }

    private Icon getIcon() {
        EntityIcons icons = EntityIcons.forType(EntityType.Operation);
        ValidationStatus status = getOperation().getValidationStatus();
        return icons.getIcon(EntityIcons.Category.fromValidationStatus(status), Size.LARGE);
    }
View Full Code Here

    private class TreeRenderer extends IntegrationEntityTreeRenderer {

        @Override
        protected Icon getIcon(IntegrationEntityTreeNode node) {
            IntegrationEntity entity = node.getUserObject();
            ValidationStatus status = model.getStatus(entity, true);
            Category category = Category.fromValidationStatus(status);
            return EntityIcons.forType(entity.getEntityType()).getIcon(category, Size.SMALL);
        }
View Full Code Here

                                                   int column) {
        super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        setFont(TextStyles.DefaultListText.getFont());
        if (value instanceof IntegrationEntity) {
            IntegrationEntity entity = (IntegrationEntity) value;
            ValidationStatus v = validationDecorating ? entity.getValidationStatus() : ValidationStatus.VALID;
            RendererUtils.decorateRenderer(this, entity, v, longMode);
        } else {
            setIcon(null);
            setToolTipText(null);
        }
View Full Code Here

            @Override
            public void handle(IntegrationEntity entity) {
                results.put(entity, validateSingleItem(entity));
            }
        });
        ValidationStatus result;
        synchronized (lock) {
            this.results = results;
            this.compoundStatuses = Maps.newHashMap();
            result = getStatus(project.getProject(), true);
        }
View Full Code Here

    @Override
    public ValidationStatus validateItem(IntegrationEntity entity) {
        Validator validator = new Validator(entity);
        Map<IntegrationEntity, ValidationResult> validated = validator.run();
        ValidationStatus result;
        synchronized (lock) {
            for (Map.Entry<IntegrationEntity, ValidationResult> e : validated.entrySet()) {
                results.put(e.getKey(), e.getValue());
            }
            // We could be smarter about what compound statii to remove from the cache, but
View Full Code Here

    @Override
    public ValidationStatus getStatus(IntegrationEntity entity, boolean includeDependencies) {
        synchronized (lock) {
            if (includeDependencies) {
                ValidationStatus status = compoundStatuses.get(entity);
                if (status == null) {
                    status = new CompoundStateBuilder(entity).getStatus();
                    compoundStatuses.put(entity, status);
                }
                return status;
View Full Code Here

            }
            return impl.getResult();
        }
       
        public ValidationStatus getStatus() {
            ValidationStatus status = ValidationStatus.VALID;
            // TODO: This can be done more efficiently by not building the complete list
            // in collectEntities(), but rather iterating over the items so that we can stop
            // as soon as we encounter an invalid item.
            for (IntegrationEntity e : collectEntities()) {
                ValidationStatus s = DefaultValidationModel.this.getStatus(e, false);
                if (s == ValidationStatus.INVALID) {
                    return s;
                } else if (s == ValidationStatus.WARNING) {
                    status = s;
                }
View Full Code Here

            return;
        }
        if (rootFolder == null) {
            return;
        }
        ValidationStatus status = ValidationStatus.VALID;
        if (model != null && isIndicatingValidationStatus()) {
            status = model.getStatus(rootFolder, true);
        }
        label.setValidationStatus(status);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.validation.ValidationStatus

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.