Class AbstractInvoiceActionResource
java.lang.Object
ch.tocco.nice2.rest.core.spi.AbstractRestResource
ch.tocco.nice2.rest.action.spi.AbstractPreActionResource
ch.tocco.nice2.rest.action.spi.AbstractActionResource
ch.tocco.nice2.optional.order.spi.action.invoice.resource.AbstractInvoiceActionResource
- All Implemented Interfaces:
RestResource
- Direct Known Subclasses:
AccrualInvoiceActionResource
,DefaultInvoiceActionResource
,DirectInvoiceActionResource
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.rest.action.spi.AbstractActionResource
AbstractActionResource.AbstractActionJob, AbstractActionResource.AbstractInterruptableActionJob, AbstractActionResource.ActionResultBean, AbstractActionResource.ActionResultBeanBuilder, AbstractActionResource.ActionResultFlags, AbstractActionResource.GetFormEntityTask
Nested classes/interfaces inherited from class ch.tocco.nice2.rest.action.spi.AbstractPreActionResource
AbstractPreActionResource.SelectionType
-
Field Summary
FieldsFields inherited from class ch.tocco.nice2.rest.action.spi.AbstractActionResource
commandExecutor, entityBeanRebinder, notificationService, taskSchedulingService
Fields inherited from class ch.tocco.nice2.rest.action.spi.AbstractPreActionResource
businessUnitManager, context, defaultDisplayService, defaultValueService, formBeanService, initialFormEntityName, initialFormName, l10n, log, requiresFormEntity, securityManager, textResources
Fields inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
uriInfo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractInvoiceActionResource
(OrderGeneratorService orderGeneratorService, QueryBuilderFactory queryBuilderFactory, String initialFormEntityName) -
Method Summary
Modifier and TypeMethodDescriptionprotected TextMessage
name of the action displayed in the notification center if no specific text is setprotected InitialFormValueResponseBean
buildInitialForm
(ActionResourceBean actionResourceBean) protected Optional
<PreCheckResponseBean> checkRoleAccess
(EntitySelectionBean selection) protected PreCheckResponseBean
createBillingPositionPreCheckBean
(List<Entity> entities) protected PreCheckResponseBean
createPriceCategoryPreCheckBean
(List<Entity> entities) protected PreCheckResponseBean
createRecipientPreCheckBean
(List<Entity> entities) protected AbstractActionResource.ActionResultBean
doPerformAction
(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean, TaskContext taskContext) protected Optional
<PreCheckResponseBean> executeCheckTask
(EntitySelectionBean selection, String taskName, Function<List<Entity>, PreCheckResponseBean> preCheckMapper) protected Stream
<Supplier<Optional<PreCheckResponseBean>>> getChecks
(ActionResourceBean actionResourceBean) getEntitiesToCheck
(EntitySelectionBean selection) This method must not be executed in privileged mode because hierarchical BU ACL policies wouldn't get applied in this case and `entitiesToCheck` would contain too many entities if customer has hierarchical BUs (it would contain the entities from the parent BU as well, not only those from the currently selected sub BU)getEntityToCheck
(Entity entity) protected abstract Class
<? extends AbstractJob> getOrderGeneratorClass
(ActionDataBean actionDataBean) protected abstract JobDataMapBuilder
getOrderJobDataMapBuilder
(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean) protected void
invokeTask
(Class<? extends AbstractJob> jobClass, JobDataMapBuilder jobData) preAction
(ActionResourceBean actionResourceBean) is ran before the actual logic and can be used to run checks or return a form that needs to be filled before executionMethods inherited from class ch.tocco.nice2.rest.action.spi.AbstractActionResource
doValidate, getCallableType, getCurrentUsername, getFormEntity, getJobClass, getParentEntity, getTaskData, performAction, recoveryEnabled, setCommandExecutor, setEntityBeanRebinder, setNotificationService, setTaskContextBuilder, setTaskSchedulingService, taskCancelledMessage, taskFailedMessage, taskFailedTitle, taskFinishedMessage, taskSchedulingMessage, taskStartedMessage, validate, verifyFormEntityBean
Methods inherited from class ch.tocco.nice2.rest.action.spi.AbstractPreActionResource
getInitialFormValueResponseBean, getSelectedEntities, getSelectedEntity, loadInitialForm, setBusinessUnitManager, setContext, setDefaultDisplayService, setDefaultValueService, setFormBeanService, setL10n, setLog, setSecurityManager, setSelectionService, setTextResources
Methods inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
getPathParameter, setUriInfo, tryGetInt
-
Field Details
-
CREATE_INVOICE_TASK_NAME
- See Also:
-
-
Constructor Details
-
AbstractInvoiceActionResource
protected AbstractInvoiceActionResource(OrderGeneratorService orderGeneratorService, QueryBuilderFactory queryBuilderFactory, String initialFormEntityName)
-
-
Method Details
-
preAction
Description copied from class:AbstractPreActionResource
is ran before the actual logic and can be used to run checks or return a form that needs to be filled before execution- Overrides:
preAction
in classAbstractPreActionResource
-
doPerformAction
protected AbstractActionResource.ActionResultBean doPerformAction(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean, TaskContext taskContext) - Specified by:
doPerformAction
in classAbstractActionResource
-
actionName
Description copied from class:AbstractActionResource
name of the action displayed in the notification center if no specific text is set- Specified by:
actionName
in classAbstractActionResource
-
getOrderGeneratorClass
protected abstract Class<? extends AbstractJob> getOrderGeneratorClass(ActionDataBean actionDataBean) -
getOrderJobDataMapBuilder
protected abstract JobDataMapBuilder getOrderJobDataMapBuilder(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean) -
getChecks
protected Stream<Supplier<Optional<PreCheckResponseBean>>> getChecks(ActionResourceBean actionResourceBean) -
invokeTask
-
getEntityToCheck
-
checkRoleAccess
-
executeCheckTask
protected Optional<PreCheckResponseBean> executeCheckTask(EntitySelectionBean selection, String taskName, Function<List<Entity>, PreCheckResponseBean> preCheckMapper) -
createRecipientPreCheckBean
-
createPriceCategoryPreCheckBean
-
createBillingPositionPreCheckBean
-
buildInitialForm
-
getEntitiesToCheck
protected com.google.common.collect.Multimap<String,Entity> getEntitiesToCheck(EntitySelectionBean selection) This method must not be executed in privileged mode because hierarchical BU ACL policies wouldn't get applied in this case and `entitiesToCheck` would contain too many entities if customer has hierarchical BUs (it would contain the entities from the parent BU as well, not only those from the currently selected sub BU)
-