Package org.apache.jetspeed.om.profile

Examples of org.apache.jetspeed.om.profile.MetaInfo


    @return the new MetaData object, empty if meta is null
    */
    protected static MetaData getMetaData(Entry entry)
    {
        MetaData data = new MetaData();
        MetaInfo meta = entry.getMetaInfo();

        if ( meta != null )
        {
            if ( meta.getTitle() != null )
                data.setTitle( meta.getTitle() );

            if ( meta.getDescription() != null )
                data.setDescription( meta.getDescription() );

            if ( meta.getImage() != null )
                data.setImage( meta.getImage() );
        }

        if ( entry.getParent() != null )
        {

View Full Code Here


        Entry entry = getEntry();

        String description = null;
        if (entry != null)
        {
            MetaInfo metaInfo = entry.getMetaInfo();
            if (metaInfo != null)
            {
                description = metaInfo.getDescription();
            }
        }
        return m_portlet.getDescription(description);
    }
View Full Code Here

        Entry entry = getEntry();

        String title = null;
        if (entry != null)
        {
            MetaInfo metaInfo = entry.getMetaInfo();
            if (metaInfo != null)
            {
                title = metaInfo.getTitle();
            }
        }
        return m_portlet.getTitle(title);
    }
View Full Code Here

        Entry entry = getEntry();

        String image = null;
        if (entry != null)
        {
            MetaInfo metaInfo = entry.getMetaInfo();
            if (metaInfo != null)
            {
                return image = metaInfo.getImage();
            }
        }
        return m_portlet.getImage(image);
    }
View Full Code Here

                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");

                assertTrue(rootset.getName().equals("theRootSet"));
                assertTrue(rootset.getId().equals("01"));

                MetaInfo meta = rootset.getMetaInfo();
                assertNotNull(meta);
                assertTrue(meta.getTitle().equals("Jetspeed"));
                assertTrue(meta.getDescription().equals("This is the default page for me"));
                assertTrue(meta.getImage().equals("me.png"));
                assertTrue(rootset.getTitle().equals("Jetspeed"));
                assertTrue(rootset.getDescription().equals("This is the default page for me"));
                assertTrue(rootset.getImage().equals("me.png"));

                Security security = rootset.getSecurity();
View Full Code Here

                    Portlets pp = (Portlets)itt.next();
                    System.out.println(" PORTLETS %%% " + pp.getId());
                    if ( pp.getId().equals("02"))
                    {
                        foundPortlet02 = true;
                        MetaInfo pp02MetaInfo = pp.getMetaInfo();
                        assertNotNull( "Portlet ID 02 has metaInfo", pp02MetaInfo);
                        assertEquals( "Portlet ID 02 Title", "Portlet Title", pp02MetaInfo.getTitle());
                        assertEquals( "Portlet ID 02 Title", "Portlet Description", pp02MetaInfo.getDescription());
                        assertEquals( "Portlet ID 02 Title", "Portlet Image", pp02MetaInfo.getImage());
                        Iterator pp02itt = pp.getEntriesIterator();
                        while (pp02itt.hasNext())
                        {
                            Entry pp02Entry = (Entry) pp02itt.next();
                            assertNotNull( "Portlet Id 02 has entry", pp02Entry);
                            if (pp02Entry.getId().equals("07"))
                            {
                                foundEntry07 = true;
                                MetaInfo entry07MetaInfo = pp02Entry.getMetaInfo();
                                assertNotNull( "Entry ID 07 has metaInfo", entry07MetaInfo);
                                assertEquals( "Entry ID 07 Title", "Entry Title", entry07MetaInfo.getTitle());
                                assertEquals( "Entry ID 07 Title", "Entry Description", entry07MetaInfo.getDescription());
                                assertEquals( "Entry ID 07 Title", "Entry Image", entry07MetaInfo.getImage());
                            }
                        }
                    }
                }
                assertTrue( "Tested Portlet 02", foundPortlet02);
View Full Code Here

        for (int col = 0; col < columns.length; col++)
        {
            for (int row = 0; row < columns[col].size(); row++)
            {
                IdentityElement identityElement = (IdentityElement) columns[col].get(row);
                MetaInfo metaInfo = identityElement.getMetaInfo();
                if ((metaInfo != null) && (metaInfo.getTitle() != null))
                {
                    titles.put(identityElement.getId(), metaInfo.getTitle());
                    continue;
                }

                if (identityElement instanceof Entry)
                {
View Full Code Here

                    .getDocument()
                    .getPortletsById(set.getID());

            if (portlets != null)
            {
                MetaInfo meta = portlets.getMetaInfo();
                if (meta == null)
                {
                    meta = new PsmlMetaInfo();
                    portlets.setMetaInfo(meta);
                }

                if (title != null)
                {
                    meta.setTitle(title);
                    set.setTitle(title);
                }

                if (description != null)
                {
                    meta.setDescription(description);
                    set.setDescription(description);
                }
            }
        }
    }
View Full Code Here

    @return the new MetaData object, empty if meta is null
    */
    protected static MetaData getMetaData(Portlets portlets)
    {
        MetaData data = new MetaData();
        MetaInfo meta = portlets.getMetaInfo();

        if (meta != null)
        {
            if (meta.getTitle() != null)
            {
                data.setTitle(meta.getTitle());
            }

            if (meta.getDescription() != null)
            {
                data.setDescription(meta.getDescription());
            }

            if (meta.getImage() != null)
            {
                data.setImage(meta.getImage());
            }
        }

        return data;

View Full Code Here

        Entry entry = getEntry();

        String description = null;
        if (entry != null)
        {
            MetaInfo metaInfo = entry.getMetaInfo();
            if (metaInfo != null)
            {
                description = metaInfo.getDescription();
            }
        }
        return m_portlet.getDescription(description);
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.profile.MetaInfo

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.