Package org.jitterbit.integration.data.validation

Examples of org.jitterbit.integration.data.validation.ValidationResult.allMessages()


            if (obj == this) {
                return true;
            }
            if (obj instanceof ValidationResult) {
                ValidationResult that = (ValidationResult) obj;
                return Sets.newHashSet(allMessages()).equals(Sets.newHashSet(that.allMessages()));
            }
            return false;
        }

        @Override
View Full Code Here


            return "This " + EntityType.Operation.toString() + " is valid.";
        } else {
            StringBuilder s = new StringBuilder("<html>");
            s.append("<b>Validation Problems:</b><br>");
            HtmlListGenerator list = HtmlListGenerator.unordered();
            for (ValidationMessage m : v.allMessages()) {
                list.newItem().escapeAndAdd(m.message());
            }
            return s.append(list.toHtml()).append("</html>").toString();
        }
    }
View Full Code Here

public final class LocationValidationTestUtils {

    public static void ensureOneFatalMessage(ValidationMessageCollectorImpl collector, ValidationIssue expected) {
        ValidationResult result = collector.result();
        assertSame(ValidationStatus.INVALID, result.status());
        ValidationMessage[] messages = result.allMessages();
        assertEquals(1, messages.length);
        ValidationMessage message = messages[0];
        assertTrue(StringUtils.isNotEmpty(message.message()));
        assertEquals(expected.getMessage(), message.message());
    }
View Full Code Here

                ValidationResult state = result.getValidationResult(entity);
                if (state.status() != ValidationStatus.VALID) {
                    IntegrationEntityListDecorator entityItem = new IntegrationEntityListDecorator(entity);
                    entityItem.setIndicateValidationStatus(true);
                    model.addElement(entityItem);
                    for (ValidationMessage msg : state.allMessages()) {
                        model.addElement(new ProblemItem(msg));
                    }
                }
            }
            problemList.setModel(model);
View Full Code Here

        } else {
            for (IntegrationEntity entity : result.getValidatedEntities()) {
                ValidationResult r = result.getValidationResult(entity);
                if (!r.isEmpty()) {
                    model.addElement(entity);
                    for (ValidationMessage msg : r.allMessages()) {
                        model.addElement(ListItem.fromMessage(msg));
                    }
                }
            }
            model.addElement(ListItem.empty());
View Full Code Here

                               DefaultKongaTreeNode parent) {
        ValidationResult r = result.getValidationResult(entity);
        if (!r.isEmpty()) {
            EntityNodeObject o = new EntityNodeObject(entity, r.status());
            DefaultKongaTreeNode node = new DefaultKongaTreeNode(parent, o, true);
            for (ValidationMessage msg : r.allMessages()) {
                addValidationMessage(msg, node);
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.