Package org.apache.jetspeed.om.profile

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


    public void setAttribute(String name, String value)
    {
        // make sure we are updating and using the clone now
        setupForUpdate();
       
        Entry entry = getEntry();

        Parameter attr = entry.getParameter(name);
        
         // Setting a attribute to null should just remove it.
        if(value == null)
        {
            removeAttribute(name);
        }
        else if (attr != null)
        {
            attr.setValue(value);
        }
        // If an attribute does not exist, then add it.
        else
        {
            PsmlParameter newAttr = new PsmlParameter();
            newAttr.setName(name);
            newAttr.setValue(value);
            entry.addParameter(newAttr);
        }
    }
View Full Code Here


    public void removeAttribute(String name)
    {
        // make sure we are updating and using the clone now
        setupForUpdate();
       
        Entry entry = getEntry();

        // I am assuming that we only allow one parameter per name
        Iterator params = entry.getParameterIterator();
        int index = -1;
        int count = 0;
        while (params.hasNext())
        {
            Parameter param = (Parameter) params.next();
            if (param.getName().equalsIgnoreCase(name))
            {
                index = count;
                break;
            }
            count++;
        }

        // We have to wait until we are outside the loop to remove
        // or else we throw a ConcurrentModificationException   
        if (index != -1)
        {
            entry.removeParameter(index);          
        }
    }
View Full Code Here

    public void removeAllAttributes()
    {
        // make sure we are updating and using the clone now
        setupForUpdate();
       
        Entry entry = getEntry();

        entry.removeAllParameter();
    }
View Full Code Here

    /**
     * @see PortletInstance#getAttributes()
     */
    public Iterator getAttributes()
    {
        Entry entry = getEntry();

        return entry.getParameterIterator();
    }
View Full Code Here

    /**
     * @see PortletInstance#getDescription()
     */
    public String getDescription()
    {
        Entry entry = getEntry();

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

    /**
     * @see PortletInstance#getTitle()
     */
    public String getTitle()
    {
        Entry entry = getEntry();

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

    /**
     * @see PortletInstance#getImage()
     */
    public String getImage()
    {
        Entry entry = getEntry();

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

                }
                PSMLDocument doc = profile.getDocument();
                if (null != doc)
                {               
                    Entry entry = doc.getEntryById(id);
                    if (null == entry)
                    {
                        // FIXME: need to write this function
                        // Portlets ps = doc.getPortletsById(id);
                        result = new  StringElement("not implemented - PortletElement");
View Full Code Here

       
        // Get the Portlet using the PSML document and the PEID
        JetspeedRunData jdata = (JetspeedRunData)rundata;

        // Get the Portlet using the PSML document and the PEID
        Entry entry = jdata.getProfile().getDocument().getEntryById(peid);
        if ( entry == null )
        {
            logger.warn("Failed to get PEID (" + peid + ") entry for User ("
              + rundata.getUser().getName() + ")");
            return;
View Full Code Here

            return;
        }
       
        // Get the Portlet using the PSML document and the PEID
        JetspeedRunData jdata = (JetspeedRunData)rundata;
        Entry entry = jdata.getProfile().getDocument().getEntryById(peid);
        if ( entry == null )
        {
            logger.warn("Failed to get PEID (" + peid + ") entry for User ("
              + rundata.getUser().getName() + ")");
            return;
View Full Code Here

TOP

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

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.