Interface CopyFromOrdersProcessImplementationInterface
-
public interface CopyFromOrdersProcessImplementationInterface
Interface to be implemented by the hooks to be executed on the Copy From Orders process. Example of a hook:import javax.enterprise.context.Dependent; import org.openbravo.client.kernel.ComponentProvider.Qualifier; import org.openbravo.common.actionhandler.copyfromorderprocess.CopyFromOrdersProcessImplementationInterface; import org.openbravo.model.common.order.Order; import org.openbravo.model.common.order.OrderLine; @Dependent @Qualifier(CopyFromOrdersProcessImplementationInterface.COPY_FROM_ORDER_PROCESS_HOOK_QUALIFIER) public class TestHook implements CopyFromOrdersProcessImplementationInterface { @Override public int getOrder() { return 10; } @Override public void exec(Order processingOrder, OrderLine orderLine, OrderLine newOrderLine) { newOrderLine.setDescription("Test"); } }
-
-
Field Summary
Fields Modifier and Type Field Description static String
COPY_FROM_ORDER_PROCESS_HOOK_QUALIFIER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
exec(Order newOrder, OrderLine oldOrderLine, OrderLine newOrderLine)
Executes the hook logic on the Copy From Orders processint
getOrder()
Returns the order when the concrete hook will be implemented.
-
-
-
Field Detail
-
COPY_FROM_ORDER_PROCESS_HOOK_QUALIFIER
static final String COPY_FROM_ORDER_PROCESS_HOOK_QUALIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrder
int getOrder()
Returns the order when the concrete hook will be implemented. A positive value will execute the hook after the core's logic
-
exec
void exec(Order newOrder, OrderLine oldOrderLine, OrderLine newOrderLine)
Executes the hook logic on the Copy From Orders process- Parameters:
newOrder
- the new order we are creatingoldOrderLine
- the order line from which we are creating the linenewOrderLine
- the new line created within the newOrder
-
-