|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.util.Login
public class Login
Login Manager
| Constructor Summary | |
|---|---|
Login(Ctx ctx)
Login |
|
| Method Summary | |
|---|---|
boolean |
batchLogin()
Batch Login with system date |
boolean |
batchLogin(Timestamp loginDate,
String printerName)
Batch Login using Ini values
Compiere.startup(true);
Ini.setProperty(Ini.P_UID,"SuperUser");
Ini.setProperty(Ini.P_PWD,"System");
Ini.setProperty(Ini.P_ROLE,"GardenAdmin");
Ini.setProperty(Ini.P_CLIENT, "Garden World");
Ini.setProperty(Ini.P_ORG,"HQ");
Ini.setProperty(Ini.P_WAREHOUSE,"HQ");
Ini.setProperty(Ini.P_LANGUAGE,"English");
Login login = new Login(Env.getCtx());
login.batchLogin();
|
int |
getAD_Role_ID()
Get Role |
int |
getAD_User_ID()
Get User |
KeyNamePair[] |
getClients(KeyNamePair role)
Load Clients. |
KeyNamePair[] |
getOrgs(KeyNamePair client)
Load Organizations. |
Principal |
getPrincipal()
Get SSO Principal |
KeyNamePair[] |
getRoles()
Attempt to change roles using a previously authenticated Login. |
protected KeyNamePair[] |
getRoles(CConnection cc,
String app_user,
String app_pwd,
boolean force)
(Test) Client Login. |
KeyNamePair[] |
getRoles(Principal app_user)
(Web) Client Login. |
KeyNamePair[] |
getRoles(String app_user,
String app_pwd)
Client Login. |
KeyNamePair[] |
getRoles(String app_user,
String app_pwd,
int W_Store_ID)
Client Login. |
KeyNamePair[] |
getWarehouses(KeyNamePair org)
Load Warehouses |
static Ctx |
initTest(boolean isClient)
Test Init - Set Environment for tests |
static boolean |
isJavaOK(boolean isClient)
Java Version Test |
String |
loadPreferences(KeyNamePair org,
KeyNamePair warehouse,
Timestamp timestamp,
String printerName)
Load Preferences into Context for selected client. |
Locale |
setLanguage(String langInfo)
Set Language |
String |
validateLogin(KeyNamePair org)
Validate Login. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Login(Ctx ctx)
ctx - context| Method Detail |
|---|
public static Ctx initTest(boolean isClient)
isClient - client session
public static boolean isJavaOK(boolean isClient)
isClient - client connection
protected KeyNamePair[] getRoles(CConnection cc,
String app_user,
String app_pwd,
boolean force)
- Get Connection - Compare User info
Sets Context with login info
cc - connectionapp_user - userapp_pwd - pwdforce - ignore pwd
public KeyNamePair[] getRoles(Principal app_user)
Compare User Info
Sets Context with login info
app_user - Principal
public KeyNamePair[] getRoles()
public KeyNamePair[] getRoles(String app_user,
String app_pwd)
Compare User Info
Sets Conext with login info
app_user - user idapp_pwd - password
public KeyNamePair[] getRoles(String app_user,
String app_pwd,
int W_Store_ID)
Compare User Info
Sets Conext with login info
app_user - user id (email or normal)app_pwd - passwordW_Store_ID - web store
public int getAD_Role_ID()
public int getAD_User_ID()
public KeyNamePair[] getClients(KeyNamePair role)
Sets Role info in context and loads its clients
role - role information
public KeyNamePair[] getOrgs(KeyNamePair client)
Sets Client info in context and loads its organization, the role has access to
client - client information
public KeyNamePair[] getWarehouses(KeyNamePair org)
org - organization
public String validateLogin(KeyNamePair org)
org - log-in org
public String loadPreferences(KeyNamePair org,
KeyNamePair warehouse,
Timestamp timestamp,
String printerName)
Sets Org info in context and loads relevant field from - AD_Client/Info, - C_AcctSchema, - C_AcctSchema_Elements - AD_Preference
Assumes that the context is set for #AD_Client_ID, ##AD_User_ID, #AD_Role_ID
org - org informationwarehouse - optional warehouse informationtimestamp - optional dateprinterName - optional printer info
public boolean batchLogin(Timestamp loginDate,
String printerName)
Compiere.startup(true);
Ini.setProperty(Ini.P_UID,"SuperUser");
Ini.setProperty(Ini.P_PWD,"System");
Ini.setProperty(Ini.P_ROLE,"GardenAdmin");
Ini.setProperty(Ini.P_CLIENT, "Garden World");
Ini.setProperty(Ini.P_ORG,"HQ");
Ini.setProperty(Ini.P_WAREHOUSE,"HQ");
Ini.setProperty(Ini.P_LANGUAGE,"English");
Login login = new Login(Env.getCtx());
login.batchLogin();
loginDate - optional login dateprinterName - optional printer name
public Locale setLanguage(String langInfo)
langInfo - language (en) or locale (en-US) or display name (English)
public boolean batchLogin()
public Principal getPrincipal()
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||