Class CreateLinesFromProcessHook
- java.lang.Object
-
- org.openbravo.common.actionhandler.createlinesfromprocess.CreateLinesFromProcessHook
-
public abstract class CreateLinesFromProcessHook extends Object
Interface to be implemented by the hooks to be executed on the Create Lines From Order process. Example of a hook:@Dependent @Qualifier(CreateLinesFromProcessHook.CREATE_LINES_FROM_PROCESS_HOOK_QUALIFIER) public class TestHook implements CreateLinesFromProcessHook { @Override public int getOrder() { return 10; } @Override public void exec() { getInvoiceLine().setDescription("Test"); } }
This class has useful public method to access to the invoice and invoice line currently being created, the BaseOBObject line (Order/InOut) from which the invoice line is being created or even the JSONObject from which the invoice line is being created.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CREATE_LINES_FROM_PROCESS_HOOK_QUALIFIER
-
Constructor Summary
Constructors Constructor Description CreateLinesFromProcessHook()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
exec()
Executes the hook logic on the Create Lines From processBaseOBObject
getCopiedFromLine()
Returns the line from which the invoice line will be created.Invoice
getInvoice()
Returns the Invoice currently being createdInvoiceLine
getInvoiceLine()
Returns the Invoice Line currently being createdabstract int
getOrder()
Returns the order when the concrete hook will be implemented.org.codehaus.jettison.json.JSONObject
getPickExecJSONObject()
boolean
isCopiedFromOrderLine()
Returns true if the line from which the invoice line will be created is an order line.
-
-
-
Field Detail
-
CREATE_LINES_FROM_PROCESS_HOOK_QUALIFIER
public static final String CREATE_LINES_FROM_PROCESS_HOOK_QUALIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrder
public abstract 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
public abstract void exec()
Executes the hook logic on the Create Lines From process
-
getInvoice
public Invoice getInvoice()
Returns the Invoice currently being created
-
getInvoiceLine
public InvoiceLine getInvoiceLine()
Returns the Invoice Line currently being created
-
getCopiedFromLine
public BaseOBObject getCopiedFromLine()
Returns the line from which the invoice line will be created. It can be either a shipment or an order line
-
isCopiedFromOrderLine
public boolean isCopiedFromOrderLine()
Returns true if the line from which the invoice line will be created is an order line.
-
getPickExecJSONObject
public org.codehaus.jettison.json.JSONObject getPickExecJSONObject()
-
-