Package com.volantis.mcs.runtime.policies

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


    }

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

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

        string = assetResolver.retrieveVariantURLAsString(reference, null);
    }
View Full Code Here


        TabsContext context = getCurrentContext();
        PolicyReferenceResolver referenceResolver = context.getPageContext()
                .getPolicyReferenceResolver();
        AssetResolver assetResolver = context.getPageContext()
                .getAssetResolver();
        RuntimePolicyReference policyReference = referenceResolver
                .resolvePolicyExpression(component.getExpression());

        // Create image asset from the policy and get fallback
        DefaultComponentImageAssetReference imageAsset = new DefaultComponentImageAssetReference(
                policyReference, assetResolver);
        TextAssetReference textAsset = imageAsset.getTextFallback();

        // If e.g policy file is missing and as consequence textAsset == null,
        // throw suitable exception
        if (null == textAsset) {
            throw new ProtocolException(exceptionLocalizer.format(
                    "missing-policy-failure", policyReference.getName()));
        }

        // Return text in plain encoding, or empty string
        String altText = textAsset.getText(TextEncoding.PLAIN);
        if (null == altText) {
View Full Code Here

     * @param relative
     */
    private void setAssetGroupName(
            SubstantiveAsset asset, BaseURLRelative relative) {

        RuntimePolicyReference reference = (RuntimePolicyReference)
                relative.getBaseURLPolicyReference();
        if (reference != null) {
            // Set the project so that references to asset groups can be
            // resolved properly.
            asset.setAssetGroupProject(reference.getProject());
            asset.setAssetGroupName(reference.getName());
        }
    }
View Full Code Here

            try {
                PolicyReferenceResolver resolver =
                        context.getPolicyReferenceResolver();

                RuntimePolicyReference reference =
                        resolver.resolvePolicyExpression(expression);

                AssetResolver assetResolver = context.getAssetResolver();
                ImageAssetReference image =
                        new DefaultComponentImageAssetReference(reference,
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.