Package org.apache.jetspeed.xml.api.jcm

Examples of org.apache.jetspeed.xml.api.jcm.Content


        item.setTitle( title );
        item.setLink( link );
        item.setDescription( description );
       

        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();


            //BEGIN reorg of the item list so that the new entry begins at the top
            Vector v = new Vector();
           
            Item[] items = content.getChannel().getItem();
           
            for ( int i = 0; i < items.length; ++i ) {
                v.addElement( items[i] );
            }

            v.insertElementAt( item, 0 );
           
            //now build this into a new array
           
            Item[] newItems = new Item[ v.size() ];
            v.copyInto( newItems );
           
            content.getChannel().removeAllItem();
           
            //now go through all the new items and add those
            for ( int i = 0; i < newItems.length; ++i ) {
                content.getChannel().addItem( newItems[i] );
            }

            //END reorg of the item list so that the new entry begins at the top           
           
            //save the portlet markup after you have made the changes.
View Full Code Here


        String description  = params.getString( "description", "" );
       

        //build a select box for adding topics to.
       
        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();
        } catch ( Exception e ) {
            logger.error("Exception",  e);
            return new StringElement( "Can't use this provider: " + e.getMessage() );
        }
       
        Select select = new Select();
        select.setName( "topic" );

        //entry topics
        Entry[] topics = content.getChannel().getTopics().getEntry();
       
        //populate the select box
        for ( int i = 0; i < topics.length; ++i ) {
            String name = topics[i].getName();
            select.addElement( new Option( name ).addElement( name ) );
View Full Code Here

        item.setTitle( title );
        item.setLink( link );
        item.setDescription( description );
       

        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();


            //BEGIN reorg of the item list so that the new entry begins at the top
            Vector v = new Vector();
           
            Item[] items = content.getChannel().getItem();
           
            for ( int i = 0; i < items.length; ++i ) {
                v.addElement( items[i] );
            }

            v.insertElementAt( item, 0 );
           
            //now build this into a new array
           
            Item[] newItems = new Item[ v.size() ];
            v.copyInto( newItems );
           
            content.getChannel().removeAllItem();
           
            //now go through all the new items and add those
            for ( int i = 0; i < newItems.length; ++i ) {
                content.getChannel().addItem( newItems[i] );
            }

            //END reorg of the item list so that the new entry begins at the top           
           
            //save the portlet markup after you have made the changes.
View Full Code Here

        String description  = params.getString( "description", "" );
       

        //build a select box for adding topics to.
       
        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();
        } catch ( Exception e ) {
            logger.error("Exception",  e);
            return new StringElement( "Can't use this provider: " + e.getMessage() );
        }
       
        Select select = new Select();
        select.setName( "topic" );

        //entry topics
        Entry[] topics = content.getChannel().getTopics().getEntry();
       
        //populate the select box
        for ( int i = 0; i < topics.length; ++i ) {
            String name = topics[i].getName();
            select.addElement( new Option( name ).addElement( name ) );
View Full Code Here

        item.setTitle( title );
        item.setLink( link );
        item.setDescription( description );
       

        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();


            //BEGIN reorg of the item list so that the new entry begins at the top
            Vector v = new Vector();
           
            Item[] items = content.getChannel().getItem();
           
            for ( int i = 0; i < items.length; ++i ) {
                v.addElement( items[i] );
            }

            v.insertElementAt( item, 0 );
           
            //now build this into a new array
           
            Item[] newItems = new Item[ v.size() ];
            v.copyInto( newItems );
           
            content.getChannel().removeAllItem();
           
            //now go through all the new items and add those
            for ( int i = 0; i < newItems.length; ++i ) {
                content.getChannel().addItem( newItems[i] );
            }

            //END reorg of the item list so that the new entry begins at the top           
           
            //save the portlet markup after you have made the changes.
View Full Code Here

        String description  = params.getString( "description", "" );
       

        //build a select box for adding topics to.
       
        Content content = null;
        try {
            content = this.getContentMarkup( this.getURL( provider ) ).getContent();
        } catch ( Exception e ) {
            Log.error( e );
            return new StringElement( "Can't use this provider: " + e.getMessage() );
        }
       
        Select select = new Select();
        select.setName( "topic" );

        //entry topics
        Entry[] topics = content.getChannel().getTopics().getEntry();
       
        //populate the select box
        for ( int i = 0; i < topics.length; ++i ) {
            String name = topics[i].getName();
            select.addElement( new Option( name ).addElement( name ) );
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.xml.api.jcm.Content

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.