Package com.dtolabs.rundeck.core.plugins.configuration

Examples of com.dtolabs.rundeck.core.plugins.configuration.Description


        if (useCache) {
            ResourceModelSourceFactory provider = nodesSourceService.providerOfType(type);
            String name=ident;
            if(provider instanceof Describable){
                Describable desc=(Describable) provider;
                Description description = desc.getDescription();
                name = ident + " (" + description.getTitle() + ")";
            }
            return createCachingSource(sourceForConfiguration, ident,name);
        } else {
            return sourceForConfiguration;
        }
View Full Code Here


                                                                                                  instanceConfiguration,
                                                                                                  ServiceNameConstants.RemoteScriptNodeStep,
                                                                                                  providerName
        );
        final PluginStepContextImpl pluginContext = PluginStepContextImpl.from(context);
        Description description = getDescription();
        final Map<String, Object> config = PluginAdapterUtility.configureProperties(resolver, description, plugin, PropertyScope.InstanceOnly);

        final GeneratedScript script;
        try {
            script = plugin.generateScript(pluginContext, config, node);
View Full Code Here

            executionContext.getFrameworkProject(),
            executionContext.getDataContext());
        //add node context data
        localDataContext.put("node", DataContextUtils.nodeData(node));

        Description pluginDesc = getDescription();
        //load config.* property values in from project or framework scope
        final Map<String, Map<String, String>> finalDataContext;
        try {
            finalDataContext = loadConfigData(executionContext, loadInstanceDataFromNodeAttributes(node, pluginDesc), localDataContext, pluginDesc);
        } catch (ConfigurationException e) {
View Full Code Here

            assertEquals("name is not set", e.getMessage());
        }
    }

    public void testBasic() {
        Description build = DescriptionBuilder.builder()
            .name("test1")
            .description("desc1")
            .title("title1")
            .build();
View Full Code Here

        assertDescriptionBasic(build, "test1", "title1", "desc1");
    }

    public void testPropertiesNull() {

        Description build = DescriptionBuilder.builder()
            .name("test1")
            .description("desc1")
            .title("title1")
            .build();
        assertProperties(build, 0, null);
View Full Code Here

        }
    }

    public void testPropertyBuilderFactoryTypes() {

        Description build = DescriptionBuilder.builder()
            .name("test1")
            .description("desc1")
            .title("title1")
            .booleanProperty("ptest1", "false", false, "title1", "desc1")
            .integerProperty("ptest2", "false", false, "title1", "desc1")
View Full Code Here

    }

    public void testPropertyWithPropertyBuilder() {

        DescriptionBuilder builder = DescriptionBuilder.builder();
        Description build = builder
            .name("test1")
            .description("desc1")
            .title("title1")
            .property(
                builder.property("ptest1").type(Property.Type.String)
View Full Code Here

    }

    public void testPropertyWithProperty() {

        DescriptionBuilder builder = DescriptionBuilder.builder();
        Description build = builder
            .name("test1")
            .description("desc1")
            .title("title1")
            .property(
                builder.property("ptest1").type(Property.Type.String)
View Full Code Here

                    .title("ptitle1")
                    .description("pdesc1")
                    .build()
            );

        Description build1 = builder.build();
        assertProperties(build1, 1, Arrays.asList("ptest1"));
        Property p1 = build1.getProperties().get(0);
        assertEquals("ptest1", p1.getName());
        assertEquals("ptitle1", p1.getTitle());
        assertEquals("pdesc1", p1.getDescription());
        assertEquals(null, p1.getDefaultValue());
        assertEquals(Property.Type.String, p1.getType());

        //replace ptest1 with another type
        builder.property(
            builder
                .property("ptest1")//get the property builder for existing property
                .type(Property.Type.Boolean) //set new type
                .description("pdesc2") //set new desc
                .defaultValue("pdef2") //set new default
        );
        Description build = builder.build();
        assertProperties(build, 1, Arrays.asList("ptest1"));
        Property p = build.getProperties().get(0);
        assertEquals("ptest1", p.getName());
        assertEquals("ptitle1", p.getTitle());
        assertEquals("pdesc2", p.getDescription());
        assertEquals("pdef2", p.getDefaultValue());
        assertEquals(Property.Type.Boolean, p.getType());
View Full Code Here

        }
        final String title1 = null != title ? title : name;
        final List<Property> properties1 = Collections.unmodifiableList(properties);
        final Map<String, String> mapping1 = Collections.unmodifiableMap(mapping);
        final Map<String, String> mapping2 = Collections.unmodifiableMap(fwkmapping);
        return new Description() {
            @Override
            public String getName() {
                return name;
            }
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.plugins.configuration.Description

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.