Class SetMaturityDateActionServiceImpl
java.lang.Object
ch.tocco.nice2.optional.debitor.impl.action.SetMaturityDateActionServiceImpl
- All Implemented Interfaces:
SetMaturityDateActionService
public class SetMaturityDateActionServiceImpl
extends Object
implements SetMaturityDateActionService
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.optional.debitor.impl.action.SetMaturityDateActionService
SetMaturityDateActionService.DebitorData, SetMaturityDateActionService.OrderRateData
-
Constructor Summary
ConstructorDescriptionSetMaturityDateActionServiceImpl
(EntityExplorerActionSelectionService selectionService, DefaultDisplayService defaultDisplayService, DunningService dunningService, Context context, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptiongetDebitorData
(EntityExplorerActionSelection selection) Serves the debitor data for the action form.Checks wheter the maturity date is alterable or not.boolean
saveDunningDate
(EntityExplorerActionSelection selection, org.joda.time.LocalDate dunningDate) Sets the dunning date on a debitor and on the dunning.boolean
saveMaturityDate
(EntityExplorerActionSelection selection, org.joda.time.LocalDate date, boolean raiseAllOrderRates) Sets the maturity date on a debitor and on the depended order rates.
-
Constructor Details
-
SetMaturityDateActionServiceImpl
public SetMaturityDateActionServiceImpl(EntityExplorerActionSelectionService selectionService, DefaultDisplayService defaultDisplayService, DunningService dunningService, Context context, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager)
-
-
Method Details
-
isMaturityDateAlterable
@Nullable public @Nullable Map<String,String> isMaturityDateAlterable(EntityExplorerActionSelection selection) throws RpcExecutionException Description copied from interface:SetMaturityDateActionService
Checks wheter the maturity date is alterable or not. The maturity date is not alterable on the following conditions: - debitor is cancelled - the clearing status of the debitor is "surplus" - the clearing status of the debitor is "balanced"- Specified by:
isMaturityDateAlterable
in interfaceSetMaturityDateActionService
- Returns:
- Null if the maturity date is alternable and a Map with error text if the maturity date is not alterable.
- Throws:
RpcExecutionException
-
getDebitorData
public SetMaturityDateActionService.DebitorData getDebitorData(EntityExplorerActionSelection selection) throws RpcExecutionException Description copied from interface:SetMaturityDateActionService
Serves the debitor data for the action form. Depending on the debitor there are three different action forms to show. This method returns all necessary data from the debitor with additional data which can be used to figure out, which form should be shown.- Specified by:
getDebitorData
in interfaceSetMaturityDateActionService
- Throws:
RpcExecutionException
-
saveDunningDate
public boolean saveDunningDate(EntityExplorerActionSelection selection, org.joda.time.LocalDate dunningDate) throws RpcExecutionException Description copied from interface:SetMaturityDateActionService
Sets the dunning date on a debitor and on the dunning. Only saves the dunning date if the selected debitor is already in a dunning run.- Specified by:
saveDunningDate
in interfaceSetMaturityDateActionService
- Throws:
RpcExecutionException
-
saveMaturityDate
public boolean saveMaturityDate(EntityExplorerActionSelection selection, org.joda.time.LocalDate date, boolean raiseAllOrderRates) throws RpcExecutionException Description copied from interface:SetMaturityDateActionService
Sets the maturity date on a debitor and on the depended order rates. Only sets the maturity date if the selected debitor is not in a dunning run.- Specified by:
saveMaturityDate
in interfaceSetMaturityDateActionService
- Throws:
RpcExecutionException
-