Examples of PortletInstance


Examples of org.apache.jetspeed.portal.PortletInstance

     */
    public void setAttribute( String attrName, String attrValue, RunData rundata )
    {
        try
        {
            PortletInstance instance = PersistenceManager.getInstance(this, rundata);
            instance.setAttribute(attrName, attrValue);
            PersistenceManager.store(instance);
        }
        catch (PortalPersistenceException e)
        {
            Log.error("Exception while setting attribute "+attrName+" for portlet "+getName(), e);
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

    public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData data)
    {
        String s1 = "Config ID: " + getPortletConfig().getPortletId();
        String s2 = ", Portlet ID: " + getID();
        String s3 = ", Page ID: " + getPortletConfig().getPageId();
        PortletInstance instance = PersistenceManager.getInstance(this,data);
        String s4 = instance.getAttribute("country");
        return new org.apache.jetspeed.util.JetspeedClearElement( s1 + s2 + s3 + ", " + s4);       
    }
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

            return true;
        }

        // Retrieve portlet instance
        String peId = null;
        PortletInstance instance = PersistenceManager.getInstance(portlet, rundata);
        if (instance != null)
        {
            peId = instance.getPortlet().getID();
        }

        // Compare the ids
        if (peId != null && peId.equals(requestPeid))
        {
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

        }

        // Update paramaters
        try
        {
            PortletInstance instance = PersistenceManager.getInstance(p, rundata);

            Iterator i = params.iterator();

            while(i.hasNext())
            {
                Parameter param = (Parameter)i.next();
                String name = param.getName();
                String newValue = rundata.getParameters().getString(name);

                // we treat null and empty string in the same way, we should
                // probably find a better system as they may have different semantic
                if ((newValue==null)||(newValue.equals("")))
                {
                    // this will fail if the parameter is currently set in the registry
                    // but not in the PSML entry. This is a good thing !
                    instance.removeAttribute(name);
                }
                else
                {
                    // only update if the value changed
                    if (!newValue.equals(p.getPortletConfig().getInitParameter(name)))
                    {
                        instance.setAttribute(name,newValue);
                        // Note: setting the portlet's config *IS NOT* a good idea -
                        // it might be used as the Portlet for other PSMLDocument Entries that
                        // used to have the same parameters as this one (Portlets *ARE* cached on
                        // their parameters), so changing the parameters like this changes them for
                        // all and make the Portlet *NOT MATCH* the cache handle.
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

            PortletTab tab = new PortletTab();
           
            // Handle the portlet title
            String title = null;           
            PortletInstance pi = PersistenceManager.getInstance(p, rundata);
            if (pi != null)
            {
                title = pi.getTitle();
                if (title == null)
                {
                    title = (p.getTitle() != null) ? p.getTitle() : p.getName();
                }
            }
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

    * @author <a href="mailto:sweaver@rippe.com">Scott Weaver</a>
    */
    public void setAttribute(String attrName, String value, Context context)
        throws PortalPersistenceException
    {
        PortletInstance instance = getPortletInstance(context);
        instance.setAttribute(attrName, value);
        PersistenceManager.store(instance);
    }
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

    * @author <a href="mailto:sweaver@rippe.com">Scott Weaver</a>
    */
    public void setAttribute(String attrName, String value, Context context)
        throws PortalPersistenceException
    {
        PortletInstance instance = getPortletInstance(context);
        instance.setAttribute(attrName, value);
        PersistenceManager.store(instance);
    }
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

     * @return a list of ordered PortletAction objects describing the
     * the actions available for this portlet
     */
    protected List buildActionList( RunData rundata, Portlet portlet )
    {       
        PortletInstance instance = portlet.getInstance(rundata);
        Portlet real = portlet.getInstance(rundata).getPortlet();
       
        if (!(real instanceof JetspeedFusionPortlet))
        {
            return super.buildActionList(rundata, portlet);
        }
        JetspeedFusionPortlet fusion = (JetspeedFusionPortlet)real;
       
        List actions = new Vector();
        JetspeedRunData jdata = (JetspeedRunData)rundata;

        // disable actions option
        if (JetspeedSecurity.areActionsDisabledForAllUsers())
        {
            return actions;
        }
        JetspeedUser user = jdata.getJetspeedUser();
        if (JetspeedSecurity.areActionsDisabledForAnon() && false == user.hasLoggedIn())
        {
            return actions;
        }

        // the portlet is state aware
        PortletState state = (PortletState)portlet;
               
        String entityId = instance.getAttribute(J2_ENTITY, "");
        serviceNavsPipeline(rundata, entityId);
       
        String pa = getPortletConfig().getInitParameter(PORTLET_APPLICATION_NAME, null);
        String pd = getPortletConfig().getInitParameter(PORTLET_DEFINITION_NAME, null);
        String registryKey = pa + "::" + pd;
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

        HttpServletResponse response = data.getResponse();
        String entityId = null;
       
        try
        {
            PortletInstance instance = this.getInstance(jrun);
            entityId = instance.getAttribute(J2_ENTITY, "");
            String pa = getPortletConfig().getInitParameter(PORTLET_APPLICATION_NAME, null);
            String pd = getPortletConfig().getInitParameter(PORTLET_DEFINITION_NAME, null);
            String registryKey = pa + "::" + pd;
           
            PortletWindow window = getPortletWindow(entityId, registryKey);
View Full Code Here

Examples of org.apache.jetspeed.portal.PortletInstance

    {
        super.setMinimized(flag, rundata);
        JetspeedRunData jrun = (JetspeedRunData)rundata;
        String entityId = null;
       
        PortletInstance instance = this.getInstance(jrun);
        entityId = instance.getAttribute(J2_ENTITY, "3");
        PortletWindow window = windowAccessor.getPortletWindow(entityId);
        if (window == null)
        {
            window = windowAccessor.createPortletWindow(entityId);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.