Package org.apache.jetspeed.om.common.portlet

Examples of org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite


    public PortletDefinitionComposite getPortletDefinitionByIdentifier( String identifier )
    {
        Criteria c = new Criteria();
        c.addEqualTo("portletIdentifier", identifier);
        PortletDefinitionComposite def = (PortletDefinitionComposite) getPersistenceBrokerTemplate().getObjectByQuery(
                QueryFactory.newQuery(PortletDefinitionImpl.class, c));
        if (def != null && def.getPortletApplicationDefinition() == null)
        {
            final String msg = "getPortletDefinitionByIdentifier() returned a PortletDefinition that has no parent PortletApplication.";
            throw new IllegalStateException(msg);
        }
View Full Code Here


        Criteria c = new Criteria();
        c.addEqualTo("app.name", appName);
        c.addEqualTo("name", portletName);

        PortletDefinitionComposite def = (PortletDefinitionComposite) getPersistenceBrokerTemplate().getObjectByQuery(
                QueryFactory.newQuery(PortletDefinitionImpl.class, c));
        if (def != null && def.getPortletApplicationDefinition() == null)
        {
            final String msg = "getPortletDefinitionByIdentifier() returned a PortletDefinition that has no parent PortletApplication.";
            throw new IllegalStateException(msg);
        }
View Full Code Here

    public PortletDefinitionComposite getPortletDefinition(ObjectID id)
    {
        Criteria c = new Criteria();
        c.addEqualTo("id", new Long(id.toString()));
        PortletDefinitionComposite portlet = (PortletDefinitionComposite) getPersistenceBrokerTemplate().getObjectByQuery(
                QueryFactory.newQuery(PortletDefinitionImpl.class, c));
       
        postLoad(portlet);
        return portlet;
    }
View Full Code Here

      
        if (cache == this.portletNameCache)
        {
            //System.out.println("%%% portlet remote removed " + key);           
            RegistryPortletCache.cacheRemoveQuiet((String)key, (RegistryCacheObjectWrapper)element);
            PortletDefinitionComposite pd = this.getPortletDefinitionByUniqueName((String)key);
            if (listeners != null)
            {
                for (int ix=0; ix < listeners.size(); ix++)
                {
                    RegistryEventListener listener = (RegistryEventListener)listeners.get(ix);
View Full Code Here

        ContentDispatcherCtrl dispatcher = null;   
        boolean contentIsCached = false;
        try
        {
            PortletWindow portletWindow = getPortletWindow(fragment);
            PortletDefinitionComposite portletDefinition =
                (PortletDefinitionComposite) portletWindow.getPortletEntity().getPortletDefinition();          
            if (checkSecurityConstraints && !checkSecurityConstraint(portletDefinition, fragment))
            {
                throw new PortletAccessDeniedException("Access Denied.");
            }
            if (portletTracking.isOutOfService(portletWindow))
            {
                log.info("Taking portlet out of service: " + portletDefinition.getUniqueName() + " for window " + fragment.getId());
                fragment.overrideRenderedContent(OUT_OF_SERVICE_MESSAGE);
                return;
            }
            long timeoutMetadata = this.getTimeoutOnJob(portletDefinition);
            portletTracking.setExpiration(portletWindow, timeoutMetadata);           
View Full Code Here

        ContentDispatcherCtrl dispatcher = null
        boolean contentIsCached = false;      
        try
        {
            PortletWindow portletWindow = getPortletWindow(fragment);
            PortletDefinitionComposite portletDefinition =
                (PortletDefinitionComposite) portletWindow.getPortletEntity().getPortletDefinition();    

            long timeoutMetadata = this.getTimeoutOnJob(portletDefinition);
            portletTracking.setExpiration(portletWindow, timeoutMetadata);           
           
View Full Code Here

    protected boolean isNonStandardAction(PortletWindow actionWindow)
    {
        PortletEntity entity = actionWindow.getPortletEntity();
        if (entity != null)
        {
            PortletDefinitionComposite portletDefinition = (PortletDefinitionComposite)entity.getPortletDefinition();
            if (portletDefinition != null)
            {
                Collection actionList = null;
       
                if (portletDefinition != null)
                {
                    actionList = portletDefinition.getMetadata().getFields(PortalReservedParameters.PORTLET_EXTENDED_DESCRIPTOR_NON_STANDARD_ACTION);
                }
                if (actionList != null)
                {
                    if (!actionList.isEmpty())
                        return true;
View Full Code Here

        this.app = app;
    }

    public void body(String namespace, String name, String text) throws Exception
    {
        PortletDefinitionComposite def = (PortletDefinitionComposite) app.getPortletDefinitionByName(text);
        digester.push(def);
    }                                                       
View Full Code Here

    {
        List tmpWindows = new ArrayList(windows.entrySet());
        for (int i = 0; i < tmpWindows.size(); i++)
        {
            PortletWindow window = (PortletWindow)((Map.Entry)tmpWindows.get(i)).getValue();
            PortletDefinitionComposite windowDef = (PortletDefinitionComposite)window.getPortletEntity().getPortletDefinition();           
            if(def != null && windowDef != null && def.getUniqueName() != null && def.getUniqueName().equals(windowDef.getUniqueName()))
            {
                removeWindow(window);
            }
        }       
        tmpWindows.clear();
View Full Code Here

    {
        List tmpWindows = new ArrayList(windows.entrySet());
        for (int i = 0; i < tmpWindows.size(); i++)
        {
            PortletWindow window = (PortletWindow)((Map.Entry)tmpWindows.get(i)).getValue();
            PortletDefinitionComposite pd =  (PortletDefinitionComposite)window.getPortletEntity().getPortletDefinition();
            if (pd != null)
            {
                MutablePortletApplication windowApp = (MutablePortletApplication)pd.getPortletApplicationDefinition();           
                if (app.getName().equals(windowApp.getName()))
                {
                    removeWindow(window);
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite

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.