Compiere 3.1

org.compiere.session
Class ServerBean

java.lang.Object
  extended by org.compiere.session.ServerBean
All Implemented Interfaces:
Serializable, EnterpriseBean, SessionBean

public class ServerBean
extends Object
implements SessionBean

Compiere Server Bean.

Version:
$Id: ServerBean.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Constructor Summary
ServerBean()
           
 
Method Summary
 int cacheReset(String tableName, int Record_ID)
          Cash Reset
 EMail createEMail(Ctx ctx, int AD_Client_ID, int AD_User_ID, String toEMail, String toName, String subject, String message)
          Create EMail from Server (Request User)
 EMail createEMail(Ctx ctx, int AD_Client_ID, String toEMail, String toName, String subject, String message)
          Create EMail from Server (Request User)
protected static void dumpSVUID(Class clazz)
          Dump SerialVersionUID of class
 void ejbActivate()
          Method ejbActivate
 void ejbCreate()
          Create the Session Bean
 void ejbPassivate()
          Method ejbPassivate
 void ejbRemove()
          Method ejbRemove
 String executeTask(int AD_Task_ID)
          Create EMail from Server (Request User)
 String getDocumentNo(int C_DocType_ID, String trxName)
          Get Document No based on Document Type
 String getDocumentNo(int AD_Client_ID, String TableName, String trxName)
          Get Document No from table
 int getNextID(int AD_Client_ID, String TableName, String trxName)
          Get next number for Key column = 0 is Error.
 String getStatus()
          Describes the instance and its content for debugging purpose
 GridWindowVO getWindowVO(Ctx ctx, int WindowNo, int AD_Window_ID, int AD_Menu_ID)
          Get and create Window Model Value Object
static void main(String[] args)
          Print UID of used classes.
 boolean paymentOnline(Ctx ctx, int C_Payment_ID, int C_PaymentProcessor_ID, String trxName)
          Online Payment from Server
 String postImmediate(Ctx ctx, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force, String trxName)
          Post Immediate
 ProcessInfo process(Ctx ctx, ProcessInfo pi)
          Process Remote
 RowSet pstmt_getRowSet(CStatementVO info)
          Get Prepared Statement ResultSet
 void setSessionContext(SessionContext aContext)
          Method setSessionContext
 int stmt_executeUpdate(CStatementVO info)
          Execute Update
 RowSet stmt_getRowSet(CStatementVO info)
          Get Statement ResultSet
 String toString()
          String Representation
 boolean updateLOB(String sql, int displayType, Object value)
          LOB update
 ProcessInfo workflow(Ctx ctx, ProcessInfo pi, int AD_Workflow_ID)
          Run Workflow (and wait) on Server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerBean

public ServerBean()
Method Detail

getWindowVO

public GridWindowVO getWindowVO(Ctx ctx,
                                int WindowNo,
                                int AD_Window_ID,
                                int AD_Menu_ID)
Get and create Window Model Value Object

Parameters:
ctx - Environment Properties
WindowNo - number of this window
AD_Window_ID - the internal number of the window, if not 0, AD_Menu_ID is ignored
AD_Menu_ID - ine internal menu number, used when AD_Window_ID is 0
Returns:
initialized Window Model

postImmediate

public String postImmediate(Ctx ctx,
                            int AD_Client_ID,
                            int AD_Table_ID,
                            int Record_ID,
                            boolean force,
                            String trxName)
Post Immediate

Parameters:
ctx - Client Context
AD_Client_ID - Client ID of Document
AD_Table_ID - Table ID of Document
Record_ID - Record ID of this document
force - force posting
trxName - transaction
Returns:
null, if success or error message

pstmt_getRowSet

public RowSet pstmt_getRowSet(CStatementVO info)
                       throws NotSerializableException
Get Prepared Statement ResultSet

Parameters:
info - Result info
Returns:
RowSet
Throws:
NotSerializableException

stmt_getRowSet

public RowSet stmt_getRowSet(CStatementVO info)
Get Statement ResultSet

Parameters:
info - Result info
Returns:
RowSet

stmt_executeUpdate

public int stmt_executeUpdate(CStatementVO info)
Execute Update

Parameters:
info - Result info
Returns:
row count

getNextID

public int getNextID(int AD_Client_ID,
                     String TableName,
                     String trxName)
Get next number for Key column = 0 is Error.

Parameters:
AD_Client_ID - client
TableName - table name
trxName - optional Transaction Name
Returns:
next no

getDocumentNo

public String getDocumentNo(int AD_Client_ID,
                            String TableName,
                            String trxName)
Get Document No from table

Parameters:
AD_Client_ID - client
TableName - table name
trxName - optional Transaction Name
Returns:
document no or null

