Package org.switchyard.config.model.domain

Examples of org.switchyard.config.model.domain.DomainModel


        Assert.assertEquals("msgC", smooks_transform.getFrom().getLocalPart());
        Assert.assertEquals("msgD", smooks_transform.getTo().getLocalPart());
        SmooksConfigModel smooks_config = smooks_transform.getConfig();
        Assert.assertEquals("stuff", smooks_config.getData());
        // Verify domain configuration
        DomainModel domain = switchyard.getDomain();
        Assert.assertEquals("TestDomain", domain.getName());
        // Verify property configuration
        PropertiesModel props = domain.getProperties();
        Assert.assertEquals(8, props.getProperties().size());
        Assert.assertEquals("bar", props.getPropertyValue("foo"));
        Assert.assertEquals("fish", props.getPropertyValue("tuna"));
        Assert.assertEquals(System.getProperty("user.name"), props.getPropertyValue("userName"));
        Assert.assertEquals(System.getProperty("os.name"), props.getPropertyValue("osName"));
        Assert.assertEquals("iam", props.getPropertyValue("whoIsWill"));
        Assert.assertEquals("stuff", props.getPropertyValue("smooksConfig"));
        Assert.assertEquals("MyWebService", props.getPropertyValue("soapServiceName"));
        Assert.assertEquals("service", props.getPropertyValue("soapWsdlName"));
        Assert.assertEquals(switchyard, domain.getSwitchYard());
        // Verify artifact configuration
        ArtifactsModel artifacts = switchyard.getArtifacts();
        Assert.assertEquals(1, artifacts.getArtifacts().size());
        ArtifactModel artifact = artifacts.getArtifact("OrderService");
        Assert.assertNotNull("ArtifactModel for OrderService was not read!", artifact);
        Assert.assertEquals("OrderService", artifact.getName());
        Assert.assertEquals("http://localhost:8080/guvnorsoa/rest/packages/OrderService", artifact.getURL());
        // Verify security configuration
        SecuritiesModel securities = domain.getSecurities();
        Assert.assertEquals(domain, securities.getDomain());
        SecurityModel security = securities.getSecurities().iterator().next();
        Assert.assertEquals(securities, security.getSecurities());
        Assert.assertEquals(Object.class, security.getCallbackHandler(getClass().getClassLoader()));
        Assert.assertEquals("theSecurityName", security.getName());
View Full Code Here


    /**
     * {@inheritDoc}
     */
    @Override
    public void setDomainPropertyResolver() {
        DomainModel domain = getDomain();
        if (domain != null) {
            PropertiesModel properties = domain.getProperties();
            if (properties != null) {
                Configuration config = getModelConfiguration();
                config.setPropertyResolver(CompoundPropertyResolver.compact(config.getPropertyResolver(), properties));
            }
        }
View Full Code Here

    }

    protected ServiceDomainSecurity getServiceDomainSecurity(SwitchYardModel switchyard) {
        Map<String, ServiceSecurity> serviceSecurities = new HashMap<String, ServiceSecurity>();
        if (switchyard != null) {
            DomainModel domain = switchyard.getDomain();
            if (domain != null) {
                SecuritiesModel securities = domain.getSecurities();
                if (securities != null) {
                    for (SecurityModel security : securities.getSecurities()) {
                        if (security != null) {
                            PropertiesModel properties = security.getProperties();
                            ServiceSecurity value = new DefaultServiceSecurity()
View Full Code Here

        return new DefaultServiceDomainSecurity(serviceSecurities, _systemSecurity);
    }
   
    protected Map<String, String> getDomainProperties(SwitchYardModel config) {
        if (config != null) {
            DomainModel domain = config.getDomain();
            if (domain != null) {
                PropertiesModel properties = domain.getProperties();
                if (properties != null) {
                    return properties.toMap();
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.domain.DomainModel

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.