Package com.volantis.mcs.protocols.ticker.attributes

Examples of com.volantis.mcs.protocols.ticker.attributes.ItemsCountAttributes


            return;
        }               

        protocol.writeCloseSpan(spanAttributes);
       
        ItemsCountAttributes itemsCountAttributes = (ItemsCountAttributes) attributes;
       
        // Prepare Javascript content.
        StringWriter scriptWriter = new StringWriter();
       
        // Finally, render the JavaScript part.
        scriptWriter.write("Ticker.createItemsCount({");       
        scriptWriter.write("id:" + createJavaScriptString(spanAttributes.getId()));
               
        if (itemsCountAttributes.getChannel() != null) {
            scriptWriter.write(",channel:" + createJavaScriptString(itemsCountAttributes.getChannel()));           
        }
       
        if (itemsCountAttributes.getRead() != null) {
            scriptWriter.write(",read:" + (itemsCountAttributes.getRead().equals("no") ? "false" : "true"));           
        }
       
        if (itemsCountAttributes.getFollowed() != null) {
            scriptWriter.write(",followed:" + (itemsCountAttributes.getFollowed().equals("no") ? "false" : "true"));           
        }
       
        scriptWriter.write("})");
       
        addUsedFeedPollerId(protocol);
View Full Code Here


     * @param context
     */
    public ItemsCountElement(XDIMEContextInternal context) {
        super(TickerElements.ITEMS_COUNT, context);
       
        protocolAttributes = new ItemsCountAttributes();       
   
View Full Code Here

        return super.callOpenOnProtocol(context, attributes);
    }
   
    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(XDIMEContextInternal context, XDIMEAttributes attributes) throws XDIMEException {
        ItemsCountAttributes itemsCountAttributes = (ItemsCountAttributes) protocolAttributes;
       
        itemsCountAttributes.setChannel(attributes.getValue("", "channel"));
        itemsCountAttributes.setRead(attributes.getValue("", "read"));
        itemsCountAttributes.setFollowed(attributes.getValue("", "followed"));
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.ticker.attributes.ItemsCountAttributes

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.