Examples of PolicyReferenceResolver


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

        // If "none" or other is specified, SKIP this entirely irrespective
        // of any other settings.
               return SKIP_ELEMENT_BODY;
        }

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Parse the source expression.
        ScriptAssetReference src
                = resolver.resolveQuotedScriptExpression(attributes.getSrc());

        // Set the attributes used in both modes.
        String id = attributes.getId();
        pattributes.setId(id);
        pattributes.setDefer(attributes.getDefer());
View Full Code Here

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

                (AbstractAnchorAttributes) blockAttributes;

        // Handle the common base attributes
        transferAttributes(context, attributes, pattributes);

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Resolve the href string to a mariner expression
        if ((value = attributes.getHref()) != null) {
            expression = resolver.resolveQuotedLinkExpression(value,
                    PageURLType.ANCHOR);
            pattributes.setHref(expression);
        }

        // Deal with the name attribute.
View Full Code Here

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

    private static void doEvent(MenuModelBuilder builder,
                                MarinerPageContext pageContext,
                                String value, EventType type)
                                                    throws BuilderException {

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();
        ScriptAssetReference handler =
                resolver.resolveQuotedScriptExpression(value);
        builder.setEventHandler(type, handler);
    }
View Full Code Here

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

            MenuInternals.setElementDetails(builder, attributes, styles);

            // Set the event handling
            MenuInternals.setEvents(builder, attributes, pageContext);

            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();

            // Set the prompt
            builder.setPrompt(resolver.resolveQuotedTextExpression(
                    attributes.getPrompt()));

            // Set the error message
            builder.setErrorMessage(resolver.resolveQuotedTextExpression(
                    attributes.getErrmsg()));

            // Set the help
            builder.setHelp(resolver.resolveQuotedTextExpression(
                    attributes.getHelp()));

            // Set the title
            builder.setTitle(attributes.getTitle());
View Full Code Here

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

            // Initialise the attributes specific to this field.
            TextAssetReference object;
            String value;

            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();

            // Set the initial value attribute.
            object = resolver.resolveQuotedTextExpression(
                    attributes.getInitial());
            pattributes.setInitial(object);

            // Set the max length attribute.
            value = attributes.getMaxLength();
View Full Code Here

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

        // set then it defaults to the caption.
        String value = attributes.getValue();
        if (value == null) {
            // This code should be removed when we stop defaulting to the caption
            // value.
            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();
            TextAssetReference object
                    = resolver.resolveQuotedTextExpression(
                    attributes.getCaption());
            String caption = getPlainText(object);
            if (caption != null) {
                value = caption;
            }
View Full Code Here

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

        // set then it defaults to the caption.
        String value = attributes.getValue();
        if (value == null) {
            // This code should be removed when we stop defaulting to the caption
            // value.
            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();
            TextAssetReference object
                    = resolver.resolveQuotedTextExpression(
                    attributes.getCaption());
            String caption = getPlainText(object);
            if (caption != null) {
                value = caption;
            }
View Full Code Here

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

            variantType = variant.getVariantType();
        }

        // for MTXT resource
        if (variantType == VariantType.TEXT) {
            PolicyReferenceResolver resolver = pageContext
                    .getPolicyReferenceResolver();
            TextAssetReference textReference = resolver
                    .resolveUnquotedTextExpression(src);

            final String text = textReference.getText(TextEncoding.PLAIN);
            if (text != null) {
                // We have found the text, so let's try and write it out to
View Full Code Here

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

     * @param src uri to the device independent resource
     * @return best variant from MCS policy
     */
    private SelectedVariant selectVariant(String src) {

        PolicyReferenceResolver resolver = pageContext
                .getPolicyReferenceResolver();
        RuntimePolicyReference reference = null;

        reference = resolver.resolveUnquotedPolicyExpression(src, null);
        return pageContext.getAssetResolver()
                .selectBestVariant(reference, null);
    }
View Full Code Here

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

                }
            }
        }

        // Extract project to resolve policy expressions against.
        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        TextAssetReference textReference =
                resolver.resolveQuotedTextExpression(linkText);

        // Retrive the text from asset and set the
        // linkText if textReference is a text asset.
        if (textReference != null) {
            linkText = textReference.getText(TextEncoding.PLAIN);
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.