Examples of DMRMapping


Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    private void marshallMapping(InteractionUnit unit, ModelNode target)
    {
        if(unit.hasMapping(MappingType.DMR))
        {
            ModelNode mappingNode = new ModelNode();
            DMRMapping mapping = (DMRMapping) unit.getMapping(MappingType.DMR);
            mappingNode.get("type").set("dmr");

            if(mapping.getAddress()!=null)
                mappingNode.get("address").set(mapping.getAddress());

            target.get("mapping").set(mappingNode);
        }
    }
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

                    if (!context.has(MODEL_DESCRIPTIONS))
                    {
                        context.set(MODEL_DESCRIPTIONS, new HashMap<QName, ModelNode>());
                    }

                    DMRMapping mapping = (DMRMapping) visitor.stepReference.get(step).findMapping(DMR);
                    context.<Map>get(MODEL_DESCRIPTIONS).put(mapping.getCorrelationId(), description);
                }
                callback.onSuccess();
            }
        });
    }
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

            InteractionCoordinator coordinator = context.get(ContextKey.COORDINATOR);

            final StatementContext statementContext = coordinator.getDialogState().getContext(interactionUnit.getId());
            assert statementContext != null : "StatementContext not provided";

            DMRMapping mapping = (DMRMapping) interactionUnit.findMapping(DMR, new Predicate<DMRMapping>()
            {
                @Override
                public boolean appliesTo(final DMRMapping candidate)
                {
                    // the read-resource operation only needs the address of a resource
                    // hence we can skip mapping without address declarations (i.e. just attributes)
                    return candidate.getAddress() != null;
                }
            });
            if (mapping != null)
            {
                String address = mapping.getResolvedAddress();
                if (!resolvedAdresses.contains(address))
                {
                    AddressMapping addressMapping = AddressMapping.fromString(address);
                    ModelNode op = addressMapping.asResource(new FilteringStatementContext(
                            statementContext,
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    }

    private void init() {
        unit = dialog.findUnit(getJustification());

        DMRMapping mapping = (DMRMapping) unit.findMapping(MappingType.DMR);
        address = AddressMapping.fromString(mapping.getResolvedAddress());

    }
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

        final ModelNode operationDescription = context.getOperationDescriptions().get(operationRef);

        assert operationDescription!=null : "Operation meta data required for "+output.getId() + " on "+context.getUnit().getId();

        final List<Property> parameterMetaData = operationDescription.get("request-properties").asPropertyList();
        DMRMapping mapping = (DMRMapping) unit.findMapping(MappingType.DMR);
        String address = mapping.getAddress();

        Delegation delegation = null;

        if(parameterMetaData.isEmpty())
        {
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

        {
            this.panel = new VerticalPanel();
            this.table = new ModelNodeCellTable(5);
            this.interactionUnit = interactionUnit;

            DMRMapping DMRMapping = this.interactionUnit.findMapping(MappingType.DMR);

            List<ResourceAttribute> attributes = DMRMapping.getAttributes();
            for (ResourceAttribute attribute : attributes)
            {
                final String attributeKey = attribute.getLabel() != null ? attribute.getLabel() : attribute.getName();
                // TODO: How doe we resolve the column names?
                // See "entity.key" usage as well
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

        FormAdapter(final InteractionUnit<StereoTypes> interactionUnit, EventBus coordinator, final ModelNode modelDescription)
        {
            this.interactionUnit = interactionUnit;
            this.coordinator = coordinator;

            DMRMapping dmrMapping = (DMRMapping)
                    this.interactionUnit.findMapping(MappingType.DMR);

            this.form = new ModelNodeForm(dmrMapping.getAddress(), securityContext);
            this.form.setNumColumns(2);
            this.form.setEnabled(false);

            assert modelDescription.hasDefined("attributes") : "Invalid model description. Expected child 'attributes'";

            List<Property> attributeDescriptions = modelDescription.get("attributes").asPropertyList();


            List<ResourceAttribute> attributes = dmrMapping.getAttributes();

            // catch-all directive, if no explicit attributes given
            // TODO: optimisation, see below
            if(attributes.isEmpty())
            {
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    }

    private void init() {
        unit = dialog.findUnit(getJustification());

        DMRMapping mapping = (DMRMapping) unit.findMapping(MappingType.DMR);
        address = AddressMapping.fromString(mapping.getResolvedAddress());

        // check preconditions of the address token
        final Map<String, Integer> requiredStatements = address.getRequiredStatements();

        // any value expression key becomes a precondition matched against the statement context
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

            assert modelDescription.hasDefined("attributes") : "Invalid model description. Expected child 'attributes'";

            List<Property> attributeDescriptions = modelDescription.get("attributes").asPropertyList();

            DMRMapping DMRMapping = (DMRMapping)
                    this.interactionUnit.findMapping(MappingType.DMR);

            List<ResourceAttribute> attributes = DMRMapping.getAttributes();

            // catch-all directive, if no explicit attributes given
            // TODO: optimisation, see below
            if(attributes.isEmpty())
            {
View Full Code Here

Examples of org.jboss.as.console.mbui.model.mapping.DMRMapping

    }

    private void init() {
        unit = dialog.findUnit(getJustification());

        DMRMapping mapping = (DMRMapping) unit.findMapping(MappingType.DMR);
        address = AddressMapping.fromString(mapping.getResolvedAddress());

        // check preconditions of the address token
        final Set<String> requiredStatements = address.getRequiredStatements();

        // any value expression key becomes a precondition matched against the statement context
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.