Package autotest.common.CustomHistory

Examples of autotest.common.CustomHistory.HistoryToken


        args.put("id", new JSONNumber(Integer.parseInt(idString)));
        rpcProxy.rpcCall("get_embedded_query_url_token", args, new JsonRpcCallback() {
            @Override
            public void onSuccess(JSONValue result) {
                String tokenString = Utils.jsonToString(result);
                HistoryToken token;
                try {
                    token = HistoryToken.fromString(tokenString);
                } catch (IllegalArgumentException exc) {
                    NotifyManager.getInstance().showError("Invalid embedded query token " +
                                                          tokenString);
                    return;
                }

                // since this is happening asynchronously, the history may have changed, so ensure
                // it's set back to what it should be.
                HistoryToken shortToken = new HistoryToken();
                shortToken.put(HISTORY_TOKEN, idString);
                CustomHistory.newItem(shortToken);

                CustomHistory.simulateHistoryToken(token);
            }
        });
View Full Code Here


               
                assert queries.size() == 1;
                JSONObject query = queries.get(0).isObject();
                int queryId = (int) query.get("id").isNumber().doubleValue();
                String tokenString = query.get("url_token").isString().stringValue();
                HistoryToken token;
                try {
                    token = HistoryToken.fromString(tokenString);
                } catch (IllegalArgumentException exc) {
                    NotifyManager.getInstance().showError("Invalid saved query token " +
                                                          tokenString);
                    return;
                }

                // since this is happening asynchronously, the history may have changed, so ensure
                // it's set back to what it should be.
                HistoryToken shortToken = new HistoryToken();
                shortToken.put(HISTORY_TOKEN, Integer.toString(queryId));
                CustomHistory.newItem(shortToken);

                CustomHistory.simulateHistoryToken(token);
            }
        });
View Full Code Here

        if (isSelectEvent(event)) {
            selectionManager.toggleSelected(row);
            return;
        }

        HistoryToken historyToken;
        if (isAnyGroupingEnabled()) {
            historyToken = getDrilldownHistoryToken(testSet);
        } else {
            historyToken = listener.getSelectTestHistoryToken(testSet.getTestIndex());
        }
View Full Code Here

    private HistoryToken getDrilldownHistoryToken(TestSet testSet) {
        saveHistoryState();
        commonPanel.refineCondition(testSet);
        selectColumnsByName(DEFAULT_COLUMNS);
        HistoryToken historyToken = getHistoryArguments();
        restoreHistoryState();
        return historyToken;
    }
View Full Code Here

        return new ConditionTestSet(commonPanel.getConditionArgs());
    }

    @Override
    public HistoryToken getHistoryArguments() {
        HistoryToken arguments = super.getHistoryArguments();
        if (table != null) {
            columnSelect.addHistoryArguments(arguments, "columns");
            arguments.put("sort", Utils.joinStrings(",", tableSorts));
            commonPanel.addHistoryArguments(arguments);
        }
        return arguments;
    }
View Full Code Here

        if (isSelectEvent(event)) {
            selectionManager.toggleSelected(cellInfo);
            return;
        }

        HistoryToken historyToken;
        if (testSet.isSingleTest()) {
            historyToken = listener.getSelectTestHistoryToken(testSet.getTestIndex());
        } else {
            historyToken = getDrilldownHistoryToken(testSet,
                                                    getDefaultDrilldownRow(drilldownType),
View Full Code Here

                                                  String newColumnField) {
        saveHistoryState();
        commonPanel.refineCondition(tests);
        rowSelect.setSelectedItem(headerFields.getFieldBySqlName(newRowField));
        columnSelect.setSelectedItem(headerFields.getFieldBySqlName(newColumnField));
        HistoryToken historyArguments = getHistoryArguments();
        restoreHistoryState();
        return historyArguments;
    }
View Full Code Here

        commonPanel.updateViewFromState();
    }

    @Override
    public HistoryToken getHistoryArguments() {
        HistoryToken arguments = super.getHistoryArguments();
        if (!notYetQueried) {
            rowSelect.addHistoryArguments(arguments, HISTORY_ROW);
            columnSelect.addHistoryArguments(arguments, HISTORY_COLUMN);
            contentSelect.addHistoryArguments(arguments, HISTORY_CONTENT);
            arguments.put(HISTORY_SHOW_INCOMPLETE, Boolean.toString(currentShowIncomplete));
            arguments.put(HISTORY_ONLY_LATEST, Boolean.toString(showOnlyLatest.getValue()));
            commonPanel.addHistoryArguments(arguments);
        }
        return arguments;
    }
View Full Code Here

        addWidget(jobControls, "job_control_links");
    }

    @Override
    public HistoryToken getHistoryArguments() {
        HistoryToken arguments = super.getHistoryArguments();
        arguments.put("state_filter", historyTokens[jobStateFilter.getSelectedLink()]);
        return arguments;
    }
View Full Code Here

   
    /**
     * Subclasses should override this to store any additional history information.
     */
    public HistoryToken getHistoryArguments() {
        HistoryToken arguments = new HistoryToken();
        arguments.put("tab_id", getElementId());
        return arguments;
    }
View Full Code Here

TOP

Related Classes of autotest.common.CustomHistory.HistoryToken

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.