getDocumentNo

public String getDocumentNo(int C_DocType_ID,
                            String trxName)
Get Document No based on Document Type

Parameters:
C_DocType_ID - document type
trxName - optional Transaction Name
Returns:
document no or null

process

public ProcessInfo process(Ctx ctx,
                           ProcessInfo pi)
Process Remote

Parameters:
ctx - Context
pi - Process Info
Returns:
resulting Process Info

workflow

public ProcessInfo workflow(Ctx ctx,
                            ProcessInfo pi,
                            int AD_Workflow_ID)
Run Workflow (and wait) on Server

Parameters:
ctx - Context
pi - Process Info
AD_Workflow_ID - id
Returns:
process info

paymentOnline

public boolean paymentOnline(Ctx ctx,
                             int C_Payment_ID,
                             int C_PaymentProcessor_ID,
                             String trxName)
Online Payment from Server

Parameters:
ctx - Context
C_Payment_ID - payment
C_PaymentProcessor_ID - processor
trxName - transaction
Returns:
true if approved

createEMail

public EMail createEMail(Ctx ctx,
                         int AD_Client_ID,
                         String toEMail,
                         String toName,
                         String subject,
                         String message)
Create EMail from Server (Request User)

Parameters:
ctx - Context
AD_Client_ID - client
toEMail - recipient email address
subject - subject
message - message
Returns:
EMail

createEMail

public EMail createEMail(Ctx ctx,
                         int AD_Client_ID,
                         int AD_User_ID,
                         String toEMail,
                         String toName,
                         String subject,
                         String message)
Create EMail from Server (Request User)

Parameters:
ctx - Context
AD_Client_ID - client
AD_User_ID - user to send email from
toEMail - recipient email address
subject - subject
message - message
Returns:
EMail or null

executeTask

public String executeTask(int AD_Task_ID)
Create EMail from Server (Request User)

Parameters:
AD_Task_ID - task
Returns:
execution trace

cacheReset

public int cacheReset(String tableName,
                      int Record_ID)
Cash Reset

Parameters:
tableName - table name
Record_ID - record or 0 for all
Returns:
number of records reset

updateLOB

public boolean updateLOB(String sql,
                         int displayType,
                         Object value)
LOB update

Parameters:
sql - table name
displayType - display type (i.e. BLOB/CLOB)
value - the data
Returns:
true if updated

getStatus

public String getStatus()
Describes the instance and its content for debugging purpose

Returns:
Debugging information about the instance and its content

toString

public String toString()
String Representation

Overrides:
toString in class Object
Returns:
info

ejbCreate

public void ejbCreate()
               throws EJBException,
                      CreateException
Create the Session Bean

Throws:
EJBException
CreateException

setSessionContext

public void setSessionContext(SessionContext aContext)
                       throws EJBException
Method setSessionContext

Specified by:
setSessionContext in interface SessionBean
Parameters:
aContext - SessionContext
Throws:
EJBException
See Also:
SessionBean.setSessionContext(SessionContext)

ejbActivate

public void ejbActivate()
                 throws EJBException
Method ejbActivate

Specified by:
ejbActivate in interface SessionBean
Throws:
EJBException
See Also:
SessionBean.ejbActivate()

ejbPassivate

public void ejbPassivate()
                  throws EJBException
Method ejbPassivate

Specified by:
ejbPassivate in interface SessionBean
Throws:
EJBException
See Also:
SessionBean.ejbPassivate()

ejbRemove

public void ejbRemove()
               throws EJBException
Method ejbRemove

Specified by:
ejbRemove in interface SessionBean
Throws:
EJBException
See Also:
SessionBean.ejbRemove()

dumpSVUID

protected static void dumpSVUID(Class clazz)
Dump SerialVersionUID of class

Parameters:
clazz - class

main

public static void main(String[] args)
Print UID of used classes. R2.5.1h org.compiere.process.ProcessInfo == static final long serialVersionUID = -1993220053515488725L; org.compiere.util.CStatementVO == static final long serialVersionUID = -3393389471515956399L; org.compiere.model.MQuery == static final long serialVersionUID = 1511402030597166113L; org.compiere.model.POInfo == static final long serialVersionUID = -5976719579744948419L; org.compiere.model.POInfoColumn == static final long serialVersionUID = -3983585608504631958L; org.compiere.model.MWindowVO == static final long serialVersionUID = 3802628212531678981L; org.compiere.model.MTabVO == static final long serialVersionUID = 9160212869277319305L; org.compiere.model.MFieldVO == static final long serialVersionUID = 4385061125114436797L; org.compiere.model.MLookupInfo == static final long serialVersionUID = -7958664359250070233L; * @param args ignored


Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.