Examples of WSRP


Examples of org.exoplatform.portal.pom.spi.wsrp.WSRP

        // instance context
        ExoPortletInstanceContext instanceContext;
        // TODO: we should not be having these wsrp specific conditions through the code like
        // this, it should either work the same was as normal portlets or abstracted out to another class.
        if (ApplicationType.WSRP_PORTLET.equals(state.getApplicationType())) {
            WSRP wsrp = (WSRP) preferencesPortletContext.getState();
            AccessMode accessMode = AccessMode.CLONE_BEFORE_WRITE;

            if (wsrp.getState() != null) {
                StatefulPortletContext statefulPortletContext = StatefulPortletContext.create(
                        preferencesPortletContext.getId(), PortletStateType.OPAQUE, wsrp.getState());

                invocation.setTarget(statefulPortletContext);
            } else {
                PortletContext portletContext = PortletContext.createPortletContext(preferencesPortletContext.getId());
                invocation.setTarget(portletContext);
            }

            // if the portlet is a cloned one already, we can modify it directly instead of requesting a clone
            if (wsrp.isCloned()) {
                accessMode = AccessMode.READ_WRITE;
            }
            instanceContext = new ExoPortletInstanceContext(preferencesPortletContext.getId(), accessMode);
        } else {
            instanceContext = new ExoPortletInstanceContext(preferencesPortletContext.getId());
View Full Code Here

Examples of org.exoplatform.portal.pom.spi.wsrp.WSRP

        // get the window
        UIWindow window = structureAccess.getWindowFrom(uuid);

        // construct the new customization state
        WSRP wsrp = new WSRP();
        String portletId = portletContext.getId();
        wsrp.setPortletId(portletId);
        if (portletContext instanceof StatefulPortletContext) {
            StatefulPortletContext context = (StatefulPortletContext) portletContext;
            if (PortletStateType.OPAQUE.equals(context.getType())) {
                wsrp.setState((byte[]) context.getState());
            } else {
                throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
            }
        }
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.