Package org.cyclos.impl.system
Class CustomWizardServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<CustomWizard,QCustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>
-
- org.cyclos.impl.system.CustomWizardServiceImpl
-
- All Implemented Interfaces:
CRUDServiceLocal<CustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>,CustomWizardServiceLocal,CRUDService<CustomWizardDTO,CustomWizardData,CustomWizardNature>,CRUDWithConfirmationPasswordService<CustomWizardDTO,CustomWizardData,CustomWizardNature>,Service,CustomWizardService
@Service public class CustomWizardServiceImpl extends CRUDServiceImpl<CustomWizard,QCustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature> implements CustomWizardServiceLocal
Implementation forCustomWizardService
-
-
Field Summary
Fields Modifier and Type Field Description protected StoredFileHandlerstoredFileHandler-
Fields inherited from class org.cyclos.impl.CRUDServiceImpl
$, ATTR_CURRENT_COPY, cacheHandler, dtoClass, entityClass, extensionPointService, idPath, internalNamePath, namePath, ownerEntityIdPath, ownerEntityPath, ownerEntityPropertyName, passwordHandler, richTextHandler, withConfirmationPassword
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
Fields inherited from interface org.cyclos.impl.system.CustomWizardServiceLocal
ATTR_CUSTOM_VALUES, ATTR_EXECUTION, ATTR_PREVIOUS_STEP, ATTR_REGISTRATION, ATTR_REQUEST, ATTR_RETURN_URL, ATTR_STEP, ATTR_STEPS, ATTR_STORAGE, ATTR_TRANSITION, ATTR_USER, ATTR_WIZARD, NEXT
-
-
Constructor Summary
Constructors Constructor Description CustomWizardServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomWizardExecutionDataback(@NotNull CustomWizardBackParams params)Backs one or more stepsvoidcancel(String key)Cancels the execution with the given keyCustomWizardExecutionDatacurrent(@NotNull String key)Returns the execution data for the current wizard stepStringexternalRedirect(@NotNull CustomWizardTransitionParams params)Prepares the redirection of the user to an external system.CustomWizardExecutionfindExecution(String key)Returns an execution by keyprotected CustomWizardDatagetData(CustomWizard wizard)Returns details data for the given entityUserGroupgetGroup(CustomWizardExecution execution)Returns the registration group for the given wizard executionList<MenuItemWizard>getRunnableWizardsForMenu()Returns all menu wizards that can be executed by the currently authenticated user (or guest)CustomWizardExecutionStoragegetStorage(PublicRegistrationDTO dto)Returns the storage from an attribute of the given DTOCustomWizardExecutionDataidentityProviderCallback(CustomWizardExecution execution, org.pac4j.core.profile.CommonProfile profile, IdentityProviderCallbackResult result)A callback from identity provider request.List<CustomWizardResultVO>list()Lists all available custom wizardsList<UserWizard>listForRun(User user)Returns the wizards the logged user can run over the given userList<MenuItemWizard>listMenuWizards()Returns all guest wizardsList<RegistrationWizard>listRegistrationWizards()Returns all wizards for registrationCollection<SystemWizard>listSystemForRun()Returns the system wizards the logged user can runList<SystemWizard>listSystemWizards()Returns all system wizardsList<UserWizard>listUserWizards()Returns all user wizardsCustomWizardnewEntity(CustomWizardNature nature)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkprotected voidremove(IEntity entity)protected ValidatorresolveValidator(CustomWizardDTO dto)CustomWizardExecutionDatarunExternalRedirectCallback(@NotNull RunExternalRedirectCallbackParams params)Runs the callback for a step which performs such operationvoidsendVerificationCode(@NotNull CustomWizardVerificationCodeParams params)Sends the verification code to either via email or by SMS, in order to verify the given data.CustomWizardExecutionDatastart(StartCustomWizardParams params)Starts the execution of a given wizardprotected org.apache.commons.collections4.BidiMap<Class<? extends CustomWizard>,Class<? extends CustomWizardDTO>>subClassMappings()Should be overridden by subclasses which handle entity / dto hierarchies.CustomWizardExecutionDatatransition(CustomWizardTransitionParams params)Transition a wizard between steps or finishes the wizard-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomInternalNameValidations, addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isEntityInternalNameRequired, isNameRequired, load, logEntity, onAfterRemove, onAfterSave, onBeforeRemove, onBeforeSave, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, toDTO, toEntity, validate
-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, selectFrom, subQuery, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.system.CustomWizardService
saveOrder
-
-
-
-
Field Detail
-
storedFileHandler
@Autowired protected StoredFileHandler storedFileHandler
-
-
Method Detail
-
back
public CustomWizardExecutionData back(@NotNull @NotNull CustomWizardBackParams params) throws FrameworkException
Description copied from interface:CustomWizardServiceBacks one or more steps- Specified by:
backin interfaceCustomWizardService- Throws:
FrameworkException
-
cancel
public void cancel(String key) throws FrameworkException
Description copied from interface:CustomWizardServiceCancels the execution with the given key- Specified by:
cancelin interfaceCustomWizardService- Throws:
FrameworkException
-
current
public CustomWizardExecutionData current(@NotNull @NotNull String key) throws FrameworkException
Description copied from interface:CustomWizardServiceReturns the execution data for the current wizard step- Specified by:
currentin interfaceCustomWizardService- Throws:
FrameworkException
-
externalRedirect
public String externalRedirect(@NotNull @NotNull CustomWizardTransitionParams params) throws FrameworkException
Description copied from interface:CustomWizardServicePrepares the redirection of the user to an external system.- Specified by:
externalRedirectin interfaceCustomWizardService- Throws:
FrameworkException
-
findExecution
public CustomWizardExecution findExecution(String key)
Description copied from interface:CustomWizardServiceLocalReturns an execution by key- Specified by:
findExecutionin interfaceCustomWizardServiceLocal
-
getGroup
public UserGroup getGroup(CustomWizardExecution execution)
Description copied from interface:CustomWizardServiceLocalReturns the registration group for the given wizard execution- Specified by:
getGroupin interfaceCustomWizardServiceLocal
-
getRunnableWizardsForMenu
public List<MenuItemWizard> getRunnableWizardsForMenu()
Description copied from interface:CustomWizardServiceLocalReturns all menu wizards that can be executed by the currently authenticated user (or guest)- Specified by:
getRunnableWizardsForMenuin interfaceCustomWizardServiceLocal
-
getStorage
public CustomWizardExecutionStorage getStorage(PublicRegistrationDTO dto)
Description copied from interface:CustomWizardServiceLocalReturns the storage from an attribute of the given DTO- Specified by:
getStoragein interfaceCustomWizardServiceLocal
-
identityProviderCallback
public CustomWizardExecutionData identityProviderCallback(CustomWizardExecution execution, org.pac4j.core.profile.CommonProfile profile, IdentityProviderCallbackResult result)
Description copied from interface:CustomWizardServiceLocalA callback from identity provider request. Stores all data which was read from the provider in the current user registration. Also stores the identity provider identifier, so the new user will be linked with the IdP.- Specified by:
identityProviderCallbackin interfaceCustomWizardServiceLocal
-
list
public List<CustomWizardResultVO> list() throws FrameworkException
Description copied from interface:CustomWizardServiceLists all available custom wizards- Specified by:
listin interfaceCustomWizardService- Throws:
FrameworkException
-
listForRun
public List<UserWizard> listForRun(User user)
Description copied from interface:CustomWizardServiceLocalReturns the wizards the logged user can run over the given user- Specified by:
listForRunin interfaceCustomWizardServiceLocal
-
listMenuWizards
public List<MenuItemWizard> listMenuWizards()
Description copied from interface:CustomWizardServiceLocalReturns all guest wizards- Specified by:
listMenuWizardsin interfaceCustomWizardServiceLocal
-
listRegistrationWizards
public List<RegistrationWizard> listRegistrationWizards()
Description copied from interface:CustomWizardServiceLocalReturns all wizards for registration- Specified by:
listRegistrationWizardsin interfaceCustomWizardServiceLocal
-
listSystemForRun
public Collection<SystemWizard> listSystemForRun()
Description copied from interface:CustomWizardServiceLocalReturns the system wizards the logged user can run- Specified by:
listSystemForRunin interfaceCustomWizardServiceLocal
-
listSystemWizards
public List<SystemWizard> listSystemWizards()
Description copied from interface:CustomWizardServiceLocalReturns all system wizards- Specified by:
listSystemWizardsin interfaceCustomWizardServiceLocal
-
listUserWizards
public List<UserWizard> listUserWizards()
Description copied from interface:CustomWizardServiceLocalReturns all user wizards- Specified by:
listUserWizardsin interfaceCustomWizardServiceLocal
-
newEntity
public CustomWizard newEntity(CustomWizardNature nature)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<CustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>- Specified by:
newEntityin classCRUDServiceImpl<CustomWizard,QCustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>
-
runExternalRedirectCallback
public CustomWizardExecutionData runExternalRedirectCallback(@NotNull @NotNull RunExternalRedirectCallbackParams params) throws FrameworkException
Description copied from interface:CustomWizardServiceRuns the callback for a step which performs such operation- Specified by:
runExternalRedirectCallbackin interfaceCustomWizardService- Throws:
FrameworkException
-
sendVerificationCode
public void sendVerificationCode(@NotNull @NotNull CustomWizardVerificationCodeParams params) throws FrameworkExceptionDescription copied from interface:CustomWizardServiceSends the verification code to either via email or by SMS, in order to verify the given data. Each send medium can only be used every 30 seconds.- Specified by:
sendVerificationCodein interfaceCustomWizardService- Throws:
FrameworkException
-
start
public CustomWizardExecutionData start(StartCustomWizardParams params) throws FrameworkException
Description copied from interface:CustomWizardServiceStarts the execution of a given wizard- Specified by:
startin interfaceCustomWizardService- Throws:
FrameworkException
-
transition
public CustomWizardExecutionData transition(CustomWizardTransitionParams params) throws FrameworkException
Description copied from interface:CustomWizardServiceTransition a wizard between steps or finishes the wizard- Specified by:
transitionin interfaceCustomWizardService- Throws:
FrameworkException
-
getData
protected CustomWizardData getData(CustomWizard wizard)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<CustomWizard,QCustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
remove
protected void remove(IEntity entity)
- Overrides:
removein classAbstractServerComponent- See Also:
BaseEntityManagerHandler.remove(IEntity)
-
resolveValidator
protected Validator resolveValidator(CustomWizardDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<CustomWizard,QCustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>
-
subClassMappings
protected org.apache.commons.collections4.BidiMap<Class<? extends CustomWizard>,Class<? extends CustomWizardDTO>> subClassMappings()
Description copied from class:CRUDServiceImplShould be overridden by subclasses which handle entity / dto hierarchies. The map key should be the entity class, while the map value, the DTO class- Overrides:
subClassMappingsin classCRUDServiceImpl<CustomWizard,QCustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>
-
-