Package net.anotheria.anosite.wizard.api
Class BaseWizardAPIImpl
- java.lang.Object
-
- net.anotheria.anoplass.api.AbstractAPIImpl
-
- net.anotheria.anosite.wizard.api.BaseWizardAPIImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classBaseWizardAPIImpl.WizardDataWizardData object which represents APISessionAttribute for storing WizardStepAO.
-
Field Summary
Fields Modifier and Type Field Description static StringALLOWED_WIZARD_STEP_COMMANDS_ATTRIBUTEAttribute which holds allowed wizard step commands.static StringWIZARD_ATTRIBUTE_SUFFIXBaseWizardAPIImpl WIZARD_ATTRIBUTE_SUFFIX.
-
Constructor Summary
Constructors Constructor Description BaseWizardAPIImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WizardStepAOadjustToNextStep(String wizardId)Adjusting to next step.WizardStepAOadjustToPreviousStep(String wizardId)Adjusting to previous step.WizardStepAOadjustToStep(String wizardId, int stepIndex)Adjusting to step.voidallowNextStepNavigation(WizardAO wizard, WizardStepAO wizardStep)Allow next step.voidallowPreviousStepNavigation(WizardAO wizard, WizardStepAO wizardStep)Allow previous step.voidallowWizardCancel(WizardAO wizard, WizardStepAO wizardStep)Allow wizard cancel step.voidallowWizardFinish(WizardAO wizard, WizardStepAO wizardStep)Allow wizard finish step.voidallowWizardNavigateTo(WizardAO wizard, WizardStepAO wizardStep)Allow navigate To command.booleancancelWizard(WizardAO wizard)Cancel wizard.booleanfinishWizard(WizardAO wizard)Finish wizard.List<WizardStepAO>getCompletedSteps(String wizardId)Returns collection off steps which were already completed (passed).WizardStepAOgetCurrentStep(String wizardId)Returns current step for wizard.StringgetCurrentStepPageId(String wizardId)Return id of current step page.WizardAOgetWizard(String wizardId)Returns wizard with selected id.WizardAOgetWizardByName(String wizardName)Returns wizard with selected name.voidinit()-
Methods inherited from class net.anotheria.anoplass.api.AbstractAPIImpl
addValidationError, addValidationError, checkValidationAndThrowException, deInit, getApiConfig, getAttributeFromSession, getCallContext, getCurrentLocale, getCurrentUserId, getDefaultExpirePeriodForAttribute, getExpirePeriodForAttribute, getLoggedInUserId, getPrivateAttributeName, getSession, removeAttributeFromSession, setAttributeInSession, setAttributeInSession, setAttributeInSession, setAttributeInSession
-
-
-
-
Field Detail
-
WIZARD_ATTRIBUTE_SUFFIX
public static final String WIZARD_ATTRIBUTE_SUFFIX
BaseWizardAPIImpl WIZARD_ATTRIBUTE_SUFFIX.- See Also:
- Constant Field Values
-
ALLOWED_WIZARD_STEP_COMMANDS_ATTRIBUTE
public static final String ALLOWED_WIZARD_STEP_COMMANDS_ATTRIBUTE
Attribute which holds allowed wizard step commands.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws net.anotheria.anoplass.api.APIInitException- Specified by:
initin interfacenet.anotheria.anoplass.api.API- Overrides:
initin classnet.anotheria.anoplass.api.AbstractAPIImpl- Throws:
net.anotheria.anoplass.api.APIInitException
-
getWizardByName
public WizardAO getWizardByName(String wizardName) throws WizardAPIException
Description copied from interface:WizardAPIReturns wizard with selected name.- Specified by:
getWizardByNamein interfaceWizardAPI- Parameters:
wizardName- name of wizard- Returns:
WizardAO- Throws:
WizardAPIException- on errors WizardNotFoundException - if wizard not found
-
getWizard
public WizardAO getWizard(String wizardId) throws WizardAPIException
Description copied from interface:WizardAPIReturns wizard with selected id.- Specified by:
getWizardin interfaceWizardAPI- Parameters:
wizardId- wizard id- Returns:
WizardAO- Throws:
WizardAPIException- on errors , WizardNotFoundException - if wizard not found
-
getCurrentStepPageId
public String getCurrentStepPageId(String wizardId) throws WizardAPIException
Description copied from interface:WizardAPIReturn id of current step page.- Specified by:
getCurrentStepPageIdin interfaceWizardAPI- Parameters:
wizardId- id of wizard- Returns:
- string id of step
- Throws:
WizardAPIException- on errors
-
getCurrentStep
public WizardStepAO getCurrentStep(String wizardId) throws WizardAPIException
Description copied from interface:WizardAPIReturns current step for wizard. If step does not exist, then new one will be created.- Specified by:
getCurrentStepin interfaceWizardAPI- Parameters:
wizardId- id of wizard- Returns:
WizardStepAO- Throws:
WizardAPIException- on errors
-
getCompletedSteps
public List<WizardStepAO> getCompletedSteps(String wizardId) throws WizardAPIException
Description copied from interface:WizardAPIReturns collection off steps which were already completed (passed).- Specified by:
getCompletedStepsin interfaceWizardAPI- Parameters:
wizardId- id of wizard- Returns:
WizardStepAOcollection- Throws:
WizardAPIException- on errors
-
adjustToNextStep
public WizardStepAO adjustToNextStep(String wizardId) throws WizardAPIException
Description copied from interface:WizardAPIAdjusting to next step.- Specified by:
adjustToNextStepin interfaceWizardAPI- Parameters:
wizardId- id- Returns:
WizardStepAO- Throws:
WizardAPIException- on errors
-
adjustToPreviousStep
public WizardStepAO adjustToPreviousStep(String wizardId) throws WizardAPIException
Description copied from interface:WizardAPIAdjusting to previous step.- Specified by:
adjustToPreviousStepin interfaceWizardAPI- Parameters:
wizardId- id- Returns:
WizardStepAO- Throws:
WizardAPIException- on errors
-
adjustToStep
public WizardStepAO adjustToStep(String wizardId, int stepIndex) throws WizardAPIException
Description copied from interface:WizardAPIAdjusting to step.- Specified by:
adjustToStepin interfaceWizardAPI- Parameters:
wizardId- id of wizardstepIndex- step of step- Returns:
WizardStepAO- Throws:
WizardAPIException- on errors
-
finishWizard
public boolean finishWizard(WizardAO wizard) throws WizardAPIException
Description copied from interface:WizardAPIFinish wizard.- Specified by:
finishWizardin interfaceWizardAPI- Parameters:
wizard-WizardAO- Returns:
- true if wizard finished, false otherwise
- Throws:
WizardAPIException- on errors
-
cancelWizard
public boolean cancelWizard(WizardAO wizard) throws WizardAPIException
Description copied from interface:WizardAPICancel wizard.- Specified by:
cancelWizardin interfaceWizardAPI- Parameters:
wizard-WizardAO- Returns:
- true if wizard canceled, false otherwise
- Throws:
WizardAPIException- TODO dummy comment for javadoc.
-
allowNextStepNavigation
public void allowNextStepNavigation(WizardAO wizard, WizardStepAO wizardStep)
Description copied from interface:WizardAPIAllow next step.- Specified by:
allowNextStepNavigationin interfaceWizardAPI- Parameters:
wizard-WizardAOwizardStep-WizardStepAO
-
allowPreviousStepNavigation
public void allowPreviousStepNavigation(WizardAO wizard, WizardStepAO wizardStep)
Description copied from interface:WizardAPIAllow previous step.- Specified by:
allowPreviousStepNavigationin interfaceWizardAPI- Parameters:
wizard-WizardAOwizardStep-WizardStepAO
-
allowWizardCancel
public void allowWizardCancel(WizardAO wizard, WizardStepAO wizardStep)
Description copied from interface:WizardAPIAllow wizard cancel step.- Specified by:
allowWizardCancelin interfaceWizardAPI- Parameters:
wizard-WizardAOwizardStep-WizardStepAO
-
allowWizardFinish
public void allowWizardFinish(WizardAO wizard, WizardStepAO wizardStep)
Description copied from interface:WizardAPIAllow wizard finish step.- Specified by:
allowWizardFinishin interfaceWizardAPI- Parameters:
wizard-WizardAOwizardStep-WizardStepAO
-
allowWizardNavigateTo
public void allowWizardNavigateTo(WizardAO wizard, WizardStepAO wizardStep)
Description copied from interface:WizardAPIAllow navigate To command.- Specified by:
allowWizardNavigateToin interfaceWizardAPI- Parameters:
wizard-WizardAOwizardStep-WizardStepAO
-
-