Package org.apache.beehive.netui.pageflow.handler

Examples of org.apache.beehive.netui.pageflow.handler.StorageHandler


     * @return the {@link SharedFlowController} of the given class name which is stored in the user session.
     */
    public static SharedFlowController getSharedFlow( String sharedFlowClassName, HttpServletRequest request,
                                                      ServletContext servletContext )
    {
        StorageHandler sh = Handlers.get( servletContext ).getStorageHandler();
        HttpServletRequest unwrappedRequest = unwrapMultipart( request );
        RequestContext rc = new RequestContext( unwrappedRequest, null );
        String attrName = ScopedServletUtils.getScopedSessionAttrName(InternalConstants.SHARED_FLOW_ATTR_PREFIX
                                                                      + sharedFlowClassName, request);
        SharedFlowController sf = (SharedFlowController) sh.getAttribute(rc, attrName);
        if (sf != null) {
            sf.reinitializeIfNecessary(request, null, servletContext);
        }
        return sf;
    }
View Full Code Here


     * @param request the current HttpServletRequest.
     */
    public static void removeSharedFlow( String sharedFlowClassName, HttpServletRequest request,
                                         ServletContext servletContext )
    {
        StorageHandler sh = Handlers.get( servletContext ).getStorageHandler();
        HttpServletRequest unwrappedRequest = unwrapMultipart( request );
        RequestContext rc = new RequestContext( unwrappedRequest, null );
        String attrName = ScopedServletUtils.getScopedSessionAttrName(InternalConstants.SHARED_FLOW_ATTR_PREFIX
                                                                      + sharedFlowClassName, request);
        sh.removeAttribute(rc, attrName);
    }
View Full Code Here

     * remove it.
     */
    public static void removeLongLivedPageFlow( String modulePath, HttpServletRequest request,
                                                ServletContext servletContext )
    {
        StorageHandler sh = Handlers.get( servletContext ).getStorageHandler();
        HttpServletRequest unwrappedRequest = unwrapMultipart( request );
        RequestContext rc = new RequestContext( unwrappedRequest, null );
       
        String attrName = InternalUtils.getLongLivedFlowAttr( modulePath );
        attrName = ScopedServletUtils.getScopedSessionAttrName( attrName, unwrappedRequest );
        sh.removeAttribute( rc, attrName );

        //
        // Now, if the current page flow is long-lived, remove the reference.
        //
        String currentLongLivedAttrName =
                ScopedServletUtils.getScopedSessionAttrName( CURRENT_LONGLIVED_ATTR, unwrappedRequest );
        String currentLongLivedModulePath =
                ( String ) sh.getAttribute( rc, currentLongLivedAttrName );
       
        if ( modulePath.equals( currentLongLivedModulePath ) )
        {
            sh.removeAttribute( rc, currentLongLivedAttrName );
        }
    }
View Full Code Here

     * @return the long-lived page flow instance associated with the given module, or <code>null</code> if none is found.
     */
    public static PageFlowController getLongLivedPageFlow( String modulePath, HttpServletRequest request,
                                                           ServletContext servletContext )
    {
        StorageHandler sh = Handlers.get( servletContext ).getStorageHandler();
        HttpServletRequest unwrappedRequest = unwrapMultipart( request );
        RequestContext rc = new RequestContext( unwrappedRequest, null );
       
        String attrName = InternalUtils.getLongLivedFlowAttr( modulePath );
        attrName = ScopedServletUtils.getScopedSessionAttrName( attrName, unwrappedRequest );
        PageFlowController retVal =  ( PageFlowController ) sh.getAttribute( rc, attrName );
        return retVal;
    }
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.pageflow.handler.StorageHandler

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.