|
Compiere 3.1 | |||||||||
| 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 abstract String |
doIt()
Perform process. |
Object |
doIt(String className,
String methodName,
Object[] args)
Execute function |
protected Trx |
get_Trx()
Return the main transaction of the current process. |
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 |
Ctx |
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 abstract void |
prepare()
Prepare - e.g., get Parameters. |
protected void |
rollback()
Rollback |
boolean |
startProcess(Ctx 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(Ctx 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(Ctx, 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 CompiereUserError ("@FillMandatory@ @C_BankAccount_ID@");protected void commit()
protected void rollback()
protected boolean lockObject(PO po)
po - object
protected boolean isLocked()
protected boolean unlockObject()
public ProcessInfo getProcessInfo()
public Ctx 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()
protected Trx get_Trx()
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||