Package org.hdiv.state.scope

Examples of org.hdiv.state.scope.StateScope


    this.getStatesStack().push(state);

    // Add to scope
    String currentScope = this.getCurrentScope();
    StateScope stateScope = this.stateScopeManager.getStateScopeByName(currentScope);
    if (stateScope != null) {
      // Its custom scope Scope
      // TODO can't return the state id
      // We can't know the id before compose all parameters
      return null;
View Full Code Here


    IState state = this.getStatesStack().pop();

    // Add to scope
    String currentScope = this.getCurrentScope();
    StateScope stateScope = this.stateScopeManager.getStateScopeByName(currentScope);
    if (stateScope != null) {
      // Its custom Scope
      String stateId = stateScope.addState(state, this.getStateSuffix(state.getMethod()));
      return stateId;
    }

    // Add to page scope
    IPage page = this.getPage();
View Full Code Here

    } catch (NumberFormatException e) {
      throw new HDIVException(HDIVErrorCodes.HDIV_PARAMETER_INCORRECT_VALUE, e);
    }

    // Obtain Scopes
    StateScope stateScope = this.stateScopeManager.getStateScope(requestState);

    if (stateScope != null) {
      restoredState = stateScope.restoreState(stateId);
    } else {

      restoredState = this.getStateFromSession(pageId, stateId);
    }
View Full Code Here

        stateId = Integer.parseInt(sId);
      } catch (NumberFormatException e) {
        throw new HDIVException(HDIVErrorCodes.PAGE_ID_INCORRECT);
      }

      StateScope stateScope = this.stateScopeManager.getStateScope(value);
      if (stateScope != null) {

        String token = stateScope.getStateToken(stateId);
        return requestSuffix.equals(token);
      }

      IPage currentPage = session.getPage(pageId);
View Full Code Here

  public void testStateScopeManager() {

    StateScopeManager scopeManager = this.context.getBean(StateScopeManager.class);
    assertNotNull(scopeManager);

    StateScope appScope = scopeManager.getStateScopeByName("app");
    StateScope sessionScope = scopeManager.getStateScopeByName("user-session");

    assertNotNull(appScope);
    assertNotNull(sessionScope);
  }
View Full Code Here

TOP

Related Classes of org.hdiv.state.scope.StateScope

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.