Examples of WSRPPortlet


Examples of org.apache.wsrp4j.consumer.WSRPPortlet

            return;           
        }

        // get the wsrp portlet
        final PortletKey portletKey = new PortletKeyImpl(portletHandle, producerId);
        WSRPPortlet wsrpportlet = this.consumerEnvironment.getPortletRegistry().getPortlet(portletKey);
        if ( wsrpportlet == null ) {
            wsrpportlet = new WSRPPortletImpl(portletKey);
            final PortletContext portletContext = new PortletContext(null, portletKey.getPortletHandle(), null);
            wsrpportlet.setPortletContext(portletContext);
            try {
                consumerEnvironment.getPortletRegistry().addPortlet(wsrpportlet);
            } catch (WSRPException we) {
                this.getLogger().error("Exception adding wsrp portlet.", we);
                return;
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

            }
           
            final String portletInstanceKey = (String)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_PORTLET_INSTANCE_KEY);

            // getMarkup()
            final WSRPPortlet wsrpportlet = consumerEnvironment.getPortletRegistry().getPortlet(portletKey);

            SimplePortletWindowSession windowSession = getSimplePortletWindowSession(wsrpportlet, portletInstanceKey, user);
            final MarkupContext markupContext = this.getMarkupContext(wsrpportlet, windowSession, user);
            if ( markupContext == null || markupContext.getMarkupString() == null ) {
                throw new SAXException("No markup received from wsrp coplet " + coplet.getId());
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

            UserSession userSession = consumerEnvironment.getSessionHandler().getUserSession(portletKey.getProducerId(), user.getUserID());
            PortletDescription portletDescription = producer.getPortletDescription(portletKey.getPortletHandle());
            GroupSession groupSession = userSession.getGroupSession(portletDescription.getGroupID());
            PortletSession portletSession = groupSession.getPortletSession(portletInstanceKey);
            SessionContext sessionContext = portletSession.getSessionContext();
            WSRPPortlet wsrpportlet = consumerEnvironment.getPortletRegistry().getPortlet(portletKey);
            PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(wsrpportlet);
   
            if (sessionContext != null) {
                String[] sessions = new String[1];
                sessions[0] = new String (sessionContext.getSessionID());
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

        this.setCurrentCopletInstanceData(coplet);
       
        try {
            PortletKey portletKey = (PortletKey)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_PORTLET_KEY);
            final String portletInstanceKey = (String)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_PORTLET_INSTANCE_KEY);
            WSRPPortlet wsrpPortlet = consumerEnvironment.getPortletRegistry().getPortlet(portletKey);
            User user = (User) coplet.getTemporaryAttribute(ATTRIBUTE_NAME_USER);
           
            org.apache.cocoon.environment.Request requestObject = ObjectModelHelper.getRequest(service.getObjectModel());
            java.util.Enumeration formParameter = requestObject.getParameterNames();
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

     *
     * @param portletKey The portlet key identifying the portlet
     * @return returns the removed instance of WSRPPortlet
     **/
    public WSRPPortlet removePortlet(PortletKey portletKey) {
        WSRPPortlet portlet = null;
        if (portletKey != null) {
            portlet = super.removePortlet(portletKey);
            contextMap.remove(portletKey.toString());
        }
        return portlet;
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

     * persistent store.
     **/
    public void removeAllPortlets() {
        Iterator iterator = getAllPortlets();
        while (iterator.hasNext()) {
            WSRPPortlet portlet = (WSRPPortlet)iterator.next();

            // remove ConsumerPortletContext from map
            contextMap.remove(portlet.getPortletKey().toString());
        }
        super.removeAllPortlets();
    }
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

     *
     * @param event
     * @see StateChangedEvent
     */
    public void stateChanged(StateChangedEvent event) {
        WSRPPortlet portlet = null;
        try {
            portlet = (WSRPPortlet)event.getSource();

            //store PortletContext to persistent file
            ConsumerPortletContext consumerPortletContext =
                (ConsumerPortletContext)contextMap.get(portlet.getPortletKey().toString());

            consumerPortletContext.setPortletContext(portlet.getPortletContext());
            consumerPortletContext.setPortletKey(portlet.getPortletKey());
        } catch (ClassCastException ce) {
            logger.error("StateChanged-error in portlet: " + portlet.getPortletKey().getPortletHandle(), ce);
        }
    }
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

            XMLUtils.createElement(contenthandler, "title", title);           

            final String portletInstanceKey = (String)copletInstanceData.getTemporaryAttribute(WSRPAdapter.ATTRIBUTE_NAME_PORTLET_INSTANCE_KEY);
            final User user = (User)copletInstanceData.getTemporaryAttribute(WSRPAdapter.ATTRIBUTE_NAME_USER);

            final WSRPPortlet portlet = this.environment.getPortletRegistry().getPortlet(portletKey);
            try {
                SimplePortletWindowSession windowSession = this.adapter.getSimplePortletWindowSession(portlet, portletInstanceKey, user);
                if ( this.environment != null && windowSession != null ) {
                    this.adapter.setCurrentCopletInstanceData(copletInstanceData);
                    URLGenerator urlGenerator = this.environment.getURLGenerator();
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

            return;           
        }

        // get the wsrp portlet
        final PortletKey portletKey = new PortletKeyImpl(portletHandle, producerId);
        WSRPPortlet wsrpportlet = this.consumerEnvironment.getPortletRegistry().getPortlet(portletKey);
        if ( wsrpportlet == null ) {
            wsrpportlet = new WSRPPortletImpl(portletKey);
            final PortletContext portletContext = new PortletContext(null, portletKey.getPortletHandle(), null);
            wsrpportlet.setPortletContext(portletContext);
            try {
                consumerEnvironment.getPortletRegistry().addPortlet(wsrpportlet);
            } catch (WSRPException we) {
                this.getLogger().error("Exception adding wsrp portlet.", we);
                return;
View Full Code Here

Examples of org.apache.wsrp4j.consumer.WSRPPortlet

            }
           
            final String portletInstanceKey = (String)coplet.getTemporaryAttribute(ATTRIBUTE_NAME_PORTLET_INSTANCE_KEY);

            // getMarkup()
            final WSRPPortlet wsrpportlet = consumerEnvironment.getPortletRegistry().getPortlet(portletKey);

            SimplePortletWindowSession windowSession = getSimplePortletWindowSession(wsrpportlet, portletInstanceKey, user);
            final MarkupContext markupContext = this.getMarkupContext(wsrpportlet, windowSession, user);
            if ( markupContext == null || markupContext.getMarkupString() == null ) {
                throw new SAXException("No markup received from wsrp coplet " + coplet.getId());
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.