Package com.proofpoint.configuration.ConfigurationMetadata

Examples of com.proofpoint.configuration.ConfigurationMetadata.AttributeMetadata


                }
            }
        }

        for (ConstraintViolation<?> violation : VALIDATOR.validate(instance)) {
            AttributeMetadata attributeMetadata = configurationMetadata.getAttributes()
                    .get(LOWER_CAMEL.to(UPPER_CAMEL, violation.getPropertyPath().toString()));
            if (attributeMetadata != null) {
                problems.addError("Constraint violation for property '%s': %s (for class %s)",
                        prefix + attributeMetadata.getInjectionPoint().getProperty(), violation.getMessage(), configClass.getName());
            }
            else {
                problems.addError("Constraint violation with property prefix '%s': %s %s (for class %s)",
                        prefix, violation.getPropertyPath(), violation.getMessage(), configClass.getName());
            }
View Full Code Here


        }

        assertEquals(metadata.getAttributes().size(), attributeProperties.keySet().size());

        for (String name : attributeProperties.keySet()) {
            AttributeMetadata attribute = metadata.getAttributes().get(name);
            assertEquals(attribute.getConfigClass(), configClass);
            Set<String> namesToTest = Sets.newHashSet();
            namesToTest.add(attribute.getInjectionPoint().getProperty());
            for (ConfigurationMetadata.InjectionPointMetaData legacyInjectionPoint : attribute.getLegacyInjectionPoints()) {
                namesToTest.add(legacyInjectionPoint.getProperty());
            }
            assertEquals(namesToTest, attributeProperties.get(name));
            assertEquals(attribute.getDescription(), description);
            assertEquals(attribute.isSecuritySensitive(), securitySensitive);
        }
    }
View Full Code Here

TOP

Related Classes of com.proofpoint.configuration.ConfigurationMetadata.AttributeMetadata

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.