Package org.apache.wsrp4j.consumer

Examples of org.apache.wsrp4j.consumer.PortletDriver


            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());
                portletDriver.releaseSessions(sessions, user.getUserID());
            }
           
            userSession.removeGroupSession(portletDescription.getGroupID());
        } catch (WSRPException e) {
            this.getLogger().error("session deregister()", e);
View Full Code Here


    protected void performBlockingInteraction(WSRPPortlet portlet,
                                              SimplePortletWindowSession windowSession,
                                              User user,
                                              Request request) {
        try {
            PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(portlet);
            BlockingInteractionResponse response = portletDriver.performBlockingInteraction(
                    new WSRPRequestImpl(windowSession, request, consumerEnvironment), user.getUserID());

            if (response != null) {
                UpdateResponse update = response.getUpdateResponse();
                if (update != null) {
View Full Code Here

                                             SimplePortletWindowSession windowSession,
                                             User user)
    throws WSRPException {
        WSRPRequestImpl wsrpRequest = new WSRPRequestImpl(windowSession, null, this.consumerEnvironment);

        PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(portlet);
        MarkupResponse response = portletDriver.getMarkup(wsrpRequest, user.getUserID());

        if (response != null) {
            SessionContext sessionContext = response.getSessionContext();
            if (sessionContext != null && windowSession != null) {
                windowSession.getPortletSession().setSessionContext(sessionContext);
View Full Code Here

     *
     * @return The portlet driver for this portlet.
     **/
    public PortletDriver getPortletDriver(WSRPPortlet portlet)
    throws WSRPException {
        PortletDriver driver = null;

        if ((driver = (PortletDriver)portletDrivers.get(portlet.getPortletKey().toString())) == null) {
            String driverClass = this.adapter.getAdapterConfiguration().getParameter("portlet-driver-class", PortletDriverImpl.class.getName());
            try {
                driver = (PortletDriverImpl)this.adapter.createObject(driverClass);
View Full Code Here

            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());
                portletDriver.releaseSessions(sessions, user.getUserID());
            }
           
            userSession.removeGroupSession(portletDescription.getGroupID());
        } catch (WSRPException e) {
            this.getLogger().error("session deregister()", e);
View Full Code Here

    protected void performBlockingInteraction(WSRPPortlet portlet,
                                              SimplePortletWindowSession windowSession,
                                              User user,
                                              Request request) {
        try {
            PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(portlet);
            BlockingInteractionResponse response = portletDriver.performBlockingInteraction(
                    new WSRPRequestImpl(windowSession, request, consumerEnvironment), user.getUserID());

            if (response != null) {
                UpdateResponse update = response.getUpdateResponse();
                if (update != null) {
View Full Code Here

                                             SimplePortletWindowSession windowSession,
                                             User user)
    throws WSRPException {
        WSRPRequestImpl wsrpRequest = new WSRPRequestImpl(windowSession, null, this.consumerEnvironment);

        PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(portlet);
        MarkupResponse response = portletDriver.getMarkup(wsrpRequest, user.getUserID());

        if (response != null) {
            SessionContext sessionContext = response.getSessionContext();
            if (sessionContext != null && windowSession != null) {
                windowSession.getPortletSession().setSessionContext(sessionContext);
View Full Code Here

     *
     * @return The portlet driver for this portlet.
     **/
    public PortletDriver getPortletDriver(WSRPPortlet portlet)
    throws WSRPException {
        PortletDriver driver = null;

        if ((driver = (PortletDriver)portletDrivers.get(portlet.getPortletKey().toString())) == null) {
            String driverClass = this.adapter.getAdapterConfiguration().getParameter("portlet-driver-class", PortletDriverImpl.class.getName());
            try {
                driver = (PortletDriverImpl)this.adapter.createObject(driverClass);
View Full Code Here

            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());
                portletDriver.releaseSessions(sessions, user.getUserID());
            }
           
            userSession.removeGroupSession(portletDescription.getGroupID());
        } catch (WSRPException e) {
            this.getLogger().error("session deregister()", e);
View Full Code Here

    protected void performBlockingInteraction(WSRPPortlet portlet,
                                              SimplePortletWindowSession windowSession,
                                              User user,
                                              Request request) {
        try {
            PortletDriver portletDriver = consumerEnvironment.getPortletDriverRegistry().getPortletDriver(portlet);
            BlockingInteractionResponse response = portletDriver.performBlockingInteraction(
                    new WSRPRequestImpl(windowSession, request, consumerEnvironment), user.getUserID());

            if (response != null) {
                UpdateResponse update = response.getUpdateResponse();
                if (update != null) {
View Full Code Here

TOP

Related Classes of org.apache.wsrp4j.consumer.PortletDriver

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.