Examples of PolicyReferenceResolver


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

                final String labelText = getCharData();
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("XForms control|item label: " + labelText);
                }

                PolicyReferenceResolver resolver =
                        pageContext.getPolicyReferenceResolver();

                TextAssetReference caption =
                        resolver.resolveQuotedTextExpression(labelText);
                attributes.setCaption(caption);

                // The caption container instance will have been set to the
                // current container as part of initialising the attributes.
                final ContainerInstance captionContainer =
View Full Code Here

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

        pattributes = new com.volantis.mcs.protocols.XFSelectAttributes();

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

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Process the errmsg as a mariner expression.
        object = resolver.resolveQuotedTextExpression(attributes.getErrmsg());
        pattributes.setErrmsg(object);

        // Set the initial value attribute.
        pattributes.setInitial(attributes.getInitial());
View Full Code Here

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

                }
            } else {
                shortcut = accessKey;
            }

            PolicyReferenceResolver resolver =
                    pageContext.getPolicyReferenceResolver();

            // Process the shortcut
            TextAssetReference shortcutObj =
                    resolver.resolveQuotedTextExpression(shortcut);
            builder.setShortcut(shortcutObj);

            //Process the href as a mariner expression
            LinkAssetReference href = resolver.resolveQuotedLinkExpression(
                    attributes.getHref(), PageURLType.MENU_ITEM);
            builder.setHref(href);

            // Process the prompt as a mariner expression
            TextAssetReference prompt = resolver.resolveQuotedTextExpression(
                    attributes.getPrompt());
            builder.setPrompt(prompt);

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

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

            MarinerPageContext context, String imageExpression) {

        // 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

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

     * @return A component reference based on the values provided.
     */
    private static RolloverComponentReference createRolloverComponentReference(
            MarinerPageContext context, String rolloverExpression) {

        PolicyReferenceResolver resolver =
                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(),
                reference);
View Full Code Here

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

     * @throws RepositoryException If the device layout does not exist
     */
    public RuntimeDeviceLayout getDeviceLayout(String name)
        throws RepositoryException {

        PolicyReferenceResolver resolver = getPolicyReferenceResolver();

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

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

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

    }

    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

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

        XFOptionGroupAttributes xfoga =
                (XFOptionGroupAttributes) papiAttributes;
        optiongroup = new SelectOptionGroup();
        TextAssetReference object;

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Process the caption as a mariner expression.
        object = resolver.resolveQuotedTextExpression(xfoga.getCaption());
        optiongroup.setCaption(object);

        // Process the prompt as a mariner expression.
        object = resolver.resolveQuotedTextExpression(xfoga.getPrompt());
        optiongroup.setPrompt(object);

        Object enclosing = pageContext.getCurrentElement();

        optiongroup.setStyles(pageContext.getStylingEngine().getStyles());
View Full Code Here

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

        // Only get the EventAttributes if we need to.
        if (pattributes == null) {
            pattributes = attributes.getEventAttributes(true);
        }

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Resolve the value event string to a mariner expression
        ScriptAssetReference expression =
                resolver.resolveQuotedScriptExpression(value);
        pattributes.setEvent(eventConstant, expression);
        return pattributes;
    }
View Full Code Here

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

                = ContextInternals.getMarinerPageContext(context);

        String audioComponentName = attributes.getSrc();

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

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

            AssetResolver assetResolver = pageContext.getAssetResolver();

            // Only supports AMR encoding at the moment.
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.