Class WebUser

java.lang.Object
org.compiere.util.WebUser

public class WebUser extends Object
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 Details

  • Method Details

    • get

      public static WebUser get(javax.servlet.http.HttpServletRequest request)
      Get from request
      Parameters:
      request - request
      Returns:
      web user if exists
    • get

      public static WebUser get(Properties ctx, String email)
      Get user unconditional from cache
      Parameters:
      ctx - context
      email - email
      Returns:
      web user
    • get

      public static WebUser get(Properties ctx, String email, String password, boolean useCache)
      Get user
      Parameters:
      ctx - context
      email - email
      password - optional password
      useCache - use cache
      Returns:
      web user
    • get

      public static WebUser get(Properties ctx, int AD_User_ID)
      Get user unconditional (from cache)
      Parameters:
      ctx - context
      AD_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

      public String toString()
      Info
      Overrides:
      toString in class Object
      Returns:
      info
    • save

      public boolean save()
      Save BPartner Objects
      Returns:
      true if saved
    • setSaveErrorMessage

      public void setSaveErrorMessage(String msg)
      Set Save Error Message
      Parameters:
      msg - message
    • getSaveErrorMessage

      public String getSaveErrorMessage()
      Get Save Error Message
      Returns:
      message
    • getEmail

      public String getEmail()
      Get EMail address. used as jsp parameter
      Returns:
      email address of contact
    • setEmail

      public void setEmail(String email)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • setValue

      public void setValue(String value)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getPassword

      public String getPassword()
      Get Password
      Returns:
      password
    • setPassword

      public void setPassword()
      Check and Save Password
    • setPassword

      public void setPassword(String password)
      Set Password
      Parameters:
      password - new password
    • isPasswordOK

      public boolean isPasswordOK()
      Is Password OK
      Returns:
      true if OK
    • getPasswordMessage

      public String getPasswordMessage()
      Set Password Message
      Returns:
      error message or null
    • setPasswordMessage

      public void setPasswordMessage(String passwordMessage)
      Set Password Message
      Parameters:
      passwordMessage - message
    • login

      public boolean login(String password)
      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

      public String getPhone()
    • setPhone

      public void setPhone(String phone)
    • getPhone2

      public String getPhone2()
    • setPhone2

      public void setPhone2(String phone2)
    • getFax

      public String getFax()
    • setFax

      public void setFax(String fax)
    • getBirthday

      public Timestamp getBirthday()
    • setBirthday

      public void setBirthday(Timestamp birthday)
    • getTaxID

      public String getTaxID()
    • setTaxID

      public void setTaxID(String taxID)
    • getAD_Client_ID

      public int getAD_Client_ID()
    • getAD_User_ID

      public int getAD_User_ID()
    • getContactID

      public int getContactID()
    • getCompany

      public String getCompany()
      Get Company Name
      Returns:
      company name
    • setCompany

      public void setCompany(String company)
    • 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

      public String getAddress()
      Get Location
      Returns:
      location address
    • setAddress

      public void setAddress(String address)
    • getAddress2

      public String getAddress2()
    • setAddress2

      public void setAddress2(String address2)
    • getCity

      public String getCity()
    • setCity

      public void setCity(String city)
    • getPostal

      public String getPostal()
    • setPostal

      public void setPostal(String postal)
    • getRegionName

      public String getRegionName()
      Get (additional) Region name
      Returns:
      location region name
    • setRegionName

      public void setRegionName(String region)
    • getC_Region_ID

      public int getC_Region_ID()
    • getRegionID

      public String getRegionID()
    • setC_Region_ID

      public void setC_Region_ID(int C_Region_ID)
    • setC_Region_ID

      public void setC_Region_ID(String C_Region_ID)
    • getCountryName

      public String getCountryName()
    • setCountryName

      public void setCountryName(String country)
    • getC_Country_ID

      public int getC_Country_ID()
    • getCountryID

      public String getCountryID()
    • setC_Country_ID

      public void setC_Country_ID(int C_Country_ID)
    • setC_Country_ID

      public void setC_Country_ID(String C_Country_ID)
    • setC_BP_Group_ID

      public void setC_BP_Group_ID(int C_BP_Group_ID)
    • setC_BP_Group_ID

      public void setC_BP_Group_ID(String C_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

      public boolean hasBPAccess(String BPAccessType, Object[] params)
    • 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

      public String getSOCreditStatus()
      Credit Status Clear Text. Used in Web UI
      Returns:
      Clear Text Credit Status
    • getBankAccount

      public MBPBankAccount getBankAccount()
      Get BP Bank Account (or create it)
      Returns:
      Bank Account
    • getBankAccount

      public MBPBankAccount getBankAccount(boolean requery)
      Get BP Bank Account (or create it)
      Parameters:
      requery - Requery data
      Returns:
      Bank Account
    • getEMailVerifyCode

      public String getEMailVerifyCode()
      Get EMail Verification Code
      Returns:
      verification code
    • setEMailVerifyCode

      public void setEMailVerifyCode(String code, String info)
      Check and Set EMail Validation Code.
      Parameters:
      code - code
      info - info