Examples of DomainModel


Examples of org.dmlite.model.DomainModel

   * @param modelCode
   *            model code
   */
  public ModelContext(String modelCode) {
    super();
    domainModel = new DomainModel(modelCode,
        getDmLiteModelConfigFilePath(),
        getReusableModelConfigFilePath(),
        getSpecificModelConfigFilePath());
  }
View Full Code Here

Examples of org.jboss.as.model.DomainModel

        protected final DomainModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(Marshalling.createByteInput(input));
            expectHeader(unmarshaller, DomainControllerProtocol.PARAM_DOMAIN_MODEL);
            log.infof("Registered with remote domain controller");
            final DomainModel domainModel = unmarshal(unmarshaller, DomainModel.class);
            unmarshaller.finish();
            return domainModel;
        }
View Full Code Here

Examples of org.jboss.as.model.DomainModel

        @Override
        protected final void readRequest(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, ServerManagerProtocol.PARAM_DOMAIN_MODEL);
            final DomainModel domainModel = unmarshal(unmarshaller, DomainModel.class);
            serverManager.setDomain(domainModel);
            unmarshaller.finish();
            log.info("Received domain update.");
        }
View Full Code Here

Examples of org.jboss.as.model.DomainModel

            return Collections.unmodifiableMap(servers);
        }
    }

    private void synchronizeDeployments() {
        DomainModel domainConfig = getDomainModel();
        Set<String> serverGroupNames = domainConfig.getServerGroupNames();
        for (ServerElement server : getHostModel().getServers()) {
            String serverGroupName = server.getServerGroup();
            if (serverGroupNames.remove(serverGroupName)) {
                for (ServerGroupDeploymentElement deployment : domainConfig.getServerGroup(serverGroupName).getDeployments()) {
                    // Force a sync
                    remoteBackedRepository.getDeploymentFiles(deployment.getSha1Hash());
                }
            }
        }
View Full Code Here

Examples of org.jboss.as.model.DomainModel

    public void start(StartContext context) throws StartException {
        // Register with the domain controller
        final DomainControllerConnection domainControllerConnection = this.domainControllerConnection.getValue();
        serverManager.setDomainControllerConnection(domainControllerConnection);
        final DomainModel domainModel = domainControllerConnection.register();
        serverManager.setDomain(domainModel);

        // Start the servers
        final NetworkInterfaceBinding interfaceBinding = managementInterface.getValue();
        final InetSocketAddress managementSocketAddress = new InetSocketAddress(interfaceBinding.getAddress(), managementPort.getValue());
View Full Code Here

Examples of org.jboss.as.model.DomainModel

    private DomainModel parseDomain(final XMLMapper mapper) {
        try {
            InputStream reader = configPersister.getConfigurationInputStream();
            final List<AbstractDomainModelUpdate<?>> domainUpdates = new ArrayList<AbstractDomainModelUpdate<?>>();
            mapper.parseDocument(domainUpdates, XMLInputFactory.newInstance().createXMLStreamReader(new BufferedInputStream(reader)));
            final DomainModel domainModel = new DomainModel();
            for(final AbstractDomainModelUpdate<?> update : domainUpdates) {
                domainModel.update(update);
            }
            return domainModel;
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.as.model.DomainModel

        @Override
        protected final DomainModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_DOMAIN_MODEL);
            final DomainModel domainModel = unmarshal(unmarshaller, DomainModel.class);
            unmarshaller.finish();
            return domainModel;
        }
View Full Code Here

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

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

    /**
     * {@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

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

    }

    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
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.