Package org.cyclos.security.system
Class CustomWizardServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<DTO,E,D,DP>
-
- org.cyclos.security.ConfigurationEntityCRUDServiceSecurity<CustomWizardDTO,CustomWizard,CustomWizardData,CustomWizardNature>
-
- org.cyclos.security.system.CustomWizardServiceSecurity
-
- All Implemented Interfaces:
CRUDService<CustomWizardDTO,CustomWizardData,CustomWizardNature>,CRUDWithConfirmationPasswordService<CustomWizardDTO,CustomWizardData,CustomWizardNature>,Service,CustomWizardService
@Security public class CustomWizardServiceSecurity extends ConfigurationEntityCRUDServiceSecurity<CustomWizardDTO,CustomWizard,CustomWizardData,CustomWizardNature> implements CustomWizardService
Security layer forCustomWizard
-
-
Field Summary
-
Fields inherited from class org.cyclos.security.CRUDServiceSecurity
entityClass
-
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
-
-
Constructor Summary
Constructors Constructor Description CustomWizardServiceSecurity()
-
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 keybooleancanManage()booleancanView()voidcheckCreateNew(CustomWizardNature param)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notCustomWizardExecutionDatacurrent(@NotNull String key)Returns the execution data for the current wizard stepprotected booleandoHasManageAccess(CustomWizard entity)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(CustomWizard entity)Should be implemented in order to return whether the caller is allowed to view the given entity.StringexternalRedirect(@NotNull CustomWizardTransitionParams params)Prepares the redirection of the user to an external system.protected CRUDServiceLocal<CustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature>getImplementation()Should be implemented in order to return the actual implementation of the serviceList<CustomWizardResultVO>list()Lists all available custom wizardsCustomWizardExecutionDatarunExternalRedirectCallback(@NotNull RunExternalRedirectCallbackParams params)Runs the callback for a step which performs such operationvoidsaveOrder(List<Long> ids)Saves the order according to the given wizard idsvoidsendVerificationCode(@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 wizardCustomWizardExecutionDatatransition(CustomWizardTransitionParams params)Transition a wizard between steps or finishes the wizard-
Methods inherited from class org.cyclos.security.ConfigurationEntityCRUDServiceSecurity
isAccessible
-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, onBeforeSave, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPassword
-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
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, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, 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
-
-
-
-
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
-
canManage
public boolean canManage()
-
canView
public boolean canView()
-
checkCreateNew
public void checkCreateNew(CustomWizardNature param)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<CustomWizardDTO,CustomWizard,CustomWizardData,CustomWizardNature>
-
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
-
doHasViewAccess
public boolean doHasViewAccess(CustomWizard entity)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to view the given entity.- Specified by:
doHasViewAccessin classCRUDServiceSecurity<CustomWizardDTO,CustomWizard,CustomWizardData,CustomWizardNature>
-
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
-
list
public List<CustomWizardResultVO> list() throws FrameworkException
Description copied from interface:CustomWizardServiceLists all available custom wizards- Specified by:
listin interfaceCustomWizardService- Throws:
FrameworkException
-
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
-
saveOrder
public void saveOrder(List<Long> ids)
Description copied from interface:CustomWizardServiceSaves the order according to the given wizard ids- Specified by:
saveOrderin interfaceCustomWizardService
-
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
-
doHasManageAccess
protected boolean doHasManageAccess(CustomWizard entity)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to manage the given entity, for the given operation- Specified by:
doHasManageAccessin classCRUDServiceSecurity<CustomWizardDTO,CustomWizard,CustomWizardData,CustomWizardNature>
-
getImplementation
protected CRUDServiceLocal<CustomWizard,CustomWizardDTO,CustomWizardData,CustomWizardNature> getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<CustomWizardDTO,CustomWizard,CustomWizardData,CustomWizardNature>
-
-