Package org.idempiere.adinterface
Class CompiereService
java.lang.Object
org.idempiere.adinterface.CompiereService
- Author:
- deepak, hengsin
-
Field Summary
Modifier and TypeFieldDescriptionLocalized Date formatJDBC Date formatfinal String
Localized Timestamp formatJDBC Timestamp formatLocalized Time formatJDBC Time format -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
setup requestvoid
Increase connect countvoid
cleanup requeststatic CompiereService
get
(javax.servlet.http.HttpServletRequest req, org.idempiere.adInterface.x10.ADLoginRequest loginRequest) int
int
int
int
getCtx()
int
int
boolean
boolean
login
(int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int M_Warehouse_ID, String Lang) void
void
setExpiryMinutes
(int expiryMinutes) void
setIPAddress
(String remoteAddr) void
setPassword
(String pass)
-
Field Details
-
dateFormat
Localized Date format -
dateFormatJDBC
JDBC Date format -
dateTimeFormat
Localized Timestamp format -
dateTimeFormatJDBC
JDBC Timestamp format -
timeFormat
Localized Time format -
timeFormatJDBC
JDBC Time format -
dateFormatOnlyForCtx
- See Also:
-
-
Constructor Details
-
CompiereService
public CompiereService()default constructor
-
-
Method Details
-
getAD_Client_ID
public int getAD_Client_ID()- Returns:
- AD_Client_ID of current request
-
getAD_Org_ID
public int getAD_Org_ID()- Returns:
- AD_Org_ID of current request
-
getCtx
- Returns:
- context of current request
-
connect
public void connect()setup request -
connectCacheInstance
public void connectCacheInstance()Increase connect count -
disconnect
public void disconnect()cleanup request -
getLanguage
- Returns:
- Language of current request
-
isLoggedIn
public boolean isLoggedIn()- Returns:
- true if already logged in
-
login
public boolean login(int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int M_Warehouse_ID, String Lang) - Parameters:
AD_User_ID
-AD_Role_ID
-AD_Client_ID
-AD_Org_ID
-M_Warehouse_ID
-Lang
-- Returns:
- true if login is successful
-
getAD_User_ID
public int getAD_User_ID()- Returns:
- AD_User_ID of current request
-
getAD_Role_ID
public int getAD_Role_ID()- Returns:
- AD_Role_ID of current request
-
getLocale
- Returns:
- locale code of current request
-
getM_Warehouse_ID
public int getM_Warehouse_ID()- Returns:
- M_Warehouse_ID of current request
-
getUserName
- Returns:
- logged in user name of current request
-
setPassword
- Parameters:
pass
-
-
getPassword
- Returns:
- logged in password of current request
-
setExpiryMinutes
public void setExpiryMinutes(int expiryMinutes) - Parameters:
expiryMinutes
-
-
getExpiryMinutes
public int getExpiryMinutes()- Returns:
- logged in expiry minutes of current request
-
refreshLastAuthorizationTime
public void refreshLastAuthorizationTime() -
setIPAddress
-
get
public static CompiereService get(javax.servlet.http.HttpServletRequest req, org.idempiere.adInterface.x10.ADLoginRequest loginRequest)
-