|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.process.SvrProcess
public abstract class SvrProcess
Server Process Template
| Field Summary | |
|---|---|
protected CLogger |
log
Logger |
protected static String |
MSG_InvalidArguments
|
protected static String |
MSG_SaveErrorRowNotFound
Common Error Message |
| Constructor Summary | |
|---|---|
SvrProcess()
Server Process. |
|
| Method Summary | |
|---|---|
void |
addLog(int id,
Timestamp date,
BigDecimal number,
String msg)
Add Log Entry |
void |
addLog(String msg)
Add Log |
protected void |
commit()
Commit |
protected void |
commitEx()
Commit and throw exception if error |
protected abstract String |
doIt()
Perform process. |
Object |
doIt(String className,
String methodName,
Object[] args)
Execute function |
protected String |
get_TrxName()
Return the main transaction of the current process. |
protected int |
getAD_Client_ID()
Get AD_User_ID |
protected int |
getAD_PInstance_ID()
Get Process Instance |
protected int |
getAD_User_ID()
Get AD_User_ID |
Properties |
getCtx()
Get Properties |
protected String |
getName()
Get Name/Title |
protected ProcessInfoParameter[] |
getParameter()
Get Parameter |
ProcessInfo |
getProcessInfo()
Get Process Info |
protected int |
getRecord_ID()
Get Record_ID |
protected int |
getTable_ID()
Get Table_ID |
protected boolean |
isLocked()
Is an object Locked? |
protected boolean |
lockObject(PO po)
Lock Object. |
protected void |
postProcess(boolean success)
Post process actions (outside trx). |
protected abstract void |
prepare()
Prepare - e.g., get Parameters. |
protected void |
rollback()
Rollback |
boolean |
startProcess(Properties ctx,
ProcessInfo pi,
Trx trx)
Start the process. |
protected boolean |
unlockObject()
Unlock Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CLogger log
protected static String MSG_SaveErrorRowNotFound
protected static String MSG_InvalidArguments
| Constructor Detail |
|---|
public SvrProcess()
| Method Detail |
|---|
public final boolean startProcess(Properties ctx,
ProcessInfo pi,
Trx trx)
process.
It should only return false, if the function could not be performed
as this causes the process to abort.
startProcess in interface ProcessCallctx - Contextpi - Process Infotrx - transaction
ProcessCall.startProcess(Properties, ProcessInfo, Trx)protected abstract void prepare()
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("A_Asset_Group_ID"))
p_A_Asset_Group_ID = para[i].getParameterAsInt();
else if (name.equals("GuaranteeDate"))
p_GuaranteeDate = (Timestamp)para[i].getParameter();
else if (name.equals("AttachAsset"))
p_AttachAsset = "Y".equals(para[i].getParameter());
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
protected abstract String doIt()
throws Exception
Exception - if not successful e.g.
throw new AdempiereUserError ("@FillMandatory@ @C_BankAccount_ID@");protected void postProcess(boolean success)
success - true if the process was successprotected void commit()
protected void commitEx()
throws SQLException
SQLException - on commit errorprotected void rollback()
protected boolean lockObject(PO po)
po - object
protected boolean isLocked()
protected boolean unlockObject()
public ProcessInfo getProcessInfo()
public Properties getCtx()
protected String getName()
protected int getAD_PInstance_ID()
protected int getTable_ID()
protected int getRecord_ID()
protected int getAD_User_ID()
protected int getAD_Client_ID()
protected ProcessInfoParameter[] getParameter()
public void addLog(int id,
Timestamp date,
BigDecimal number,
String msg)
date - date or nullid - record id or 0number - number or nullmsg - message or nullpublic void addLog(String msg)
msg - message
public Object doIt(String className,
String methodName,
Object[] args)
className - classmethodName - methodargs - arguments
protected String get_TrxName()
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||