Package com.consol.citrus.model.config.core

Examples of com.consol.citrus.model.config.core.ObjectFactory


    /**
     * Gets the default function library from Citrus Spring bean configuration.
     * @return
     */
    public FunctionLibrary getDefaultFunctionLibrary() {
        FunctionLibrary library = new ObjectFactory().createFunctionLibrary();

        FunctionConfig config = new FunctionConfig();
        com.consol.citrus.functions.FunctionLibrary defaultFunctionLibrary = config.getFunctionaLibrary();
        library.setId(defaultFunctionLibrary.getName());
        library.setPrefix(defaultFunctionLibrary.getPrefix());
View Full Code Here


*/
public class NamespaceContextSpringBeanConverter implements SpringBeanConverter<NamespaceContext> {

    @Override
    public NamespaceContext convert(SpringBean springBean) {
        NamespaceContext context = new ObjectFactory().createNamespaceContext();

        for (Property property : springBean.getProperties()) {
            if (property.getName().equals("namespaceMappings")) {
                for (Entry entry : property.getMap().getEntries()) {
                    NamespaceContext.Namespace namespace = new NamespaceContext.Namespace();
View Full Code Here

*/
public class ValidationMatcherSpringBeanConverter implements SpringBeanConverter<ValidationMatcherLibrary> {

    @Override
    public ValidationMatcherLibrary convert(SpringBean springBean) {
        ValidationMatcherLibrary library = new ObjectFactory().createValidationMatcherLibrary();

        for (Property property : springBean.getProperties()) {
            if (property.getName().equals("members")) {
                for (Entry entry : property.getMap().getEntries()) {
                    ValidationMatcherLibrary.Matcher matcher = new ValidationMatcherLibrary.Matcher();
View Full Code Here

*/
public class SchemaSpringBeanConverter implements SpringBeanConverter<Schema> {

    @Override
    public Schema convert(SpringBean springBean) {
        Schema schema = new ObjectFactory().createSchema();

        for (Property property : springBean.getProperties()) {
            if (property.getName().equals("xsd")) {
                schema.setLocation(property.getValue());
            }
View Full Code Here

*/
public class GlobalVariablesSpringBeanConverter implements SpringBeanConverter<GlobalVariables> {

    @Override
    public GlobalVariables convert(SpringBean springBean) {
        GlobalVariables variables = new ObjectFactory().createGlobalVariables();

        for (Property property : springBean.getProperties()) {
            if (property.getName().equals("variables")) {
                for (Entry entry : property.getMap().getEntries()) {
                    GlobalVariables.Variable variable = new GlobalVariables.Variable();
View Full Code Here

*/
public class FunctionLibrarySpringBeanConverter implements SpringBeanConverter<FunctionLibrary> {

    @Override
    public FunctionLibrary convert(SpringBean springBean) {
        FunctionLibrary library = new ObjectFactory().createFunctionLibrary();

        for (Property property : springBean.getProperties()) {
            if (property.getName().equals("members")) {
                for (Entry entry : property.getMap().getEntries()) {
                    FunctionLibrary.Function function = new FunctionLibrary.Function();
View Full Code Here

*/
public class SchemaRepositorySpringBeanConverter implements SpringBeanConverter<SchemaRepository> {

    @Override
    public SchemaRepository convert(SpringBean springBean) {
        SchemaRepository repository = new ObjectFactory().createSchemaRepository();
        repository.setId(springBean.getId());
        repository.setSchemas(new SchemaRepository.Schemas());

        for (Property property : springBean.getProperties()) {
            if (property.getName().equals("schemas")) {
View Full Code Here

    @Override
    public DataDictionaryType convert(SpringBean springBean) {
        DataDictionaryType library;

        if (springBean.getClazz().equals(XpathMappingDataDictionary.class.getName())) {
            library = new ObjectFactory().createXpathDataDictionary();
        } else if (springBean.getClazz().equals(NodeMappingDataDictionary.class.getName())) {
            library = new ObjectFactory().createXmlDataDictionary();
        } else if (springBean.getClazz().equals(JsonMappingDataDictionary.class.getName())) {
            library = new ObjectFactory().createJsonDataDictionary();
        } else {
            throw new CitrusAdminRuntimeException(String.format("Failed to convert Spring bean of type '%s' to data dictionary model object", springBean.getClazz()));
        }

        for (Property property : springBean.getProperties()) {
View Full Code Here

    /**
     * Gets the default validation matcher library from Citrus Spring bean configuration.
     * @return
     */
    public ValidationMatcherLibrary getDefaultValidationMatcherLibrary() {
        ValidationMatcherLibrary library = new ObjectFactory().createValidationMatcherLibrary();

        ValidationMatcherConfig config = new ValidationMatcherConfig();
        com.consol.citrus.validation.matcher.ValidationMatcherLibrary defaultValidationMatcher = config.getValidationMatcherLibrary();
        library.setId(defaultValidationMatcher.getName());
        library.setPrefix(defaultValidationMatcher.getPrefix());
View Full Code Here

TOP

Related Classes of com.consol.citrus.model.config.core.ObjectFactory

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.