Package org.compiere.model
Interface ModelValidator
- All Known Implementing Classes:
ExportModelValidator
,ProductPriceValidator
,PromotionValidator
,SalesMgmtValidator
public interface ModelValidator
Model Validator
- Version:
- $Id: ModelValidator.java,v 1.2 2006/07/30 00:58:18 jjanke Exp $ 2007/02/26 laydasalasc - globalqss - Add new timings for all before/after events on documents
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.static final int
Deprecated.static final int
Deprecated.static final int
Deprecated.static final int
Deprecated.static final String[]
static final String[]
static final String[]
static final String[]
static final int
Called after document is closedstatic final int
Called after document is completedstatic final int
Called after document is postedstatic final int
Called after document is preparedstatic final int
Called after document is reactivatedstatic final int
Called after document is reverseaccrualstatic final int
Called after document is reversecorrectstatic final int
Called after document is voidstatic final int
Called before document is closestatic final int
Called before document is completedstatic final int
Called before document is postedstatic final int
Called before document is preparedstatic final int
Called before document is reactivatestatic final int
Called before document is reverseaccrualstatic final int
Called before document is reversecorrectstatic final int
Called before document is voidstatic final int
static final int
static final int
static final int
static final int
static final int
Model Change Type Changestatic final int
Model Change Type Deletestatic final int
static final int
Model Change Type Newstatic final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptiondocValidate
(PO po, int timing) Validate Document Action.
Called as first step of DocAction.prepareIt or at the end of DocAction.completeIt.
Note that totals, etc. may not be correct before the prepare stage.int
Get Client to be monitoredvoid
initialize
(ModelValidationEngine engine, MClient client) Initialize validator.login
(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) User logged in.modelChange
(PO po, int type) Model change event of a Table.
-
Field Details
-
TYPE_BEFORE_NEW
static final int TYPE_BEFORE_NEWModel Change Type New- See Also:
-
TYPE_NEW
static final int TYPE_NEW- See Also:
-
CHANGETYPE_NEW
Deprecated.- See Also:
-
TYPE_AFTER_NEW
static final int TYPE_AFTER_NEW- See Also:
-
TYPE_AFTER_NEW_REPLICATION
static final int TYPE_AFTER_NEW_REPLICATION- See Also:
-
TYPE_BEFORE_CHANGE
static final int TYPE_BEFORE_CHANGEModel Change Type Change- See Also:
-
TYPE_CHANGE
static final int TYPE_CHANGE- See Also:
-
CHANGETYPE_CHANGE
Deprecated.- See Also:
-
TYPE_AFTER_CHANGE
static final int TYPE_AFTER_CHANGE- See Also:
-
TYPE_AFTER_CHANGE_REPLICATION
static final int TYPE_AFTER_CHANGE_REPLICATION- See Also:
-
TYPE_BEFORE_DELETE
static final int TYPE_BEFORE_DELETEModel Change Type Delete- See Also:
-
TYPE_DELETE
static final int TYPE_DELETE- See Also:
-
CHANGETYPE_DELETE
Deprecated.- See Also:
-
TYPE_AFTER_DELETE
static final int TYPE_AFTER_DELETE- See Also:
-
TYPE_BEFORE_DELETE_REPLICATION
static final int TYPE_BEFORE_DELETE_REPLICATION- See Also:
-
tableEventValidators
-
tableEventTopics
-
TIMING_BEFORE_PREPARE
static final int TIMING_BEFORE_PREPARECalled before document is prepared- See Also:
-
DOCTIMING_BEFORE_PREPARE
Deprecated.- See Also:
-
TIMING_BEFORE_VOID
static final int TIMING_BEFORE_VOIDCalled before document is void- See Also:
-
TIMING_BEFORE_CLOSE
static final int TIMING_BEFORE_CLOSECalled before document is close- See Also:
-
TIMING_BEFORE_REACTIVATE
static final int TIMING_BEFORE_REACTIVATECalled before document is reactivate- See Also:
-
TIMING_BEFORE_REVERSECORRECT
static final int TIMING_BEFORE_REVERSECORRECTCalled before document is reversecorrect- See Also:
-
TIMING_BEFORE_REVERSEACCRUAL
static final int TIMING_BEFORE_REVERSEACCRUALCalled before document is reverseaccrual- See Also:
-
TIMING_BEFORE_COMPLETE
static final int TIMING_BEFORE_COMPLETECalled before document is completed- See Also:
-
TIMING_AFTER_PREPARE
static final int TIMING_AFTER_PREPARECalled after document is prepared- See Also:
-
TIMING_AFTER_COMPLETE
static final int TIMING_AFTER_COMPLETECalled after document is completed- See Also:
-
DOCTIMING_AFTER_COMPLETE
Deprecated.- See Also:
-
TIMING_AFTER_VOID
static final int TIMING_AFTER_VOIDCalled after document is void- See Also:
-
TIMING_AFTER_CLOSE
static final int TIMING_AFTER_CLOSECalled after document is closed- See Also:
-
TIMING_AFTER_REACTIVATE
static final int TIMING_AFTER_REACTIVATECalled after document is reactivated- See Also:
-
TIMING_AFTER_REVERSECORRECT
static final int TIMING_AFTER_REVERSECORRECTCalled after document is reversecorrect- See Also:
-
TIMING_AFTER_REVERSEACCRUAL
static final int TIMING_AFTER_REVERSEACCRUALCalled after document is reverseaccrual- See Also:
-
TIMING_BEFORE_POST
static final int TIMING_BEFORE_POSTCalled before document is posted- See Also:
-
TIMING_AFTER_POST
static final int TIMING_AFTER_POSTCalled after document is posted- See Also:
-
documentEventValidators
-
documentEventTopics
-
-
Method Details
-
initialize
Initialize validator.- Parameters:
engine
- validation engineclient
- optional client. null for validator that's applicable to all client.
-
getAD_Client_ID
int getAD_Client_ID()Get Client to be monitored- Returns:
- AD_Client_ID or 0
-
login
User logged in. Called before preferences are set.- Parameters:
AD_Org_ID
- orgAD_Role_ID
- roleAD_User_ID
- user- Returns:
- error message or null
-
modelChange
Model change event of a Table.- Parameters:
po
- persistent objecttype
- TYPE_ event- Returns:
- error message or null
- Throws:
Exception
- if the recipient wishes the change to be not accept.
-
docValidate
Validate Document Action.
Called as first step of DocAction.prepareIt or at the end of DocAction.completeIt.
Note that totals, etc. may not be correct before the prepare stage.- Parameters:
po
- persistent objecttiming
- see TIMING_ constants- Returns:
- error message or null - if not null, the document will be marked as Invalid.
-