Package org.apache.jetspeed.om.profile

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


    }

    public DynamicURI getPortletByName(String portletName)
    {
        String id = null;
        Entry entry = data.getProfile().getDocument().getEntry(portletName);
        //Portlets pEntry =  data.getProfile().getDocument().getPortletsById(entry.getId());
        if (entry != null)
        {
            id = entry.getId();
        }
        System.out.println("js_peid:"+id);
        return addPathInfo("js_peid", id);

    }
View Full Code Here


      Profile profile = ((JetspeedRunData)rundata).getCustomizedProfile();
      Portlets allPortlets = profile.getDocument().getPortletsById(((PortletSet)((JetspeedRunData)rundata).getCustomized()).getID());

     
      List installed = new ArrayList ();
      Entry iPortlet;


      if (allPortlets != null)
      {
        for (int ii = 0; ii < allPortlets.getEntryCount(); ii++)
View Full Code Here

    /**
     * @see PortletInstance#getAttribute()
     */
    public String getAttribute(String name, String dftValue)
    {
        Entry entry = getEntry();

        if (entry == null)
        {
            return dftValue;
        }
        Parameter attr = entry.getParameter(name);
        if (attr != null)
        {
            return attr.getValue();
        }
        else
View Full Code Here

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

        if (entry == null)
        {
            return "";
        }
        Parameter attr = entry.getParameter(name);
        if (attr != null)
        {
            return attr.getValue();
        }
        else
View Full Code Here

    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

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.