Package com.volantis.mcs.dom2theme

Examples of com.volantis.mcs.dom2theme.AssetResolver


            ShorthandSet supportedShorthands) {

        propertyClearerChecker =
                new PropertyClearerCheckerImpl(detailsSet);

        AssetResolver assetResolver = context.getAssetResolver();

        supportedProperties = getSupportedProperties(detailsSet);

        resolvers = new PropertiesNormalizer[]{
            new BackgroundResolver(supportedProperties, assetResolver),
View Full Code Here


        this.styleAttributeName = styleAttributeName;

        StyledDOMThemeExtractorFactory extractorFactory =
                StyledDOMThemeExtractorFactory.getDefaultInstance();

        final AssetResolver assetResolver = new AssetResolver() {

            // javadoc inherited
            public PolicyReference evaluateExpression(PolicyExpression expression) {
                return null;
            }
View Full Code Here

     */
    protected String getTextFromStyleValue(
            Styles styles, final StyleProperty property,
            final EncodingCollection requiredEncodings) {

        AssetResolver assetResolver = getExtractorContext().getAssetResolver();
        StyleValue value = styles.getPropertyValues()
                .getStyleValue(property);

        String format;
        if (value == StyleKeywords.NONE) {
            // No validation.
            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() +
                            " value " + value);
View Full Code Here

     *         null.
     */
    protected TextAssetReference getTextReferenceFromStyleValue(
            Styles styles, final StyleProperty property) {

        AssetResolver assetResolver = getExtractorContext().getAssetResolver();
        StyleValue value = styles.getPropertyValues()
                .getStyleValue(property);

        TextAssetReference reference;
        if (value == StyleKeywords.NONE) {
            // No validation.
            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 " +
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom2theme.AssetResolver

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.