Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleComponentURI


            // it instead of the image.
            text = value;
        } else if (value instanceof StyleComponentURI) {
            // The value is a component reference that needs resolving to
            // a URI.
            StyleComponentURI componentURI = (StyleComponentURI) value;
            PolicyReference reference = resolver.evaluateExpression(
                    componentURI.getExpression());
            String string = resolver.resolveText(reference, requiredEncodings);
            if (string != null) {
                text = styleValueFactory.getString(value, string);
            }
        } else {
View Full Code Here


            // Nothing to do.
        } else if (value instanceof StyleURI) {
            // Nothing to do.
            image = value;
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI componentURI = (StyleComponentURI) value;
            PolicyReference reference = resolver.evaluateExpression(
                    componentURI.getExpression());
            String uri = resolver.resolveImage(reference);
            if (uri != null) {
                image = styleValueFactory.getURI(null, uri);
            }
        } else if (value instanceof StyleTranscodableURI) {
View Full Code Here

            // it instead of the image.
            image = value;
        } else if (value instanceof StyleComponentURI) {
            // The value is a component reference that needs resolving to
            // a URI.
            StyleComponentURI componentURI = (StyleComponentURI) value;
            PolicyReference reference = resolver.evaluateExpression(
                    componentURI.getExpression());
            String uri = resolver.resolveVideo(reference);
            if (uri != null) {
                image = styleValueFactory.getURI(componentURI, uri);
            }
        } else if (value instanceof StyleTranscodableURI) {
View Full Code Here

        final ImageAssetReference imageAssetReference;
        if (value instanceof StyleURI) {
            String uri = ((StyleURI) value).getURI();
            imageAssetReference = new LiteralImageAssetReference(uri);
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI styleComponentURI = (StyleComponentURI) value;

            // Resolve the identity against the project associated with the
            // value.
            RuntimePolicyReference reference =
                    resolver.resolvePolicyExpression(
                            styleComponentURI.getExpression());
            imageAssetReference = new DefaultComponentImageAssetReference(
                    reference, assetResolver);
        } else if (value instanceof StyleTranscodableURI) {
            final StyleTranscodableURI transcodableUri =
                (StyleTranscodableURI) value;
View Full Code Here

        if (value instanceof StyleList) {
            return activateStyleList(property, (StyleList) value);
        } else if (value instanceof StylePair) {
            return activateStylePair(property, (StylePair) value);
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI componentURI = (StyleComponentURI) value;
            return activateStyleComponentURI(property, componentURI);
        } else {
            return value;
        }
    }
View Full Code Here

            return spanId;

        } else if (content instanceof StyleComponentURI) {
            // Write image component label
            StyleComponentURI component = (StyleComponentURI) content;

            // Insert the image using protocol inserter
            protocol.getInserter().insertPreservingExistingContent(
                    buffer.getCurrentElement(), content);
            // Set id
View Full Code Here

            property = StylePropertyDetails.MCS_BACKGROUND_DYNAMIC_VISUAL;
        } else {
            property = StylePropertyDetails.BACKGROUND_IMAGE;
        }

        StyleComponentURI value =
                converter.getComponentURI(backgroundComponentName);
        if (value != null) {
            styleProperties.setStyleValue(property, value);
        }
    }
View Full Code Here

            format = null;
        } else if (value instanceof StyleString) {
            StyleString string = (StyleString) value;
            format = string.getString();
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI uri = (StyleComponentURI) value;
            PolicyReference reference = assetResolver.evaluateExpression(
                    uri.getExpression());
            format = assetResolver.resolveText(reference, requiredEncodings);
        } else {
            throw new IllegalStateException(
                    "Unknown " +
                            property.getName() +
View Full Code Here

            reference = null;
        } else if (value instanceof StyleString) {
            StyleString string = (StyleString) value;
            reference = new LiteralTextAssetReference(string.getString());
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI uri = (StyleComponentURI) value;
            reference = new DefaultComponentTextAssetReference(
                    (RuntimePolicyReference) assetResolver.evaluateExpression(
                            uri.getExpression()),
                    getMarinerPageContext().getAssetResolver());
        } else {
            throw new IllegalStateException(
                    "Unknown " +
                            property.getName() +
View Full Code Here

            format = null;
        } else if (value instanceof StyleString) {
            StyleString string = (StyleString) value;
            format = string.getString();
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI uri = (StyleComponentURI) value;
            PolicyReference reference = assetResolver.evaluateExpression(
                    uri.getExpression());
            format = assetResolver.resolveText(reference, REQUIRED_ENCODINGS);
        } else {
            throw new IllegalStateException(
                    "Unknown " +
                            StylePropertyDetails.MCS_INPUT_FORMAT.getName() +
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.StyleComponentURI

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.