if (action != null && action.equals(Action.unknown)) { return respondError(response, StanzaError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action != null && !action.equals(Action.execute)) { return respondError(response, StanzaError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.badAction); if (action != null && action.equals(Action.unknown)) { return respondError(response, StanzaError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action == null || Action.execute.equals(action)) { action = command.getExecuteAction(); if (Action.next.equals(action)) { command.incrementStage(); command.next(new Form(requestData.getForm())); else if (Action.complete.equals(action)) { command.incrementStage(); command.complete(new Form(requestData.getForm())); else if (Action.prev.equals(action)) { command.decrementStage(); command.prev(); else if (Action.cancel.equals(action)) { command.cancel();
Action realAction = AdHocCommand.Action.valueOf(action); if (realAction == null || realAction.equals(Action.unknown)) { adHocCommandData.setAction(Action.unknown); String execute = parser.getAttributeValue("", "execute"); if (execute != null) { adHocCommandData.setExecuteAction(AdHocCommand.Action.valueOf(execute));
if (action != null && action.equals(Action.unknown)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action != null && !action.equals(Action.execute)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.badAction); if (action != null && action.equals(Action.unknown)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action == null || Action.execute.equals(action)) { action = command.getExecuteAction(); if (Action.next.equals(action)) { command.incrementStage(); command.next(new Form(requestData.getForm())); else if (Action.complete.equals(action)) { command.incrementStage(); command.complete(new Form(requestData.getForm())); else if (Action.prev.equals(action)) { command.decrementStage(); command.prev(); else if (Action.cancel.equals(action)) { command.cancel();
if (action != null && action.equals(Action.unknown)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action != null && !action.equals(Action.execute)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.badAction); if (action != null && action.equals(Action.unknown)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action == null || Action.execute.equals(action)) { action = command.getExecuteAction(); if (Action.next.equals(action)) { command.incrementStage(); command.next(new Form(requestData.getForm())); else if (Action.complete.equals(action)) { command.incrementStage(); command.complete(new Form(requestData.getForm())); else if (Action.prev.equals(action)) { command.decrementStage(); command.prev(); else if (Action.cancel.equals(action)) { command.cancel();
if (action != null && action.equals(Action.unknown)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action != null && !action.equals(Action.execute)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.badAction); if (action != null && action.equals(Action.unknown)) { respondError(response, XMPPError.Condition.bad_request, AdHocCommand.SpecificErrorCondition.malformedAction); if (action == null || Action.execute.equals(action)) { action = command.getExecuteAction(); if (Action.next.equals(action)) { command.incrementStage(); command.next(new Form(requestData.getForm())); else if (Action.complete.equals(action)) { command.incrementStage(); command.complete(new Form(requestData.getForm())); else if (Action.prev.equals(action)) { command.decrementStage(); command.prev(); else if (Action.cancel.equals(action)) { command.cancel();
Action realAction = AdHocCommand.Action.valueOf(action); if (realAction == null || realAction.equals(Action.unknown)) { adHocCommandData.setAction(Action.unknown); String execute = parser.getAttributeValue("", "execute"); if (execute != null) { adHocCommandData.setExecuteAction(AdHocCommand.Action.valueOf(execute));
Action realAction = AdHocCommand.Action.valueOf(action); if (realAction == null || realAction.equals(Action.unknown)) { adHocCommandData.setAction(Action.unknown); String execute = parser.getAttributeValue("", "execute"); if (execute != null) { adHocCommandData.setExecuteAction(AdHocCommand.Action.valueOf(execute));
/** * Returns true if the <code>action</code> is available in the current stage. * The {@link Action#cancel cancel} action is always allowed. To define the * available actions use the <code>addActionAvailable</code> method. * * @param action * The action to check if it is available. * @return True if the action is available for the current stage. */ protected boolean isValidAction(Action action) { return getActions().contains(action) || Action.cancel.equals(action); }
/** * Returns true if the <code>action</code> is available in the current stage. * The {@link Action#cancel cancel} action is always allowed. To define the * available actions use the <code>addActionAvailable</code> method. * * @param action * The action to check if it is available. * @return True if the action is available for the current stage. */ protected boolean isValidAction(Action action) { return getActions().contains(action) || Action.cancel.equals(action); }
/** * Returns true if the <code>action</code> is available in the current stage. * The {@link Action#cancel cancel} action is always allowed. To define the * available actions use the <code>addActionAvailable</code> method. * * @param action * The action to check if it is available. * @return True if the action is available for the current stage. */ protected boolean isValidAction(Action action) { return getActions().contains(action) || Action.cancel.equals(action); }
/** * Returns true if the <code>action</code> is available in the current stage. * The {@link Action#cancel cancel} action is always allowed. To define the * available actions use the <code>addActionAvailable</code> method. * * @param action * The action to check if it is available. * @return True if the action is available for the current stage. */ protected boolean isValidAction(Action action) { return getActions().contains(action) || Action.cancel.equals(action); }