Package com.totsp.gwittir.client.util

Examples of com.totsp.gwittir.client.util.HistoryTokenizer


    return 4096;
  }

  @Override
  public Map<String, String> getWindowContextData() {
    HistoryTokenizer tok = new HistoryTokenizer(getWindowName());
    return tok.getTokensMap();
  }
View Full Code Here


   
  }

  @Override
  public void storeWindowContextData(Map<String, String> windowContextData) {
    HistoryTokenizer tok = new HistoryTokenizer(windowContextData);
    setWindowName(tok.tokenize());
   
  }
View Full Code Here

  public SimpleSessionHistoryManager() {
  }

  public void apply(String historyToken) {
    LOGGER.log(Level.DEBUG, "Apply "+historyToken, null);
    HistoryTokenizer tok = new HistoryTokenizer(historyToken);

    if ((tok.getToken("s") == null)
        || (Integer.parseInt(tok.getToken("s").toString()) == currentState)) {
      return;
    }

    int targetState = Integer.parseInt(tok.getToken("s").toString());
    LOGGER.log(
        Level.SPAM,
        "Repositioning to state: " + targetState + " of "
            + states.size() + "from " + currentState, null);
    if(targetState >= states.size() ){
      tok.setToken("s", ""+(states.size() -1));
      return;
    }
    callState(targetState);
    currentState = targetState;
  }
View Full Code Here

      states.add(event);
    } else {
      states.set(currentState, event);
    }
    if(appendHistory){
      HistoryTokenizer tok = new HistoryTokenizer();
      tok.begin();
      tok.setToken("s", Integer.toString(currentState));
      tok.commit();
    }
  }
View Full Code Here

  public SimpleSessionHistoryManager() {
  }

  public void apply(String historyToken) {
    LOGGER.log(Level.DEBUG, "Apply "+historyToken, null);
    HistoryTokenizer tok = new HistoryTokenizer(historyToken);

    if ((tok.getToken("s") == null)
        || (Integer.parseInt(tok.getToken("s").toString()) == currentState)) {
      return;
    }

    int targetState = Integer.parseInt(tok.getToken("s").toString());
    LOGGER.log(
        Level.SPAM,
        "Repositioning to state: " + targetState + " of "
            + states.size() + "from " + currentState, null);
    if(targetState >= states.size() ){
      tok.setToken("s", ""+(states.size() -1));
      return;
    }
    callState(targetState);
    currentState = targetState;
  }
View Full Code Here

      states.add(event);
    } else {
      states.set(currentState, event);
    }
    if(appendHistory){
      HistoryTokenizer tok = new HistoryTokenizer();
      tok.begin();
      tok.setToken("s", Integer.toString(currentState));
      tok.commit();
    }
  }
View Full Code Here

TOP

Related Classes of com.totsp.gwittir.client.util.HistoryTokenizer

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.