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.GetFormEntityTaskNested 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, taskSchedulingServiceFields inherited from class ch.tocco.nice2.rest.action.spi.AbstractPreActionResource
businessUnitManager, context, defaultDisplayService, defaultValueService, formBeanService, initialFormEntityName, initialFormName, l10n, log, requiresFormEntity, securityManager, textResourcesFields inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
uriInfo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractInvoiceActionResource(OrderGeneratorService orderGeneratorService, QueryBuilderFactory queryBuilderFactory, String initialFormEntityName) -
Method Summary
Modifier and TypeMethodDescriptionprotected TextMessagename of the action displayed in the notification center if no specific text is setprotected InitialFormValueResponseBeanbuildInitialForm(ActionResourceBean actionResourceBean) protected Optional<PreCheckResponseBean> checkRoleAccess(EntitySelectionBean selection) protected PreCheckResponseBeancreateBillingPositionPreCheckBean(List<Entity> entities) protected PreCheckResponseBeancreatePriceCategoryPreCheckBean(List<Entity> entities) protected PreCheckResponseBeancreateRecipientPreCheckBean(List<Entity> entities) protected AbstractActionResource.ActionResultBeandoPerformAction(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 JobDataMapBuildergetOrderJobDataMapBuilder(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean) protected voidinvokeTask(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, verifyFormEntityBeanMethods inherited from class ch.tocco.nice2.rest.action.spi.AbstractPreActionResource
getInitialFormValueResponseBean, getSelectedEntities, getSelectedEntity, loadInitialForm, setBusinessUnitManager, setContext, setDefaultDisplayService, setDefaultValueService, setFormBeanService, setL10n, setLog, setSecurityManager, setSelectionService, setTextResourcesMethods 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:AbstractPreActionResourceis ran before the actual logic and can be used to run checks or return a form that needs to be filled before execution- Overrides:
preActionin classAbstractPreActionResource
-
doPerformAction
protected AbstractActionResource.ActionResultBean doPerformAction(ActionDataBean actionDataBean, ActionResourceBean actionResourceBean, TaskContext taskContext) - Specified by:
doPerformActionin classAbstractActionResource
-
actionName
Description copied from class:AbstractActionResourcename of the action displayed in the notification center if no specific text is set- Specified by:
actionNamein 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)
-