Package com.volantis.mcs.protocols.assets

Examples of com.volantis.mcs.protocols.assets.TextAssetReference


     * @return true if we managed to write one, false if there was none
     */
    public boolean writeAltText(AltTextAttributes attributes)
        throws ProtocolException {
        // Default to alt text
        TextAssetReference textReference = attributes.getAltText();
        String text = getPlainText(textReference);

        if (text != null) {
            renderAltText(text, attributes);

View Full Code Here


        // by the protocol.
        com.volantis.mcs.protocols.XFBooleanAttributes pattributes
                = new com.volantis.mcs.protocols.XFBooleanAttributes();

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

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Process the errmsg as a mariner expression.
View Full Code Here

    protected void doImage(DOMOutputBuffer dom,
                           ImageAttributes attributes) {

        Styles styles = attributes.getStyles();
        String value;
        TextAssetReference reference = attributes.getAltText();
        String altText = getPlainText(reference);

        if ((value = attributes.getSrc()) != null) {
            Element element = dom.allocateStyledElement("img", styles);
View Full Code Here

        PolicyReferenceResolver resolver =
                pageContext.getPolicyReferenceResolver();

        // Resolve the fullNumber string to a mariner expression
        if ((value = attributes.getFullNumber()) != null) {
            TextAssetReference expression =
                    resolver.resolveQuotedTextExpression(value);
            pattributes.setFullNumber(expression);
        }

        VolantisProtocol protocol = pageContext.getProtocol();
View Full Code Here

                .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) {
            altText = "";
        }

        return altText;
View Full Code Here

        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;
View Full Code Here

    private String getCaption(SelectOption option) {

        String value = option.getValue();
        // Get the caption from the object, if it is null then use the
        // value.
        TextAssetReference reference = option.getCaption();
        String caption = getTextFromReference(reference, TextEncoding.PLAIN);
        if (caption == null) {
            caption = value;
        }
        if (logger.isDebugEnabled()) {
View Full Code Here

                             SpanAttributes attributes)
            throws ProtocolException {

        openPrompt(dom);

        TextAssetReference src = attributes.getSrc();
        if(src!=null) {
            String value = getTextFromReference(src, TextEncoding.VOICE_XML_PROMPT);
            if(value!=null) {
                // We expect the value to be valid voice xml - or more
                // importantly valid xml. In order for the a DOMTransformer
View Full Code Here

            menu.setAttribute("dtmf", "true");
        }
        attributes.setManualDTMF(manualDTMF);

        // Add the prompt markup.
        TextAssetReference object = attributes.getPrompt();
        if (object != null) {
            String prompt =
                    getTextFromReference(object, TextEncoding.VOICE_XML_PROMPT);
            if (prompt != null) {
                Element element = createElementFromString(prompt);
View Full Code Here

        if (resolvedHref != null) {

            Element choice = dom.openStyledElement("choice", item);
            choice.setAttribute("next", resolvedHref);

            TextAssetReference object = null;

            if (attributes.isManualDTMF()) {
                object = item.getShortcut();
                String accessKey = getPlainText(object);
                if (accessKey != null) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.assets.TextAssetReference

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.