Package com.volantis.mcs.runtime.policies

Examples of com.volantis.mcs.runtime.policies.RuntimePolicyReference


                    + " on device " + pageContext.getDeviceName());
        }

        String imageURL = null;
        AssetResolver resolver = pageContext.getAssetResolver();
        RuntimePolicyReference fallback = (RuntimePolicyReference)
                policy.getAlternatePolicy(PolicyType.IMAGE);
        if (fallback != null) {
            imageURL = resolver.retrieveVariantURLAsString(fallback, null);
        }
View Full Code Here


    // Javadoc inherited.
    public void visit(StyleComponentURI value, Object object) {

        try {
            RuntimePolicyReference reference =
                    referenceResolver.resolvePolicyExpression(
                            value.getExpression());

            String url = assetResolver.retrieveVariantURLAsString(reference,
                    null);
View Full Code Here

                pattributes);
        try {
            if (imageComponentName != null) {

                // Resolve the expression to a reference.
                RuntimePolicyReference reference =
                        resolver.resolveUnquotedPolicyExpression(
                                imageComponentName, PolicyType.IMAGE);

                AssetResolver assetResolver = pageContext.getAssetResolver();
View Full Code Here

        // Create the reference for the image by resolving the expression.
        // Note that this must be done up front to because we don't want
        // expressions being evaluated out of order.
        PolicyReferenceResolver resolver =
                context.getPolicyReferenceResolver();
        RuntimePolicyReference reference =
                resolver.resolveUnquotedPolicyExpression(imageExpression,
                        PolicyType.IMAGE);
        return new DefaultComponentImageAssetReference(reference,
                context.getAssetResolver());
    }
View Full Code Here

                context.getPolicyReferenceResolver();

        // Create the identity for the rollover by resolving the expression.
        // Note that this must be done up front to because we don't want
        // expressions being evaluated out of order.
        RuntimePolicyReference reference =
                resolver.resolveUnquotedPolicyExpression(rolloverExpression,
                        PolicyType.ROLLOVER_IMAGE);

        return new RolloverComponentReference(
                context.getPolicyFetcher(), context.getAssetResolver(),
View Full Code Here

        final RuntimeProject project = pageContext.getCurrentProject();
        final MarinerURL baseURL = pageContext.getBaseURL();
        final PolicyReferenceFactory factory =
            pageContext.getPolicyReferenceFactory();
        final RuntimePolicyReference reference =
            factory.createLazyNormalizedReference(
                project, baseURL, policyName, PolicyType.SCRIPT);
        final ScriptAssetReference scriptAssetReference =
            new DefaultComponentScriptAssetReference(
                reference, pageContext.getAssetResolver());
View Full Code Here

    public RuntimeDeviceLayout getDeviceLayout(String name)
        throws RepositoryException {

        PolicyReferenceResolver resolver = getPolicyReferenceResolver();

        RuntimePolicyReference reference =
            resolver.resolveUnquotedPolicyExpression(name,
                PolicyType.LAYOUT);

        SelectedVariant selected = assetResolver.selectBestVariant(
            reference, null);
View Full Code Here

    private RuntimeDeviceTheme retrieveBestDeviceTheme(String themeName)
        throws RepositoryException {

        PolicyReferenceResolver resolver = getPolicyReferenceResolver();

        RuntimePolicyReference reference =
            resolver.resolveUnquotedPolicyExpression(themeName,
                PolicyType.THEME);

        SelectedVariant selected = assetResolver.selectBestVariant(
            reference, null);
View Full Code Here

        if (audioComponentName != null) {
            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();

            // Resolve the expression to a reference.
            RuntimePolicyReference reference =
                    resolver.resolveUnquotedPolicyExpression(
                            audioComponentName, PolicyType.AUDIO);

            AssetResolver assetResolver = pageContext.getAssetResolver();
View Full Code Here

    }

    // javadoc inherited
    public void visit(StyleComponentURI value, Object object) {

        RuntimePolicyReference reference =
                policyReferenceResolver.resolvePolicyExpression(
                        value.getExpression());

        string = assetResolver.retrieveVariantURLAsString(reference, null);
        string = assetResolver.rewriteURLWithPageURLRewriter(string, PageURLType.IMAGE);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.policies.RuntimePolicyReference

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.