Package org.compiere.util
Class WebUser
java.lang.Object
org.compiere.util.WebUser
Web User Info.
Assumes that Email is a direct match.
UPDATE AD_User SET EMail=TRIM(EMail) WHERE Email<>TRIM(EMail)
- Version:
- $Id$
- Author:
- Jorg Janke
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WebUser
get
(Properties ctx, int AD_User_ID) Get user unconditional (from cache)static WebUser
get
(Properties ctx, String email) Get user unconditional from cachestatic WebUser
get
(Properties ctx, String email, String password, boolean useCache) Get userstatic WebUser
get
(javax.servlet.http.HttpServletRequest request) Get from requestint
int
Get LocationGet BP Bank Account (or create it)getBankAccount
(boolean requery) Get BP Bank Account (or create it)int
int
int
Get BP Location IDint
int
getCity()
Get Company Nameint
getEmail()
Get EMail address.Get EMail Verification CodegetFax()
int
getName()
Get PasswordSet Password MessagegetPhone()
Get (additional) Region nameint
Get Save Error MessageCredit Status Clear Text.getTaxID()
getTitle()
boolean
hasBPAccess
(String BPAccessType, Object[] params) boolean
Credit Status is Critical.boolean
Credit Status is Stop or Hold.boolean
boolean
Return Email Validation.boolean
Return Email Verification (reply).boolean
boolean
Is User Logged inboolean
Is Password OKboolean
boolean
isValid()
Return Valid.boolean
isVendor()
boolean
Log in with passwordvoid
logout()
Log in with oasswordboolean
save()
Save BPartner Objectsvoid
setAddress
(String address) void
setAddress2
(String address2) void
setBirthday
(Timestamp birthday) void
setC_BP_Group_ID
(int C_BP_Group_ID) void
setC_BP_Group_ID
(String C_BP_Group_ID) void
setC_Country_ID
(int C_Country_ID) void
setC_Country_ID
(String C_Country_ID) void
setC_Region_ID
(int C_Region_ID) void
setC_Region_ID
(String C_Region_ID) void
void
setCompany
(String company) void
setCountryName
(String country) void
void
setEMailVerifyCode
(String code, String info) Check and Set EMail Validation Code.void
void
setIsCustomer
(boolean isCustomer) void
void
Check and Save Passwordvoid
setPassword
(String password) Set Passwordvoid
setPasswordMessage
(String passwordMessage) Set Password Messagevoid
void
void
void
setRegionName
(String region) void
Set Save Error Messagevoid
void
void
toString()
Info
-
Field Details
-
NAME
Attribute Name - also in JSPs- See Also:
-
-
Method Details
-
get
Get from request- Parameters:
request
- request- Returns:
- web user if exists
-
get
Get user unconditional from cache- Parameters:
ctx
- contextemail
- email- Returns:
- web user
-
get
Get user- Parameters:
ctx
- contextemail
- emailpassword
- optional passworduseCache
- use cache- Returns:
- web user
-
get
Get user unconditional (from cache)- Parameters:
ctx
- contextAD_User_ID
- BP Contact- Returns:
- web user
-
isValid
public boolean isValid()Return Valid.- Returns:
- return true if found
-
isEMailValid
public boolean isEMailValid()Return Email Validation.- Returns:
- return true if email is valid
-
isEMailVerified
public boolean isEMailVerified()Return Email Verification (reply).- Returns:
- return true if reply received
-
toString
Info -
save
public boolean save()Save BPartner Objects- Returns:
- true if saved
-
setSaveErrorMessage
Set Save Error Message- Parameters:
msg
- message
-
getSaveErrorMessage
Get Save Error Message- Returns:
- message
-
getEmail
Get EMail address. used as jsp parameter- Returns:
- email address of contact
-
setEmail
-
getName
-
setName
-
setValue
-
getTitle
-
setTitle
-
getPassword
Get Password- Returns:
- password
-
setPassword
public void setPassword()Check and Save Password -
setPassword
Set Password- Parameters:
password
- new password
-
isPasswordOK
public boolean isPasswordOK()Is Password OK- Returns:
- true if OK
-
getPasswordMessage
Set Password Message- Returns:
- error message or null
-
setPasswordMessage
Set Password Message- Parameters:
passwordMessage
- message
-
login
Log in with password- Parameters:
password
- password- Returns:
- true if the user is logged in
-
logout
public void logout()Log in with oassword -
isLoggedIn
public boolean isLoggedIn()Is User Logged in- Returns:
- is the user logged in
-
getPhone
-
setPhone
-
getPhone2
-
setPhone2
-
getFax
-
setFax
-
getBirthday
-
setBirthday
-
getTaxID
-
setTaxID
-
getAD_Client_ID
public int getAD_Client_ID() -
getAD_User_ID
public int getAD_User_ID() -
getContactID
public int getContactID() -
getCompany
Get Company Name- Returns:
- company name
-
setCompany
-
getC_BPartner_ID
public int getC_BPartner_ID() -
getBpartnerID
public int getBpartnerID() -
getM_PriceList_ID
public int getM_PriceList_ID() -
getC_BPartner_Location_ID
public int getC_BPartner_Location_ID()Get BP Location ID- Returns:
- BP Loaction
-
getAddress
Get Location- Returns:
- location address
-
setAddress
-
getAddress2
-
setAddress2
-
getCity
-
setCity
-
getPostal
-
setPostal
-
getRegionName
Get (additional) Region name- Returns:
- location region name
-
setRegionName
-
getC_Region_ID
public int getC_Region_ID() -
getRegionID
-
setC_Region_ID
public void setC_Region_ID(int C_Region_ID) -
setC_Region_ID
-
getCountryName
-
setCountryName
-
getC_Country_ID
public int getC_Country_ID() -
getCountryID
-
setC_Country_ID
public void setC_Country_ID(int C_Country_ID) -
setC_Country_ID
-
setC_BP_Group_ID
public void setC_BP_Group_ID(int C_BP_Group_ID) -
setC_BP_Group_ID
-
isEmployee
public boolean isEmployee() -
isSalesRep
public boolean isSalesRep() -
isCustomer
public boolean isCustomer() -
setIsCustomer
public void setIsCustomer(boolean isCustomer) -
isVendor
public boolean isVendor() -
getSalesRep_ID
public int getSalesRep_ID() -
hasBPAccess
-
isCreditStopHold
public boolean isCreditStopHold()Credit Status is Stop or Hold. Used in Asset download- Returns:
- true if Stop/Hold
-
isCreditCritical
public boolean isCreditCritical()Credit Status is Critical. Used in Web UI- Returns:
- true if Stop/Hold/Watch
-
getSOCreditStatus
Credit Status Clear Text. Used in Web UI- Returns:
- Clear Text Credit Status
-
getBankAccount
Get BP Bank Account (or create it)- Returns:
- Bank Account
-
getBankAccount
Get BP Bank Account (or create it)- Parameters:
requery
- Requery data- Returns:
- Bank Account
-
getEMailVerifyCode
Get EMail Verification Code- Returns:
- verification code
-
setEMailVerifyCode
Check and Set EMail Validation Code.- Parameters:
code
- codeinfo
- info
-