package ibase.utility;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Field;

import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
//Changed By Rupali on 27/03/2008.[To add the Email ID in UserInfo].Request ID:-[BI78SUN047]

public class UserInfoBean implements Serializable
{
	private String loginCode;
	private String loginPwd;
	//Changed By Pankaj T. on 21-10-19 set USER_CODE, MOBILE_NO, EMAIL_ID of user in userInfo - start
	private String loginUserId;
	private String loginMobileNo;
	private String loginEmailId;
	//Changed By Pankaj T. on 21-10-19 set USER_CODE, MOBILE_NO, EMAIL_ID of user in userInfo - end
	private String profileId;
	private String siteCode;
	private String siteDescr;
	private String empCode;
	private String empName;
	private String empFName;
	private String empLName;
	private String empMName;
	private String reportTo;
	private String deptCode;
	private String deptDescr;
	private String emailIdOff;
	private String entityCode;
	private String userLevel;
	private String userType;
	private String itemSer;
	private String isBiUser;
	private String deviceID;
	//Added by Sainath on 20/09/18 [add deviceType in userInfo]
	private String deviceType;
	private String enterprise; // Added by Pankaj R to show logo on to left side
	private String socialOpt;
	//Added by Sagar B. to show descr in slide menu panel[18-Sep-18]START
    private String enterpriseDescr;
    //Added By Vikas Lagad on 07-10-20[set IN_MEMORY credential in userInfo] Start
    private String inMemUserName;
	private String inMemPassword;
    private String inMemUrl;
    private String sessTimeoutInSecs; //Added by Jatin M on 24-Jun-2022 [To set prior session timeout in UserInfoBean]
    //Added By Vikas Lagad on 07-10-20 [set IN_MEMORY credential in userInfo] End
    
    // Added by Gagan B. on 25-07-22 [getter and setter for docServerID] [START]
    private String docServerID;
    public String getDocServerID() 
    {
		return docServerID;
	}

	public void setDocServerID(String docServerID) 
	{
		this.docServerID = docServerID;
	}
	// Added by Gagan B. on 25-07-22 [getter and setter for docServerID] [END]
	
	// Added by Gagan B. on 28-07-22 [getter and setter for smtpFallback] [START]
	private String smtpFallback;
    
	public String getSmtpFallback() 
	{       
		return smtpFallback;
	}

	public void setSmtpFallback(String smtpFallback) 
	{
		this.smtpFallback = smtpFallback;  
	}
	// Added by Gagan B. on 28-07-22 [getter and setter for smtpFallback] [END]

	public String getEnterpriseDescr() {
		return enterpriseDescr;
	}

	public void setEnterpriseDescr(String enterpriseDescr) {
		this.enterpriseDescr = enterpriseDescr;
	}
	//Added by Sagar B. to show descr in slide menu panel[18-Sep-18]END
	private String city; //added by shrutika on 05-02-18 for getting city in change site.
	private String fin_entity; //added by shrutika on 14-02-18 for getting fin_entity in change site.
	//added by Pratheek on 29-02-19 [for getting facility_code value when login or change site]-Start
	private String facility_code;
	//added by Pratheek on 29-01-19 [for getting facility_code value when login or change site]-End

	// Added by Abhishek on 11.03.2016 [Req ID : S15LBAS004 Authentication changes ] START
	private String entryType;
	private String entryId;
	// Added by Abhishek on 11.03.2016 [Req ID : S15LBAS004 Authentication changes ] END

	//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - start
	private String smtpHost;
	private String smtpPort;
	private String smtpUser;
	private String smtpPassWD;
	private String smtpProtocolType;
	private String smtpMailFrom;
	private String adminEmailId;
	
	public String getSmtpHost() {
		return smtpHost;
	}

	public void setSmtpHost(String smtpHost) {
		this.smtpHost = smtpHost;
	}

	public String getSmtpPort() {
		return smtpPort;
	}

	public void setSmtpPort(String smtpPort) {
		this.smtpPort = smtpPort;
	}

	public String getSmtpUser() {
		return smtpUser;
	}

	public void setSmtpUser(String smtpUser) {
		this.smtpUser = smtpUser;
	}

	public String getSmtpPassWD() {
		return smtpPassWD;
	}

	public void setSmtpPassWD(String smtpPassWD) {
		this.smtpPassWD = smtpPassWD;
	}

	public String getSmtpProtocolType() {
		return smtpProtocolType;
	}

	public void setSmtpProtocolType(String smtpProtocolType) {
		this.smtpProtocolType = smtpProtocolType;
	}

	public String getSmtpMailFrom() {
		return smtpMailFrom;
	}

	public void setSmtpMailFrom(String smtpMailFrom) {
		this.smtpMailFrom = smtpMailFrom;
	}
	
	public String getAdminEmailId() {
		return adminEmailId;
	}

	public void setAdminEmailId(String adminEmailId) {
		this.adminEmailId = adminEmailId;
	}
	//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - end
	// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] START
	private String userName;

	// Added by Sandeshs 23-Feb-2016 [Req:S15KBAS001] START
	private String isPasswordStore;
	// Added by Sandeshs 23-Feb-2016 [Req:S15KBAS001] END

	// Added by Sandeshs 21-Jun-2016 [Req:W15BSUN011] START
	private String defaultMenu;
	// Added by Sandeshs 21-jun-2016 [Req:W15BSUN011] END

	//Added By Suraj on 20-march-2017 [To configure footer options in slide menu panel ]Start
	private String features;
	//Added By Suraj on 20-march-2017 [To configure footer options in slide menu panel ]End
	private String charEnc = CommonConstants.ENCODING;
	//Changed by Madhup on 10/02/07
	private String remoteHost = "SYSTEM";
	//Added by Nilesh on 21-Mar-2011[MF01SUN037][Add remote host name]
	private String remoteHostName = "";

	//Changed by Pragyan to add resource profile id.
	private String profileIdRes;

	//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007]
	//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
	private String stanCode;
	private String designation;
	private String dateJoin;
	private String division;
	//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
	//Changed by Pramod on 08-01-11[WS01SUN030 ||Generating country wise, language wise xsl and reading the same.For setting and getting user language and country]starts
	//Change by Nilesh on 21-Mar-2011 [WS01SUN062][Add language & country into userInfo]Start
	//private String user_language="en";
	//private String user_country="US";
	private String userLanguage;
	private String userCountry;
	//Change by Nilesh on 21-Mar-2011 [WS01SUN062][Add language & country into userInfo]End
	//Changed by Pramod on 08-01-11[WS01SUN030 ||Generating country wise, language wise xsl and reading the same.For setting and getting user language and country]Ends

	private String loggerType="";

	//Added By Shahu Mali on 08-10-13.[WS3GBAS001]
	private String transDB="";

	//Added by Prajyot 18MAR2014[Theme Implementation.]
	private String userTheme;
	private String uxInterface;//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]

	//Added by Dnyaneshwar Chavan on 4-Apr-14 [Add timeZone Data member in user info been as per Danish sir  ] Start
	private String timeZone;

	private String hostName = "";
	private String hostIP = "";

	//Added By Prajyot on 05-JUN-2015 [To Set Profile Description] Starts
	private String profileDescr;

	//Added by Reema on 11-sep-15 [get users geoFence value]-start
	/**This variable store the User Geo Fence value*/
	private String userGeoFence = "";
	//Added by Reema on 11-sep-15 [get users geoFence value]-End

	//Added By Prajyot on 05-JUN-2015 [Request ID : W15BMIT003 - Set Current Geo Position in Login trace and USER_INFO.]
	private String currentGeoPOS = "";
	//Added By Ajinkya on 10-MAR-2017 [ Set Current Data Mode in Login trace and USER_INFO.]
	private String dataMode = "";

	//Added by Sagar B. to track GPS configuration on user level on [11-JAN-18]START
	private String geoPosOption = "0";		//Sets the value from <enterprise value from ENTERPIZE column of USERS table>.xml from IBASEHOME Tag:<GEO_POS_OPTION>
	//Added by Sagar B. to track GPS configuration on user level on [11-JAN-18]END

	private String currentGeoPOSName = ""; //Added by Sagar B. to track address of current geopos and store in table[10-Apr-18]
	//Added by Sagar B. to store accuracy of current geopos and store in table[20-Jul-18]START
	private String geoPosAccuracy = "";

	public String getGeoPosAccuracy() {
		return geoPosAccuracy;
	}

	public void setGeoPosAccuracy(String geoPosAccuracy) {
		this.geoPosAccuracy = geoPosAccuracy;
	}
	//Added by Sagar B. to store accuracy of current geopos and store in table[20-Jul-18]END
	//Changed by Sandeep S. on 24-JAN-17 [To check session exist or not for same user on same or on another machine] Start
	private String logInInterface = "";

	public String getLogInInterface() {
		return logInInterface;
	}

	public void setLogInInterface(String logInInterface) {
		this.logInInterface = logInInterface;
	}
	//Changed by Sandeep S. on 24-JAN-17 [To check session exist or not for same user on same or on another machine] End

	//added by shrutika [Start] on 05-02-18 for getting city in case of change site.
	public String getCity()
	{
		return city;
	}

	public void setCity(String city)
	{
		this.city = city;
	}
	//added by shrutika [End] on 05-02-18 for getting city in case of change site.
	//Added By Pankaj T. on 14-04-20 to set unique id as a termId in userInfo & this termId in chg_term column - start
	private String termId;
	
	public String getTermId() {
		return termId;
	}
	public void setTermId(String termId) {
		this.termId = termId;
	}
	//Added By Pankaj T. on 14-04-20 to set unique id as a termId in userInfo & this termId in chg_term column - end
	//Added by shrutika [start] on 26-10-18 for display change ip and mac address in audit trail.
	private String macAddress;
	private String remoteAddress;
	public String getRemoteAddress() {
		return remoteAddress;
	}

	public void setRemoteAddress(String remoteAddress) {
		this.remoteAddress = remoteAddress;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}
	//Added by shrutika [end] on 26-10-18 for display change ip and mac address in audit trail.
	//Added by Sagar B. to set network configuration[07-Feb-19]START
	private String userNetworkOption = "1";
	
	public String getUserNetworkOption() {
		return userNetworkOption;
	}

	public void setUserNetworkOption(String userNetworkOption) {
		this.userNetworkOption = userNetworkOption;
	}
	//Added by Sagar B. to set network configuration[07-Feb-19]END

	//Added by shrutika on 10-10-19 [Start] for avoid server call for getting all user prefrance value.
	private String userPrefList = "";
	public String getUserPrefList() {
		return userPrefList;
	}

	public void setUserPrefList(String userPrefList) {
		this.userPrefList = userPrefList;
	}
    //Added by shrutika on 10-10-19 [End] for avoid server call for getting all user prefrance value.
     //Added by Pankajt T on 14-09-2020 for The user icon which shows detail information about user should also show Login using User id/Mobile/email and user_id/mobile/email value
    private String authenticatedUsing = "";
	public String getAuthenticatedUsing() {
		return authenticatedUsing;
	}

	public void setAuthenticatedUsing(String authenticatedUsing) {
		this.authenticatedUsing = authenticatedUsing;
    }
    
    //Added By Vikas Lagad on 07-10-20[set IN_MEMORY credential in userInfo] Start
    public String getInMemUserName() {
		return inMemUserName;
	}

	public void setInMemUserName(String inMemUserName) {
		this.inMemUserName = inMemUserName;
	}

	public String getInMemPassword() {
		return inMemPassword;
	}

	public void setInMemPassword(String inMemPassword) {
		this.inMemPassword = inMemPassword;
	}

	public String getInMemUrl() {
		return inMemUrl;
	}

	public void setInMemUrl(String inMemUrl) {
		this.inMemUrl = inMemUrl;
    }
    //Added By Vikas Lagad on 07-10-20[set IN_MEMORY credential in userInfo] End

    //Added by Pankajt T on 14-09-2020 for The user icon which shows detail information about user should also show Login using User id/Mobile/email and user_id/mobile/email value	
	public UserInfoBean()
	{
		//Commented By Ravindra C on 06-09-18 for prevent SYSOUT.
		//BaseLogger.log("9",null,null, "UserInfoBean Creation invoked....." );
	}

	public UserInfoBean(String[] user, boolean isAuthentic)throws BaseException
	{
		//CommonDBAccessHome home = null;
		//CommonDBAccess ejbObj = null;
		String profileId = null;

		String password;
		//try
		//{
			/*if(!isAuthentic)
			{
				BaseLogger.log("9",null,null,"Authenticating User");
				LoginBean loginBean = new LoginBean();
				if(loginBean.isUserAuthenticate(user[0], user[1], null));
				BaseLogger.log("9",null,null,"User Authenticated");
			}*/
			/*AppConnectParm appConnect = new AppConnectParm();
			Properties p = appConnect.getProperty();
			InitialContext ctx = new InitialContext(p);
			BaseLogger.log("9",null,null,"Looking Up for DBAccess EJB with Properties==>\n"+p);
			home = (CommonDBAccessHome)ctx.lookup("CommonDBAccess");
			ejbObj = home.create();
			profileId = ejbObj.getProfileId(user[0]);

			if (profileId != null && profileId.length() > 0)
			{
				setProfileId(profileId);
			}
		}
		catch(Exception e)
		{
			BaseLogger.log("9",null,null,"Exception: UserInfoBean: UserInfoBean: ==>while setting profile id\n"+e);	e.printStackTrace();
			throw new BaseException(e);
		}*/
	}

	public UserInfoBean(String[] user, String siteCode, boolean isAuthentic)throws BaseException
	{
		/*String emp[] = new String[7];
		String password;
		try
		{
			LoginBean loginBean = new LoginBean();
			if(!isAuthentic)
			{
				BaseLogger.log("9",null,null,"Authenticating User");
				if(loginBean.isUserAuthenticate(user[0], user[1], siteCode));
				BaseLogger.log("9",null,null,"User Authenticated");
			}
			AppConnectParm appConnect = new AppConnectParm();
			Properties p = appConnect.getProperty();
			InitialContext ctx = new InitialContext(p);
			CommonDBAccessHome home = (CommonDBAccessHome)ctx.lookup("CommonDBAccess");
			CommonDBAccess ejbObj = home.create();
			emp = ejbObj.getEmpInfo(user[0]);
			setLoginCode(user[0]);
			this.loginPwd = user[1];
			setSiteCode(siteCode);
			//setProfileId(ejbObj.getProfileId(user[0]));
			setIsBIUser(""+ejbObj.isBiUser(user[0]));
			setUserLevel(emp[0]);
			setUserType(emp[1]);
			setEntityCode(emp[2]);
			setProfileId(emp[3]);
			//vikrant 12/09/2006
			if (emp[4] == null || ("").equals(emp[4]))
			{
				BaseLogger.log("9",null,null,"Employee Information Not Set");
			}
			else
			{
				setEmpCode(emp[4]);
				setEmpName(emp[1]);
				setEmpFName(emp[5]);
				setEmpMName(emp[6]);
				setEmpLName(emp[7]);
				setReportTo(emp[8]);
				setDeptCode(emp[9]);
				setDeptDescr(emp[4]);
				setEmailIdOff(emp[10]);
				BaseLogger.log("9",null,null,"Employee Information Set");
			}
		}
		catch(Exception e)
		{
			BaseLogger.log("9",null,null,"Exception: UserInfoBean: UserInfoBean: ==>while collecting employee information\n"+e);	e.printStackTrace();
			throw new BaseException(e);
		}*/
	}

	public void setEmpInfo(String[] emp)throws BaseException
	{
		try
		{
			//added by shrutika [Start] on 05-02-18 for set city and site description in case of change site.
			setCity(emp[25] );
			setSiteDescr( emp[6] );
			//added by shrutika [Start] on 05-02-18 for set city and site description in case of change site.
			//added by shrutika on 14-02-18 for set fin_entity value when login or change the site code.
			setFin_entity(emp[24]);
			//Changes made by Pratheek on 29-01-19[ to store the facility code value when login]-Start
			setFacility_code(emp[26]);
			//Changes made by Pratheek on 29-01-19[ to store the facility code value when login]-End
			setUserLevel( emp[7] );
			setUserType( emp[8] );
			setEntityCode( emp[9] );
			setProfileId( emp[10] );
			setEmpCode( emp[0] );
			setEmpName( emp[1] );
			//Added by Sanjaya on [06/01/14, WS3ISUN001]
			setItemSer( emp[11] );
			//setEmpFName( emp[5] );
			//setEmpMName( emp[6] );
			//setEmpLName( emp[7] );
			setReportTo( emp[2] );
			setDeptCode( emp[3] );
			setDeptDescr( emp[4] );
			//Changed By Rupali on 27/03/2008.[To add the Email ID in UserInfo].Request ID:-[BI78SUN047]
			//setEmailIdOff( emp[10] );
			setEmailIdOff( emp[12] );
			//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007]
			setLoggerType( emp[13] );
			//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
			setStanCode( emp[14] );
			setDesignation( emp[15] );
			setDateJoin( emp[16] );
			setDivision( emp[17] );
			//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
			//Added by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into userInfo]Start
			setUserLanguage( emp[18] );
			setUserCountry( emp[19] );
			//Added by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into userInfo]End
			//Added by Shahu Mali on 08-10-13[WS3GBAS001] to set the transDB value.
			//if(!"".equalsIgnoreCase(emp[20]))
			{
				setTransDB(emp[20]);
			}
			//Changed By Rupali Hande on 24/03/08 [Create UserCosnatnt for All Users].RequestID[BI78SUN047].START

			//Added by Prajyot 18MAR2014[Theme Implementation.]Start
			setUserTheme(emp[21]);
			setUxInterface(emp[22]);//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]

			E12GenericUtility genericUtility =  new E12GenericUtility();

			//Added by Prajyot As per Danish Sir [ Setting BIHOME to initiate BI_RESOURCE_PATH ]
			CommonConstants.setBIHOME();

			//added by rama on 22/01/14 To change path of Bireports from the variable defined in bi.xml [BI3ISUN003]
			String filePath = CommonConstants.BI_RESOURCE_PATH + File.separator + this.loginCode + File.separator + "User_Constants.xml";

			//Added by Prajyot As per Danish Sir [ Setting User_Constants.xml path if BI_RESOURCE_PATH is not set ]
			if( CommonConstants.BI_RESOURCE_PATH == null || CommonConstants.BI_RESOURCE_PATH.trim().length() == 0 )
			{
				filePath = CommonConstants.JBOSSHOME + File.separator + CommonConstants.RESOURCE + File.separator + this.loginCode + File.separator + "User_Constants.xml";
			}

			BaseLogger.log("3",null,null,"Createing Or Updating this File:- FILE PATH:------"+filePath);
			File fileObj = new File( filePath );
			BaseLogger.log("3",null,null,"User_Constants.xml fileExist :["+fileObj.exists()+"]");
			BaseLogger.log("3",null,null,"User_Constants.xml fileSize :["+fileObj.length()+" bytes]");
			if( ! fileObj.exists() || fileObj.length() == 0 )
			{
				//Changed by Prasad on 15/09/2020 [to resolve login issue if city and site_descr contains the special characters] START
				/*if( ! fileObj.getParentFile().exists() )
				{
					BaseLogger.log("3",null,null,"Creating the Parant Directory..........");
					fileObj.getParentFile().mkdirs();
				}
				fileObj.createNewFile();
				BaseLogger.log("3",null,null,"Creating the NEw File");
				FileWriter fWriter = new FileWriter( fileObj );
				//changed by Monif on 2009-02-12.[Parsing while login].
				fWriter.write("<?xml version='1.0' encoding='"+getCharEnc()+"'?>");
				fWriter.write( "<USER_CONSTANTS TABLE_NAME=\"User Constants\" DISPLAY_NAME =\"User Constants\">" );
				fWriter.write("<USER_CONSTANT NAME=\"loginCode\" VALUE=\""+getLoginCode()+"\" DEFAULT=\""+getLoginCode()+"\" JAVATYPE=\"java.lang.String\">loginCode</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"profileId\" VALUE=\""+getProfileId()+"\" DEFAULT=\""+getProfileId()+"\" JAVATYPE=\"java.lang.String\">profileId</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"siteCode\" VALUE=\""+getSiteCode()+"\" DEFAULT=\""+getSiteCode()+"\" JAVATYPE=\"java.lang.String\">siteCode</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"siteDescr\" VALUE=\""+getSiteDescr()+"\" DEFAULT=\""+getSiteDescr()+"\" JAVATYPE=\"java.lang.String\">siteDescr</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"empCode\" VALUE=\""+getEmpCode()+"\" DEFAULT=\""+getEmpCode()+"\" JAVATYPE=\"java.lang.String\">empCode</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"reportTo\" VALUE=\""+getReportTo()+"\" DEFAULT=\""+getReportTo()+"\" JAVATYPE=\"java.lang.String\">reportTo</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"deptCode\" VALUE=\""+getDeptCode()+"\" DEFAULT=\""+getDeptCode()+"\" JAVATYPE=\"java.lang.String\">deptCode</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"entityCode\" VALUE=\""+getEntityCode()+"\" DEFAULT=\""+getEntityCode()+"\" JAVATYPE=\"java.lang.String\">entityCode</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"userLevel\" VALUE=\""+getUserLevel()+"\" DEFAULT=\""+getUserLevel()+"\" JAVATYPE=\"java.lang.String\">userLevel</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"userType\" VALUE=\""+getUserType()+"\" DEFAULT=\""+getUserType()+"\" JAVATYPE=\"java.lang.String\">userType</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"itemSer\" VALUE=\""+getItemSer()+"\" DEFAULT=\""+getItemSer()+"\" JAVATYPE=\"java.lang.String\">itemSer</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"emailIdOff\" VALUE=\""+getEmailIdOff()+"\" DEFAULT=\""+getEmailIdOff()+"\" JAVATYPE=\"java.lang.String\">emailIdOff</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"profileIdRes\" VALUE=\""+getProfileIdRes()+"\" DEFAULT=\""+getProfileIdRes()+"\" JAVATYPE=\"java.lang.String\">profileIdRes</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"charEnc\" VALUE=\""+getCharEnc()+"\" DEFAULT=\""+getCharEnc()+"\" JAVATYPE=\"java.lang.String\">charEnc</USER_CONSTANT>");
				//Change by Nilesh on 21-Mar-2011[MF01SUN037 & WS01SUN062][Add remoteHostName, userLanguage & userCountry]Start
				fWriter.write("<USER_CONSTANT NAME=\"remoteHostName\" VALUE=\""+getRemoteHostName()+"\" DEFAULT=\""+getRemoteHostName()+"\" JAVATYPE=\"java.lang.String\">remoteHostName</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"userLanguage\" VALUE=\""+getUserLanguage()+"\" DEFAULT=\""+getUserLanguage()+"\" JAVATYPE=\"java.lang.String\">userLanguage</USER_CONSTANT>");
				fWriter.write("<USER_CONSTANT NAME=\"userCountry\" VALUE=\""+getUserCountry()+"\" DEFAULT=\""+getUserCountry()+"\" JAVATYPE=\"java.lang.String\">userCountry</USER_CONSTANT>");
				//Change by Nilesh on 21-Mar-2011[MF01SUN037 & WS01SUN062][Add remoteHostName, userLanguage & userCountry]End
				//Added By Shahu Mali on 08-10-13.[WS3GBAS001].START
				fWriter.write("<USER_CONSTANT NAME=\"transDB\" VALUE=\""+getTransDB()+"\" DEFAULT=\""+getTransDB()+"\" JAVATYPE=\"java.lang.String\">transDB</USER_CONSTANT>");
				//Added By Shahu Mali on 08-10-13.[WS3GBAS001].END

				//added by shrutika [Start] on 05-02-18 for set city in case of change site.
				fWriter.write("<USER_CONSTANT NAME=\"city\" VALUE=\""+getCity()+"\" DEFAULT=\""+getCity()+"\" JAVATYPE=\"java.lang.String\">city</USER_CONSTANT>");

				//Added by Shrutika on 15-02-18 for update fin_entity value when change the site code.
				fWriter.write("<USER_CONSTANT NAME=\"fin_entity\" VALUE=\""+getFin_entity()+"\" DEFAULT=\""+getFin_entity()+"\" JAVATYPE=\"java.lang.String\">fin_entity</USER_CONSTANT>");
				//Added by Pratheek on 29-01-19 [to pass the updated facilit_code value when changing the site.]Start
				fWriter.write("<USER_CONSTANT NAME=\"facility_code\" VALUE=\""+getFacility_code()+"\" DEFAULT=\""+getFacility_code()+"\" JAVATYPE=\"java.lang.String\">facility_code</USER_CONSTANT>");
				//Added by Pratheek on 29-01-19 [to pass the updated facilit_code value when changing the site.]-End

				//Added by Prajyot 18MAR2014[Theme Implementation.]Start
				fWriter.write("<USER_CONSTANT NAME=\"userTheme\" VALUE=\""+getUserTheme()+"\" DEFAULT=\""+getUserTheme()+"\" JAVATYPE=\"java.lang.String\">userTheme</USER_CONSTANT>");
				//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]
				fWriter.write("<USER_CONSTANT NAME=\"uxInterface\" VALUE=\""+getUxInterface()+"\" DEFAULT=\""+getUxInterface()+"\" JAVATYPE=\"java.lang.String\">uxInterface</USER_CONSTANT>");

				//Added By Samadhan on 27-10-2017 [ set enterprise from user for property editor]
				fWriter.write("<USER_CONSTANT NAME=\"enterprise\" VALUE=\""+getEnterprise()+"\" DEFAULT=\""+getEnterprise()+"\" JAVATYPE=\"java.lang.String\">enterprise</USER_CONSTANT>");

				fWriter.write("</USER_CONSTANTS>");
				fWriter.flush();
				fWriter.close();
				BaseLogger.log("3",null,null,"Completed .......");*/
				
				createUserConstantXml( filePath );
			}
			else
			{
				Document allUserConstDom = null;
				try 
				{
					allUserConstDom = genericUtility.parseFile( fileObj );
				}
				catch (Exception e) 
				{
					BaseLogger.log( "0", null, null, "Exception :: UserInfoBean : parseFile : ["+ e.getMessage() +"]" );
					e.printStackTrace();
					
					createUserConstantXml( filePath );
				}
				
				if ( allUserConstDom != null )
				{
					NodeList usrCosntNodeList = allUserConstDom.getElementsByTagName( "USER_CONSTANT" );
					boolean isUpdate =false;
					for ( int usrCosntCtr = 0; usrCosntCtr <usrCosntNodeList.getLength(); usrCosntCtr++ )
					{
						Node currUsrConstNode = usrCosntNodeList.item( usrCosntCtr );
						if( currUsrConstNode != null &&  currUsrConstNode.getAttributes().getNamedItem("NAME") != null)
						{
							String usrCostName = currUsrConstNode.getAttributes().getNamedItem("NAME").getNodeValue();
							String usrCostValue =currUsrConstNode.getAttributes().getNamedItem("VALUE").getNodeValue();
							if("loginCode".equalsIgnoreCase( usrCostName ) )
							{
                                //change by shrutika on 19-12-2020 for Exception in application start.
								//BaseLogger.log("3",null,null,usrCostValue.trim());
                                //BaseLogger.log("3",null,null,getLoginCode().trim());
                                BaseLogger.log("3",null,null,usrCostValue);
                                BaseLogger.log("3",null,null,getLoginCode());
                                 //change by shrutika on 19-12-2020 for Exception in application end.
								if((!(getLoginCode() == null)) && !(usrCostValue == null))
								{
									//BaseLogger.log("9",null,null,"lOGINCODE:-" + usrCostValue.trim() );
									//BaseLogger.log("9",null,null,"LOGIN  CODE:-2222 " + getLoginCode().trim());
									if(!usrCostValue.trim().equalsIgnoreCase(getLoginCode().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getLoginCode());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getLoginCode());
									}
									else
									{
										BaseLogger.log("3",null,null,"loginCode is Match.............");
									}
								}
							}
							else if("profileId".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getProfileId() == null)) && !(usrCostValue == null))
								{
									if(!usrCostValue.trim().equalsIgnoreCase(getProfileId().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getProfileId());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getProfileId());
									}
								}
							}
							else if("siteCode".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getSiteCode() == null)) && !(usrCostValue == null))
								{
									if(!usrCostValue.trim().equalsIgnoreCase(getSiteCode().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getSiteCode());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getSiteCode());
									}
								}
							}
							/*else if("siteDescr".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getSiteDescr() == null)) && !(usrCostValue == null))
								{
									if(!usrCostValue.trim().equalsIgnoreCase(getSiteDescr().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getSiteDescr());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getSiteDescr());
									}
								}
							}*/
							else if("empCode".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getEmpCode() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getEmpCode().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getEmpCode());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getEmpCode());
									}
								}
							}
							else if("reportTo".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getReportTo() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getReportTo().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getReportTo());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getReportTo());
									}
								}
							}
							else if("deptCode".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getDeptCode() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getDeptCode().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getDeptCode());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getDeptCode());
									}
								}
							}
							else if("deptDescr".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getDeptDescr() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getDeptDescr().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getDeptDescr());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getDeptDescr());
									}
								}
							}
							else if("entityCode".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getEntityCode() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getEntityCode().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getEntityCode());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getEntityCode());
									}
								}
							}
							else if("userLevel".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getUserLevel() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getUserLevel().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getUserLevel());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getUserLevel());
									}
								}
							}
							else if("userType".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getUserType() == null)) && !(usrCostValue == null))
								{
									if((getUserType()!=null) && (getUserType().length()!=0) && (!usrCostValue.trim().equalsIgnoreCase(getUserType().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getUserType());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getUserType());
									}
								}
							}
							else if("itemSer".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getItemSer() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getItemSer().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getItemSer());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getItemSer());
									}
								}
							}
							else if("emailIdOff".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getEmailIdOff() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getEmailIdOff().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getEmailIdOff());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getEmailIdOff());
									}
								}
							}
							else if("profileIdRes".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getProfileIdRes() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getProfileIdRes().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getProfileIdRes());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getProfileIdRes());
									}
								}
							}
							else if("charEnc".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getCharEnc() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getCharEnc().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getCharEnc());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getCharEnc());
									}
								}
							}
							//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
							else if("stanCode".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getStanCode() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getCharEnc().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getCharEnc());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getCharEnc());
									}
								}
							}
							else if("designation".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getDesignation() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getCharEnc().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getCharEnc());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getCharEnc());
									}
								}
							}
							else if("dateJoin".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getDateJoin() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getCharEnc().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getCharEnc());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getCharEnc());
									}
								}
							}
							else if("division".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getDivision() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getCharEnc().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getCharEnc());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getCharEnc());
									}
								}
							}
							//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
							//Change by Nilesh on 21-Mar-2011 [MF01SUN037 & WS01SUN062][Add remoteHostName,userLanguage & userCountry]Start
							else if("remoteHostName".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getRemoteHostName() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getRemoteHostName().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getRemoteHostName());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getRemoteHostName());
									}
								}
							}
							else if("userLanguage".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getUserLanguage() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getUserLanguage().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getUserLanguage());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getUserLanguage());
									}
								}
							}
							else if("userCountry".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getUserCountry() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getUserCountry().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getUserCountry());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getUserCountry());
									}
								}
							}
							//Change by Nilesh on 21-Mar-2011 [MF01SUN037 & WS01SUN062][Add remoteHostName,userLanguage & userCountry]End
							//Changes Done By Shahu Mali on 08-10-13.[WS3GBAS001].START
							else if("transDB".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getTransDB() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getTransDB().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getTransDB());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getTransDB());
									}
								}
							}
							//Changes Done By Shahu Mali on 08-10-13.[WS3GBAS001].END
							//Added by Prajyot 18MAR2014[Theme Implementation.]Start
							else if( "userTheme".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getUserTheme() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getUserTheme().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getUserTheme());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getUserTheme());
									}
								}
							}
							//Added by Prajyot 18MAR2014[Theme Implementation.]End
							//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]Start
							else if( "uxtInterface".equalsIgnoreCase( usrCostName ) )//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]
							{
								if((!(getUxInterface() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getUserTheme().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getUxInterface());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getUxInterface());
									}
								}
							}
							//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]End
							
							//Added By Samadhan on 27-10-2017 [ set enterprise from user for property editor] start
							else if( "enterprise".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getEnterprise() == null)) && !(usrCostValue == null))
								{
									if((!usrCostValue.trim().equalsIgnoreCase(getUserTheme().trim())))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getEnterprise());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getEnterprise());
									}
								}
							}
							//Added By Samadhan on 27-10-2017 [ set enterprise from user for property editor] end
							//Added by shrutika [Start] on 10-12-18 for set city and finEntity.
							/*else if("city".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getCity() == null)) && !(usrCostValue == null))
								{
									if(!usrCostValue.trim().equalsIgnoreCase(getCity().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getCity());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getCity());
									}
								}
							}*/
							else if("fin_entity".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getFin_entity() == null)) && !(usrCostValue == null))
								{
									if(!usrCostValue.trim().equalsIgnoreCase(getFin_entity().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getFin_entity());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getFin_entity());
									}
								}
							}
							//Added by shrutika [End] on 10-12-18 for set city and finEntity.
							//Added by Pratheek on 29-01-19 for set facility_code value]-Start
							else if("facility_code".equalsIgnoreCase( usrCostName ) )
							{
								if((!(getFacility_code() == null)) && !(usrCostValue == null))
								{
									if(!usrCostValue.trim().equalsIgnoreCase(getFin_entity().trim()))
									{
										isUpdate = true;
										currUsrConstNode.getAttributes().getNamedItem("VALUE").setNodeValue(getFacility_code());
										currUsrConstNode.getAttributes().getNamedItem("DEFAULT").setNodeValue(getFacility_code());
									}
								}
							}
							//Added by Pratheek on 29-01-19 for set facility code value].-End
						}//
					}
					if (isUpdate)
					{
						//changed by Monif on 2009.02.12.[Parsing while login].Start
						String finalStr=genericUtility.serializeDom(allUserConstDom);
						StringBuffer finalStrBuff = new StringBuffer("<?xml version='1.0' encoding='"+getCharEnc()+"'?>");
						finalStrBuff.append(finalStr);
						finalStr = finalStrBuff.toString();
						//changed by Monif on 2009.02.12.[Parsing while login].End
						finalStr=genericUtility.serializeDom(allUserConstDom);
						genericUtility.writeToFile(finalStr, filePath);
						BaseLogger.log("3",null,null,"User Constant Updated Successfully");
					}
					else
					{
						BaseLogger.log("3",null,null,"User Constant Value Not Changed......... ");
					}
				}
			}
			//Changed By Rupali Hande on 24/03/08 [Create UserCosnatnt for All Users].RequestID[BI78SUN047].END
			//Changed by Prasad on 15/09/2020 [to resolve login issue if city and site_descr contains the special characters] END
		}
		/*catch(FileNotFoundException fnfe)
		{
			BaseLogger.log("0",null,null,"Exception: UserInfoBean: setEmpInfo \n"+fnfe);	fnfe.printStackTrace();
		}*/
		catch(Exception e)
		{
			BaseLogger.log("0",null,null,"Exception: UserInfoBean: setEmpInfo \n"+e);	e.printStackTrace();
			throw new BaseException(e);
		}
	}
	
	//Changed by Prasad on 15/09/2020 [to resolve login issue if city and site_descr contains the special characters] START
	private void createUserConstantXml( String filePath )
	{
		try 
		{
			File fileObj = new File( filePath );
			if( ! fileObj.getParentFile().exists() )
			{
				BaseLogger.log("3",null,null,"Creating the Parant Directory..........");
				fileObj.getParentFile().mkdirs();
			}
			fileObj.createNewFile();
			BaseLogger.log("3",null,null,"Creating the NEw File");
			FileWriter fWriter = new FileWriter( fileObj );
			//changed by Monif on 2009-02-12.[Parsing while login].
			fWriter.write("<?xml version='1.0' encoding='"+getCharEnc()+"'?>");
			fWriter.write("<USER_CONSTANTS TABLE_NAME=\"User Constants\" DISPLAY_NAME =\"User Constants\">" );
			fWriter.write("<USER_CONSTANT NAME=\"loginCode\" VALUE=\""+getLoginCode()+"\" DEFAULT=\""+getLoginCode()+"\" JAVATYPE=\"java.lang.String\">loginCode</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"profileId\" VALUE=\""+getProfileId()+"\" DEFAULT=\""+getProfileId()+"\" JAVATYPE=\"java.lang.String\">profileId</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"siteCode\" VALUE=\""+getSiteCode()+"\" DEFAULT=\""+getSiteCode()+"\" JAVATYPE=\"java.lang.String\">siteCode</USER_CONSTANT>");
			//fWriter.write("<USER_CONSTANT NAME=\"siteDescr\" VALUE=\""+getSiteDescr()+"\" DEFAULT=\""+getSiteDescr()+"\" JAVATYPE=\"java.lang.String\">siteDescr</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"siteDescr\" VALUE=\"\" DEFAULT=\"\" JAVATYPE=\"java.lang.String\">siteDescr</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"empCode\" VALUE=\""+getEmpCode()+"\" DEFAULT=\""+getEmpCode()+"\" JAVATYPE=\"java.lang.String\">empCode</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"reportTo\" VALUE=\""+getReportTo()+"\" DEFAULT=\""+getReportTo()+"\" JAVATYPE=\"java.lang.String\">reportTo</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"deptCode\" VALUE=\""+getDeptCode()+"\" DEFAULT=\""+getDeptCode()+"\" JAVATYPE=\"java.lang.String\">deptCode</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"entityCode\" VALUE=\""+getEntityCode()+"\" DEFAULT=\""+getEntityCode()+"\" JAVATYPE=\"java.lang.String\">entityCode</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"userLevel\" VALUE=\""+getUserLevel()+"\" DEFAULT=\""+getUserLevel()+"\" JAVATYPE=\"java.lang.String\">userLevel</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"userType\" VALUE=\""+getUserType()+"\" DEFAULT=\""+getUserType()+"\" JAVATYPE=\"java.lang.String\">userType</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"itemSer\" VALUE=\""+getItemSer()+"\" DEFAULT=\""+getItemSer()+"\" JAVATYPE=\"java.lang.String\">itemSer</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"emailIdOff\" VALUE=\""+getEmailIdOff()+"\" DEFAULT=\""+getEmailIdOff()+"\" JAVATYPE=\"java.lang.String\">emailIdOff</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"profileIdRes\" VALUE=\""+getProfileIdRes()+"\" DEFAULT=\""+getProfileIdRes()+"\" JAVATYPE=\"java.lang.String\">profileIdRes</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"charEnc\" VALUE=\""+getCharEnc()+"\" DEFAULT=\""+getCharEnc()+"\" JAVATYPE=\"java.lang.String\">charEnc</USER_CONSTANT>");
			//Change by Nilesh on 21-Mar-2011[MF01SUN037 & WS01SUN062][Add remoteHostName, userLanguage & userCountry]Start
			fWriter.write("<USER_CONSTANT NAME=\"remoteHostName\" VALUE=\""+getRemoteHostName()+"\" DEFAULT=\""+getRemoteHostName()+"\" JAVATYPE=\"java.lang.String\">remoteHostName</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"userLanguage\" VALUE=\""+getUserLanguage()+"\" DEFAULT=\""+getUserLanguage()+"\" JAVATYPE=\"java.lang.String\">userLanguage</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"userCountry\" VALUE=\""+getUserCountry()+"\" DEFAULT=\""+getUserCountry()+"\" JAVATYPE=\"java.lang.String\">userCountry</USER_CONSTANT>");
			//Change by Nilesh on 21-Mar-2011[MF01SUN037 & WS01SUN062][Add remoteHostName, userLanguage & userCountry]End
			//Added By Shahu Mali on 08-10-13.[WS3GBAS001].START
			fWriter.write("<USER_CONSTANT NAME=\"transDB\" VALUE=\""+getTransDB()+"\" DEFAULT=\""+getTransDB()+"\" JAVATYPE=\"java.lang.String\">transDB</USER_CONSTANT>");
			//Added By Shahu Mali on 08-10-13.[WS3GBAS001].END

			//added by shrutika [Start] on 05-02-18 for set city in case of change site.
			//fWriter.write("<USER_CONSTANT NAME=\"city\" VALUE=\""+getCity()+"\" DEFAULT=\""+getCity()+"\" JAVATYPE=\"java.lang.String\">city</USER_CONSTANT>");
			fWriter.write("<USER_CONSTANT NAME=\"city\" VALUE=\"\" DEFAULT=\"\" JAVATYPE=\"java.lang.String\">city</USER_CONSTANT>");

			//Added by Shrutika on 15-02-18 for update fin_entity value when change the site code.
			fWriter.write("<USER_CONSTANT NAME=\"fin_entity\" VALUE=\""+getFin_entity()+"\" DEFAULT=\""+getFin_entity()+"\" JAVATYPE=\"java.lang.String\">fin_entity</USER_CONSTANT>");
			//Added by Pratheek on 29-01-19 [to pass the updated facilit_code value when changing the site.]Start
			fWriter.write("<USER_CONSTANT NAME=\"facility_code\" VALUE=\""+getFacility_code()+"\" DEFAULT=\""+getFacility_code()+"\" JAVATYPE=\"java.lang.String\">facility_code</USER_CONSTANT>");
			//Added by Pratheek on 29-01-19 [to pass the updated facilit_code value when changing the site.]-End

			//Added by Prajyot 18MAR2014[Theme Implementation.]Start
			fWriter.write("<USER_CONSTANT NAME=\"userTheme\" VALUE=\""+getUserTheme()+"\" DEFAULT=\""+getUserTheme()+"\" JAVATYPE=\"java.lang.String\">userTheme</USER_CONSTANT>");
			//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]
			fWriter.write("<USER_CONSTANT NAME=\"uxInterface\" VALUE=\""+getUxInterface()+"\" DEFAULT=\""+getUxInterface()+"\" JAVATYPE=\"java.lang.String\">uxInterface</USER_CONSTANT>");

			//Added By Samadhan on 27-10-2017 [ set enterprise from user for property editor]
			fWriter.write("<USER_CONSTANT NAME=\"enterprise\" VALUE=\""+getEnterprise()+"\" DEFAULT=\""+getEnterprise()+"\" JAVATYPE=\"java.lang.String\">enterprise</USER_CONSTANT>");

			fWriter.write("</USER_CONSTANTS>");
			fWriter.flush();
			fWriter.close();
			BaseLogger.log("3",null,null,"Completed .......");
		}
		catch (IOException e) 
		{
			e.printStackTrace();
		}
	}
	//Changed by Prasad on 15/09/2020 [to resolve login issue if city and site_descr contains the special characters] END

	public UserInfoBean( String inputUserInfoStringBuf )throws BaseException
	{
		Document userInfoDom = new E12GenericUtility().parseString( inputUserInfoStringBuf );
		//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - start
		if( userInfoDom != null )
		{
			//Changed by Rupali on 10-01-08 start
			//Node rootNode = userInfoDom.getElementsByTagName( "UserInfo" ).item( 0 );
			NodeList tempNodeList = userInfoDom.getElementsByTagName( "UserInfo" );
//			Changed By RUPALI-HANDE ON 15/01/2008[Changed the tempNodeList to tempNodeList.item(0)]-REQUEST ID "WI78BAS069"
			//if ( tempNodeList == null )
			if ( tempNodeList.item( 0 ) == null )
			{
				tempNodeList = userInfoDom.getElementsByTagName( "USERINFO" );
			}
			Node rootNode = tempNodeList.item( 0 );
			//Changed by Rupali on 10-01-08 End
			
			NodeList propNodeList = rootNode.getChildNodes();
			int noOfProps = propNodeList.getLength();
			for( int propCtr = 0; propCtr < noOfProps; propCtr++ )
			{
				Node propNode = propNodeList.item( propCtr );
				//Changed by Rupali on 10-01-08 [ changed equals to equalsIgnoreCase ]
				if( propNode != null && propNode.getFirstChild() != null )
				{
					String propName = propNode.getNodeName();
					if( "loginCode".equalsIgnoreCase( propName ) )
					{
						setLoginCode( propNode.getFirstChild().getNodeValue() );
					}
					else if("profileId".equalsIgnoreCase( propName ) )
					{
						setProfileId(propNode.getFirstChild().getNodeValue() );
					}
					else if("siteCode".equalsIgnoreCase( propName ) )
					{
						setSiteCode(propNode.getFirstChild().getNodeValue() );
					}
					else if("siteDescr".equalsIgnoreCase( propName ) )
					{
						setSiteDescr(propNode.getFirstChild().getNodeValue() );
					}
					else if("empCode".equalsIgnoreCase( propName ) )
					{
						setEmpCode(propNode.getFirstChild().getNodeValue() );
					}
					else if("empName".equalsIgnoreCase( propName ) )
					{
						setEmpName(propNode.getFirstChild().getNodeValue() );
					}
					else if("empFName".equalsIgnoreCase( propName ) )
					{
						setEmpFName(propNode.getFirstChild().getNodeValue() );
					}
					else if("empMName".equalsIgnoreCase( propName ) )
					{
						setEmpMName(propNode.getFirstChild().getNodeValue() );
					}
					else if("empLName".equalsIgnoreCase( propName ) )
					{
						setEmpLName(propNode.getFirstChild().getNodeValue() );
					}
					//vikrant-end 12/09/2006
					else if("reportTo".equalsIgnoreCase( propName ) )
					{
						setReportTo(propNode.getFirstChild().getNodeValue() );
					}
					else if("deptCode".equalsIgnoreCase( propName ) )
					{
						setDeptCode(propNode.getFirstChild().getNodeValue() );
					}
					else if("deptDescr".equalsIgnoreCase( propName ) )
					{
						setDeptDescr(propNode.getFirstChild().getNodeValue());
					}
					//Added by Prasad on 24/07/19 START
					else if("emailIdOff".equalsIgnoreCase( propName ) )
					{
						setEmailIdOff(propNode.getFirstChild().getNodeValue());
					}
					//Added by Prasad on 24/07/19 END
					else if("entityCode".equalsIgnoreCase( propName ) )
					{
						setEntityCode(propNode.getFirstChild().getNodeValue() );
					}
					else if("userLevel".equalsIgnoreCase( propName ) )
					{
						setUserLevel(propNode.getFirstChild().getNodeValue() );
					}
					else if("userType".equalsIgnoreCase( propName ) )
					{
						setUserType(propNode.getFirstChild().getNodeValue() );
					}
					else if("itemSer".equalsIgnoreCase( propName ) )
					{
						setItemSer( propNode.getFirstChild().getNodeValue() );
					}//vikrant 12/09/2006
					else if( "isBiUser".equalsIgnoreCase( propName ) )
					{
						setIsBIUser(propNode.getFirstChild().getNodeValue());
					}
					else if( "deviceID".equalsIgnoreCase( propName ) )
					{
						setDeviceID(propNode.getFirstChild().getNodeValue());
					}
					//Added By Samadhan on 27-10-2017 [ get enterprise from user for property editor] start
					else if( "enterprise".equalsIgnoreCase( propName ) )
					{
						setEnterprise(propNode.getFirstChild().getNodeValue());
					}
					else if( "enterpriseDescr".equalsIgnoreCase( propName ) )
					{
						setEnterpriseDescr(propNode.getFirstChild().getNodeValue());
					}
					//Added By Samadhan on 27-10-2017 [ get enterprise from user for property editor] start
					
					//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - start
					else if( "smtpHost".equalsIgnoreCase( propName ) )
					{
						setSmtpHost(propNode.getFirstChild().getNodeValue());
					}
					else if( "smtpPort".equalsIgnoreCase( propName ) )
					{
						setSmtpPort(propNode.getFirstChild().getNodeValue());
					}
					else if( "smtpUser".equalsIgnoreCase( propName ) )
					{
						setSmtpUser(propNode.getFirstChild().getNodeValue());
					}
					else if( "smtpPassWD".equalsIgnoreCase( propName ) )
					{
						setSmtpPassWD(propNode.getFirstChild().getNodeValue());
					}
					else if( "smtpProtocolType".equalsIgnoreCase( propName ) )
					{
						setSmtpProtocolType(propNode.getFirstChild().getNodeValue());
					}
					else if( "smtpMailFrom".equalsIgnoreCase( propName ) )
					{
						setSmtpMailFrom(propNode.getFirstChild().getNodeValue());
					}
					else if( "adminEmailId".equalsIgnoreCase( propName ) )
					{
						setSmtpMailFrom(propNode.getFirstChild().getNodeValue());
					}
					//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - end
					
					//added by shrutika [Start] on 05-02-18 for set city in case of login
					else if("city".equalsIgnoreCase( propName ) )
					{
						setCity(propNode.getFirstChild().getNodeValue());
					}
					//added by shrutika [End] on 05-02-18 for set city in case of login
					//Added by Shrutika on 15-02-18 [Start] for update fin_entity value when change the site code.
					else if("fin_entity".equalsIgnoreCase( propName ) )
					{
						//Commented By Ravindra C on 06-09-18 for prevent SYSOUT.
						//BaseLogger.log("9",null,null,"inside user info bean.java...922["+propNode.getFirstChild().getNodeValue()+"]");
						setFin_entity(propNode.getFirstChild().getNodeValue());
					}
					//Added by Shrutika on 15-02-18 [End] for update fin_entity value when change the site code.
					//Added by Pratheek on 19-01-19 [to update facility code value when change the site.]-start
					else if("facility_code".equalsIgnoreCase( propName ) )
					{
						setFacility_code(propNode.getFirstChild().getNodeValue());
					}
					//Added by Pratheek on 19-01-19 [to update facility code value when change the site.]-End
					else if( "entryType".equalsIgnoreCase( propName ) )
					{
						setEntryType(propNode.getFirstChild().getNodeValue());
					}
					else if( "entryId".equalsIgnoreCase( propName ) )
					{
						setEntryId(propNode.getFirstChild().getNodeValue());
					}
					// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] START
					else if( "userName".equalsIgnoreCase( propName ) )
					{
						setUserName(propNode.getFirstChild().getNodeValue());
					}
					// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] END
					else if( "isPasswordStore".equalsIgnoreCase( propName ) )
					{
						setIsPasswordStore(propNode.getFirstChild().getNodeValue());
					}
					else if( "defaultMenu".equalsIgnoreCase( propName ) )
					{
						setDefaultMenu(propNode.getFirstChild().getNodeValue());
					}
					else if( "features".equalsIgnoreCase( propName ) )
					{
						setFeatures(propNode.getFirstChild().getNodeValue());
					}
					//Changed by Pragyan on 11/08/07
					else if( "charEnc".equalsIgnoreCase( propName ) )
					{
						setCharEnc(propNode.getFirstChild().getNodeValue());
					}
					else if( "remoteHost".equalsIgnoreCase( propName ) )//Changed By Madhup on 10/02/2007 to store remoteHost addr
					{
						setRemoteHost(propNode.getFirstChild().getNodeValue());
					}
					//Added by Nilesh on 21-Mar-2011 [MF01SUN037][Add remotehost name]Start
					else if( "remoteHostName".equalsIgnoreCase( propName ) )
					{
						setRemoteHostName(propNode.getFirstChild().getNodeValue());
					}
					//Added by Nilesh on 21-Mar-2011 [MF01SUN037][Add Remote Host name]End
					else if( "profileIdRes".equalsIgnoreCase( propName ) )
					{
						setProfileIdRes(propNode.getFirstChild().getNodeValue());
					}
					//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
					else if( "stanCode".equalsIgnoreCase( propName ) )
					{
						setStanCode(propNode.getFirstChild().getNodeValue());
					}
					else if( "designation".equalsIgnoreCase( propName ) )
					{
						setDesignation(propNode.getFirstChild().getNodeValue());
					}
					else if( "dateJoin".equalsIgnoreCase( propName ) )
					{
						setDateJoin(propNode.getFirstChild().getNodeValue());
					}
					else if( "division".equalsIgnoreCase( propName ) )
					{
						setDivision(propNode.getFirstChild().getNodeValue());
					}
					//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
					//Added by Nilesh on 21-Mar-2011 [WS01SUN062][Add language & country]Start
					else if( "userLanguage".equalsIgnoreCase( propName ) )
					{
						setUserLanguage(propNode.getFirstChild().getNodeValue());
					}
					else if( "userCountry".equalsIgnoreCase( propName ) )
					{
						setUserCountry(propNode.getFirstChild().getNodeValue());
					}
					//Added by Nilesh on 21-Mar-2011 [WS01SUN062][Add language & country]End
					//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].Start
					else if( "loggerType".equalsIgnoreCase( propName ) )
					{
						setLoggerType(propNode.getFirstChild().getNodeValue());
					}
					//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].End
					//Added By Shahu Mali on 08-10-13.[WS3GBAS001].START
					else if( "transDB".equalsIgnoreCase( propName ) )
					{
						setTransDB(propNode.getFirstChild().getNodeValue());
					}
					//Added By Shahu Mali on 08-10-13.[WS3GBAS001].END
					//Added by Prajyot 18MAR2014[Theme Implementation.]Start
					else if( "userTheme".equalsIgnoreCase( propName ) )
					{
						setUserTheme(propNode.getFirstChild().getNodeValue());
					}
					//Added by Prajyot 18MAR2014[Theme Implementation.]End
					//Added by Prasad on 24/07/19 START
					else if( "uxInterface".equalsIgnoreCase( propName ) )
					{
						setUxInterface(propNode.getFirstChild().getNodeValue());
					}
					else if( "timeZone".equalsIgnoreCase( propName ) )
					{
						setTimeZone(propNode.getFirstChild().getNodeValue());
					}
					else if( "hostName".equalsIgnoreCase( propName ) )
					{
						setHostName(propNode.getFirstChild().getNodeValue());
					}
					else if( "hostIP".equalsIgnoreCase( propName ) )
					{
						setHostIP(propNode.getFirstChild().getNodeValue());
					}
					else if( "profileDescr".equalsIgnoreCase( propName ) )
					{
						setProfileDescr(propNode.getFirstChild().getNodeValue());
					}
					else if( "userGeoFence".equalsIgnoreCase( propName ) )
					{
						setUserGeoFence(propNode.getFirstChild().getNodeValue());
					}
					else if( "currentGeoPOS".equalsIgnoreCase( propName ) )
					{
						setCurrentGeoPOS(propNode.getFirstChild().getNodeValue());
					}
					else if( "dataMode".equalsIgnoreCase( propName ) )
					{
						setDataMode(propNode.getFirstChild().getNodeValue());
					}
					else if( "geoPosOption".equalsIgnoreCase( propName ) )
					{
						setGeoPosOption(propNode.getFirstChild().getNodeValue());
					}
					else if( "currentGeoPOSName".equalsIgnoreCase( propName ) )
					{
						setCurrentGeoPOSName(propNode.getFirstChild().getNodeValue());
					}
					else if( "geoPosAccuracy".equalsIgnoreCase( propName ) )
					{
						setGeoPosAccuracy(propNode.getFirstChild().getNodeValue());
					}
					else if( "logInInterface".equalsIgnoreCase( propName ) )
					{
						setLogInInterface(propNode.getFirstChild().getNodeValue());
					}
					else if( "macAddress".equalsIgnoreCase( propName ) )
					{
						setMacAddress(propNode.getFirstChild().getNodeValue());
					}
					//Added By Pankaj T. on 14-04-20 to set unique id as a termId in userInfo & this termId in chg_term column - start
					else if( "termId".equalsIgnoreCase( propName ) )
					{
						setTermId(propNode.getFirstChild().getNodeValue());
					}
					//Added By Pankaj T. on 14-04-20 to set unique id as a termId in userInfo & this termId in chg_term column - end
					else if( "remoteAddress".equalsIgnoreCase( propName ) )
					{
						setRemoteAddress(propNode.getFirstChild().getNodeValue());
					}
					else if( "userNetworkOption".equalsIgnoreCase( propName ) )
					{
						setUserNetworkOption(propNode.getFirstChild().getNodeValue());
					}
					else if("sessionId".equalsIgnoreCase( propName ) )
					{
						setSessionId(propNode.getFirstChild().getNodeValue());
					}
					else if( "isAllowOfflineEdit".equalsIgnoreCase( propName ) )
					{
						setIsAllowOfflineEdit(propNode.getFirstChild().getNodeValue());
					}
					else if( "isAllowOfflineDelete".equalsIgnoreCase( propName ) )
					{
						setIsAllowOfflineDelete(propNode.getFirstChild().getNodeValue());
					}
					//Changed By Pankaj T. on 21-10-19 set USER_CODE, MOBILE_NO, EMAIL_ID of user in userInfo - start
					else if( "loginUserId".equalsIgnoreCase( propName ) )
					{
						setLoginUserId(propNode.getFirstChild().getNodeValue());
					}
					else if( "loginMobileNo".equalsIgnoreCase( propName ) )
					{
						setLoginMobileNo(propNode.getFirstChild().getNodeValue());
					}
					else if( "loginEmailId".equalsIgnoreCase( propName ) )
					{
						setLoginEmailId(propNode.getFirstChild().getNodeValue());
					}
					//Changed By Pankaj T. on 21-10-19 set USER_CODE, MOBILE_NO, EMAIL_ID of user in userInfo - end
					//Added by Prasad on 24/07/19 END
				}
			}
		}
		//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - end
	}

	public void setLoginCode(String loginCode)
	{
		this.loginCode = loginCode;
	}

	public void setLoginPwd(String loginPwd)
	{
		this.loginPwd = loginPwd;
	}

	public void setCharEnc(String charEnc )
	{
		if( charEnc != null && charEnc.length() > 0 )
		{
			this.charEnc = charEnc;
		}
	}
	public String getCharEnc()
	{
		return this.charEnc;
	}

	public void setEmpCode(String empCode)
	{
		this.empCode = empCode;
	}

	public void setEmpName(String empName)
	{
		this.empName = empName;
	}
	public void setEmpFName(String empFName)
	{
		this.empFName = empFName;
	}
	public void setEmpMName(String empMName)
	{
		this.empMName = empMName;
	}
	public void setEmpLName(String empLName)
	{
		this.empLName = empLName;
	}
	//vikrant-end 12/09/2006
	/**
	 * this method sets the reportTo.
	 * @param	  reportTo Person to report to.

    */

	public void setReportTo(String reportTo)
	{
		this.reportTo = reportTo;
	}

	/**
	 * this method sets the Department No.
	 * @param	  deptNo Department number.

    */

	public void setDeptCode(String deptCode)
	{
		this.deptCode = deptCode;
	}

	/**
	 * this method sets the Department Name.
	 * @param	  deptName Department Name.

    */

	public void setDeptDescr(String deptDescr)
	{
		this.deptDescr = deptDescr;
	}

	public void setEmailIdOff(String emailIdOff)
	{
		this.emailIdOff = emailIdOff;
	}

	/**
	 * this method sets the Site Code.
	 * @param	 siteCode Sitecode.

    */
	public void setSiteCode(String siteCode)
	{
		this.siteCode = siteCode;
	}

	/**
	 * this method sets the Site Description.
	 * @param	  sitedescr Description of the site.

    */

	public void setSiteDescr(String siteDescr)
	{
		this.siteDescr = siteDescr;
	}

	/**
	 * this method sets the User Level.
	 * @param	  userlevel Level of the user.

    */

	public void setUserLevel(String userLevel)
	{
		this.userLevel = userLevel;
	}

	/**
	 * this method sets the User Type.
	 * @param	  userType Type of the user.

    */
	public void setUserType(String userType)
	{
		this.userType = userType;
	}

	/**
	 * this method sets the Entity code.
	 * @param	  entitycode The entity code.

    */

	public void setEntityCode(String entityCode)
	{
		this.entityCode = entityCode;
	}
	/**
	 * this method sets the User type
	 * @param	  usertype Usertype

    */

	/**
	 * this method sets the Profile ID.
	 * @param	  profileID Profile ID.

    */
	public void setProfileId(String profileId)
	{
		this.profileId = profileId;
	}

	/**
	 * this method sets the Division Code.
	 * @param	  divisionCode Division Code.

    */
	public void setItemSer(String itemSer)
	{
		this.itemSer = itemSer;
	}

	public void setIsBIUser(String isBiUser)
	{
		this.isBiUser = isBiUser;
	}

	// changes by madhup 10/02/07
	public void setRemoteHost(String remoteHost)
	{
		this.remoteHost =remoteHost;
	}

	//Changed by Pragyan on 11/08/07.
	public void setProfileIdRes(String profileIdRes)
	{
		this.profileIdRes = profileIdRes;
	}
	//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].Start
	public void setLoggerType(String loggerType)
	{
		this.loggerType = loggerType;
	}
	//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].End
	//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
	public void setStanCode(String stanCode)
	{
		this.stanCode = stanCode;
	}
	public void setDesignation(String designation)
	{
		this.designation = designation;
	}
	public void setDateJoin(String dateJoin)
	{
		this.dateJoin = dateJoin;
	}
	public void setDivision(String division)
	{
		this.division = division;
	}
	//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
	//Added by Nilesh on 21-Mar-2011 [MF01SUN037][To set remote host name]Start
	public void setRemoteHostName(String remoteHostName)
	{
		this.remoteHostName = remoteHostName;
	}
	//Added by Nilesh on 21-Mar-2011 [MF01SUN037][To set remote host name]End
	/**
	 * this method gets User
     * @return    String
    */
	public String getLoginCode()
	{
		return this.loginCode;
	}

	public String getLoginPwd()
	{
		return this.loginPwd;
	}

	/**
	 * this method gets Employee No
     * @return   String
    */

	public String getEmpCode()
	{
		return this.empCode;
	}

	/**
	 * this method gets Employee Name
     * @return   String
    */

	//vikrant-start 12/09/2006
	public String getEmpName()
	{
		return this.empName;
	}
	public String getEmpFName()
	{
		return this.empFName;
	}
	public String getEmpMName()
	{
		return this.empMName;
	}
	public String getEmpLName()
	{
		return this.empLName;
	}
	//vikrant-end 12/09/2006

	public String getReportTo()
	{
		return this.reportTo;
	}

	/**
	 * this method gets department No
     * @return    String.
    */

	public String getDeptCode()
	{
		return this.deptCode;
	}

	public String getDeptDescr()
	{
		return this.deptDescr;
	}


	public String getEmailIdOff()
	{
		return this.emailIdOff;
	}

	public String getSiteCode()
	{
		return this.siteCode;
	}

	public String getSiteDescr()
	{
		return this.siteDescr;
	}

	public String getEntityCode()
	{
		return this.entityCode;
	}

	public String getUserLevel()
	{
		return this.userLevel;
	}

	public String getUserType()
	{
		return this.userType;
	}

	public String getProfileId()
	{
		return this.profileId;
	}

	public String getItemSer()
	{
		return this.itemSer;
	}

	// changes by madhup 10/02/07
	public String getRemoteHost()
	{
		return this.remoteHost ;
	}

	//Changed by Pragyan on 11/08/07.
	public String getProfileIdRes()
	{
		return this.profileIdRes;
	}

	public String isBIUser()
	{
		return this.isBiUser;
	}
	//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].Start
	public String getLoggerType()
	{
		return this.loggerType;
	}
	//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].End
	//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
	public String getStanCode()
	{
		return this.stanCode;
	}
	public String getDesignation()
	{
		return this.designation;
	}
	public String getDateJoin()
	{
		return this.dateJoin;
	}
	public String getDivision()
	{
		return this.division;
	}
	//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
	//Changed by Pramod on 08-01-11[WS01SUN030 ||Generating country wise, language wise xsl and reading the same.For setting and getting user language and country]starts
	public void setUserLanguage(String userLanguage)
	{
		//Change by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into UserInfo]Start
		if( userLanguage != null && userLanguage.length() > 0 )
		{
			//this.user_language = userLanguage;
			this.userLanguage = userLanguage;
		}
		else
		{
			this.userLanguage = "en";
		}
		//Change by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into UserInfo]End
	}
	public String getUserLanguage()
	{
		//Change by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into UserInfo]Start
		//return this.user_language;
		return this.userLanguage;
	}
	public void setUserCountry(String userCountry)
	{
		//Change by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into UserInfo]Start
		if( userCountry != null && userCountry.length() > 0 )
		{
			//this.user_country =userCountry;
			this.userCountry =userCountry;
		}
		else
		{
			this.userCountry = "US";
		}
		//Change by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into UserInfo]End
	}
	public String getUserCountry()
	{
		//Change by Nilesh on 21-Mar-2011[WS01SUN062][Add language & country into UserInfo]Start
		//return this.user_country;
		return this.userCountry;
	}
	//Changed by Pramod on 08-01-11[WS01SUN030 ||Generating country wise, language wise xsl and reading the same.For setting and getting user language and country]Ends
	//Added by Nilesh on 21-Mar-2011 [MF01SUN037][To get remote host name]Start
	public String getRemoteHostName()
	{
		return this.remoteHostName;
	}
	//Added by Nilesh on 21-Mar-2011 [MF01SUN037][To get remote host name]End
	public String getPropValue( String propName )
	{
		String propValue = "";
		if( propName.equalsIgnoreCase( "loginCode" ) || propName.equalsIgnoreCase( "LOGIN_CODE" ) )
		{
			propValue = this.loginCode;
		}
		else if( propName.equalsIgnoreCase( "loginPwd" ) || propName.equalsIgnoreCase( "PASS_WD" ) )
		{
			propValue = this.loginPwd;
		}
		else if( propName.equalsIgnoreCase( "profileId" ) || propName.equalsIgnoreCase( "PROFILE_ID" ) )
		{
			propValue = this.profileId;
		}
		//Changed by Manish on 26/05/2007 to support serevr side PopUpParam to provide login_site as site_code
		//else if( propName.equalsIgnoreCase( "siteCode" ) || propName.equalsIgnoreCase( "SITE_CODE" ) )
		else if( propName.equalsIgnoreCase( "siteCode" ) || propName.equalsIgnoreCase( "SITE_CODE" )  || propName.equalsIgnoreCase( "LOGIN_SITE" ) )
		{
			propValue = this.siteCode;
		}
		else if( propName.equalsIgnoreCase( "empCode" ) || propName.equalsIgnoreCase( "EMP_CODE" ) )
		{
			propValue = this.empCode;
		}
		else if( propName.equalsIgnoreCase( "deptCode" ) || propName.equalsIgnoreCase( "DEPT_CODE" ) )
		{
			propValue = this.deptCode;
		}
		else if( propName.equalsIgnoreCase( "entityCode" ) || propName.equalsIgnoreCase( "ENTITY_CODE" ) )
		{
			propValue = this.entityCode;
		}
		else if( propName.equalsIgnoreCase( "userLevel" ) || propName.equalsIgnoreCase( "USER_LEVEL" ) )
		{
			propValue = this.userLevel;
		}
		else if( propName.equalsIgnoreCase( "userType" ) || propName.equalsIgnoreCase( "USER_TYPE" ) )
		{
			propValue = this.userType;
		}
		else if( propName.equalsIgnoreCase( "itemSer" ) || propName.equalsIgnoreCase( "ITEM_SER" ) )
		{
			propValue = this.itemSer;
		}
		else if( propName.equalsIgnoreCase( "isBiUser" ) || propName.equalsIgnoreCase( "IS_BI_USER" ) )
		{
			propValue = this.isBiUser;
		}
		else if( propName.equalsIgnoreCase( "charEnc" ) || propName.equalsIgnoreCase( "CHAR_ENC" ) )
		{
			propValue = this.charEnc;
		}
		// changes by madhup 10/02/07
		else if( propName.equalsIgnoreCase( "remoteHost" ) || propName.equalsIgnoreCase( "REMOTEHOST" ) )
		{
			propValue = this.remoteHost;
		}
		//Changed by Pragyan on 11/08/07 to retrieve new prop. resource profile id.
		else if( propName.equalsIgnoreCase( "profileIdRes" ) || propName.equalsIgnoreCase( "PROFILE_ID__RES" ) )
		{
			propValue = this.profileIdRes;
		}
		//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].Start
		else if( propName.equalsIgnoreCase( "loggerType" ) || propName.equalsIgnoreCase( "LOGGER_TYPE" ) )
		{
			propValue = this.loggerType;
		}
		//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].End
		//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
		else if( propName.equalsIgnoreCase( "stanCode" ) || propName.equalsIgnoreCase( "STAN_CD__HQ_DESCR" ) )
		{
			propValue = this.stanCode;
		}
		else if( propName.equalsIgnoreCase( "designation" ) || propName.equalsIgnoreCase( "DESIGNATION" ) )
		{
			propValue = this.designation;
		}
		else if( propName.equalsIgnoreCase( "dateJoin" ) || propName.equalsIgnoreCase( "DATE_JOIN" ) )
		{
			propValue = this.dateJoin;
		}
		else if( propName.equalsIgnoreCase( "division" ) || propName.equalsIgnoreCase( "DIVISION" ) )
		{
			//propValue = this.dateJoin;
			//Added by Sanjaya on [06/01/14, WS3ISUN001]
			propValue = this.division;
		}
		//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
		//Added By Shahu Mali on 08-10-13.[WS3GBAS001].START
		else if( propName.equalsIgnoreCase( "trans_db" ) || propName.equalsIgnoreCase( "TRANS_DB" ) )
		{
			propValue = this.transDB;
		}
		//Added By Shahu Mali on 08-10-13.[WS3GBAS001].END

		//Added by Prajyot 18MAR2014[Theme Implementation.]Start
		else if( propName.equalsIgnoreCase( "userTheme" ) || propName.equalsIgnoreCase( "USER_THEME" ) )
		{
			propValue = this.userTheme;
		}
		//Added by Prajyot 18MAR2014[Theme Implementation.]End
		//Added by Sagar B [04-APR-2019]START
		else if( propName.equalsIgnoreCase( "enterprise" ) || propName.equalsIgnoreCase( "ENTERPRISE" ) )
		{
			propValue = this.enterprise;
		}
		//Added by Sagar B [04-APR-2019]END
		
		//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - start
		else if( propName.equalsIgnoreCase( "smtpHost" ) || propName.equalsIgnoreCase( "SMTP_HOST" ) )
		{
			propValue = this.smtpHost;
		}
		else if( propName.equalsIgnoreCase( "smtpPort" ) || propName.equalsIgnoreCase( "SMTP_PORT" ) )
		{
			propValue = this.smtpPort;
		}
		else if( propName.equalsIgnoreCase( "smtpUser" ) || propName.equalsIgnoreCase( "SMTP_USER" ) )
		{
			propValue = this.smtpUser;
		}
		else if( propName.equalsIgnoreCase( "smtpPassWD" ) || propName.equalsIgnoreCase( "SMTP_PASS_WD" ) )
		{
			propValue = this.smtpPassWD;
		}
		else if( propName.equalsIgnoreCase( "smtpProtocolType" ) || propName.equalsIgnoreCase( "SMTP_PROTOCOL_TYPE" ) )
		{
			propValue = this.smtpProtocolType;
		}
		else if( propName.equalsIgnoreCase( "smtpMailFrom" ) || propName.equalsIgnoreCase( "SMTP_MAILFROM" ) )
		{
			propValue = this.smtpMailFrom;
		}
		else if( propName.equalsIgnoreCase( "adminEmialId" ) || propName.equalsIgnoreCase( "ADMIN_EMAIL_ID" ) )
		{
			propValue = this.smtpMailFrom;
		}
		//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - end
		
		return propValue;
	}

	public String toString()
	{
		StringBuffer userInfoStringBuf = new StringBuffer();
		// changed by mukesh for allowing to use special character in change  password and view dcr entry.15/09/09 .id -WS89NOV551
		// changes by mukesh are appending CDATA[] to all variables.
		userInfoStringBuf.append("<UserInfo>");

		//Changed by Prasad on 24/07/19 [Use Field to build all field xml data] START
		/*userInfoStringBuf.append("<loginCode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.loginCode).append("]]>");
		userInfoStringBuf.append("</loginCode>");

		//userInfoStringBuf.append("<loginPwd>");
		//userInfoStringBuf.append("<![CDATA[" ).append((this.loginPwd)).append("]]>");
		//userInfoStringBuf.append("</loginPwd>");

		userInfoStringBuf.append("<profileId>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.profileId).append("]]>");
		userInfoStringBuf.append("</profileId>");

		userInfoStringBuf.append("<siteCode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.siteCode).append("]]>");
		userInfoStringBuf.append("</siteCode>");

		userInfoStringBuf.append("<siteDescr>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.siteDescr).append("]]>");
		userInfoStringBuf.append("</siteDescr>");

		userInfoStringBuf.append("<empCode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.empCode).append("]]>");
		userInfoStringBuf.append("</empCode>");

		//vikrant-start 12/09/2006
		userInfoStringBuf.append("<empName>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.empName).append("]]>");
		userInfoStringBuf.append("</empName>");

		userInfoStringBuf.append("<empFName>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.empFName).append("]]>");
		userInfoStringBuf.append("</empFName>");

		userInfoStringBuf.append("<empMName>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.empMName).append("]]>");
		userInfoStringBuf.append("</empMName>");

		userInfoStringBuf.append("<empLName>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.empLName).append("]]>");
		userInfoStringBuf.append("</empLName>");
		//vikrant-end 12/09/2006

		userInfoStringBuf.append("<reportTo>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.reportTo).append("]]>");
		userInfoStringBuf.append("</reportTo>");

		userInfoStringBuf.append("<deptCode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.deptCode).append("]]>");
		userInfoStringBuf.append("</deptCode>");

		userInfoStringBuf.append("<deptDescr>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.deptDescr).append("]]>");
		userInfoStringBuf.append("</deptDescr>");

		userInfoStringBuf.append("<entityCode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.entityCode).append("]]>");
		userInfoStringBuf.append("</entityCode>");

		userInfoStringBuf.append("<userLevel>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.userLevel).append("]]>");
		userInfoStringBuf.append("</userLevel>");

		userInfoStringBuf.append("<userType>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.userType).append("]]>");
		userInfoStringBuf.append("</userType>");

		userInfoStringBuf.append("<itemSer>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.itemSer).append("]]>");
		userInfoStringBuf.append("</itemSer>");

		//vikrant-start 12/09/2006
		userInfoStringBuf.append("<isBiUser>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.isBiUser).append("]]>");
		userInfoStringBuf.append("</isBiUser>");
		//vikrant-end 12/09/2006

		//vikrant 13/09/2006
		userInfoStringBuf.append("<emailIdOff>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.emailIdOff).append("]]>");
		userInfoStringBuf.append("</emailIdOff>");
		//vikrant 13/09/2006

		userInfoStringBuf.append("<profileIdRes>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.profileIdRes).append("]]>");
		userInfoStringBuf.append("</profileIdRes>");

		userInfoStringBuf.append( "<charEnc>" );
		userInfoStringBuf.append("<![CDATA[" ).append( this.charEnc ).append("]]>");
		userInfoStringBuf.append("</charEnc>");

		// changes by madhup  10/02/07
		userInfoStringBuf.append("<remoteHost>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.remoteHost).append("]]>");
		userInfoStringBuf.append("</remoteHost>");

		//end madhup 10/02/07
		//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].Start
		userInfoStringBuf.append("<loggerType>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.loggerType).append("]]>");
		userInfoStringBuf.append("</loggerType>");
		 // changed by mukesh end [ to append CDATA to variables].
		//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].End

		//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
		userInfoStringBuf.append("<stanCode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.stanCode).append("]]>");
		userInfoStringBuf.append("</stanCode>");
		userInfoStringBuf.append("<designation>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.designation).append("]]>");
		userInfoStringBuf.append("</designation>");
		userInfoStringBuf.append("<dateJoin>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.dateJoin).append("]]>");
		userInfoStringBuf.append("</dateJoin>");
		userInfoStringBuf.append("<division>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.division).append("]]>");
		userInfoStringBuf.append("</division>");
		//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
		//Added By Shahu Mali on 08-10-13.[WS3GBAS001].START
		userInfoStringBuf.append("<transDB>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.transDB).append("]]>");
		userInfoStringBuf.append("</transDB>");
		//Added By Shahu Mali on 08-10-13.[WS3GBAS001].END

		//Added by Prajyot 18MAR2014[Theme Implementation.]Start
		userInfoStringBuf.append("<userTheme>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.userTheme).append("]]>");
		userInfoStringBuf.append("</userTheme>");
		//Added by Prajyot 18MAR2014[Theme Implementation.]End

		//Added By Prajyot on 05-JUN-2015 [Request ID : W15BMIT003 - Set Current Geo Position in Login trace and USER_INFO.]
		userInfoStringBuf.append("<currentGeoPOS>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.currentGeoPOS).append("]]>");
		userInfoStringBuf.append("</currentGeoPOS>");

		// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] START
		userInfoStringBuf.append("<userName>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.userName).append("]]>");
		userInfoStringBuf.append("</userName>");
		// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] END

		// Added by Ajinkya 10-MAR-2017 [to add dataMode into userInfoBean] START
		userInfoStringBuf.append("<dataMode>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.dataMode).append("]]>");
		userInfoStringBuf.append("</dataMode>");
		// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] END
		//Added by Pankaj R on 26-Oct-17 to add a enterprise image in this column
		userInfoStringBuf.append("<enterprise>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.enterprise).append("]]>");
		userInfoStringBuf.append("</enterprise>");
		//Added by Pankaj R on 26-Oct-17 to add a enterprise image in this column

		//added by shrutika [Start] on 05-02-18 for set city in case of login
		userInfoStringBuf.append("<city>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.city).append("]]>");
		userInfoStringBuf.append("</city>");
		//added by shrutika [End] on 05-02-18 for set city in case of login

		//Added by Shrutika on 15-02-18 for update fin_entity value when change the site code.
		userInfoStringBuf.append("<fin_entity>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.fin_entity).append("]]>");
		userInfoStringBuf.append("</fin_entity>");
		//Commented By Ravindra C on 06-09-18 for prevent SYSOUT.
		//BaseLogger.log("9",null,null,"inside user info bean...1607");
		//Added by Pratheek on 19-01-19 [to update facility code value when change the site.]-start
		userInfoStringBuf.append("<facility_code>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.facility_code).append("]]>");
		userInfoStringBuf.append("</facility_code>");
		//Added by Pratheek on 19-01-19 [to update facility code value when change the site.]-End
		
		userInfoStringBuf.append("<sessionId>");
		userInfoStringBuf.append("<![CDATA[" ).append(this.sessionId).append("]]>");
		userInfoStringBuf.append("</sessionId>");*/
		
		//determine fields declared in this class only (no fields of superclass)
		Field[] fields = this.getClass().getDeclaredFields();

		//print field names paired with their values
		for ( Field field : fields ) 
		{
			try 
			{
				String fieldName = field.getName();
				if ( ! "loginPwd".equalsIgnoreCase( fieldName ) && ! "userPrefList".equalsIgnoreCase(fieldName) )
				{
					userInfoStringBuf.append( "<" ).append( fieldName ).append( ">" );
					userInfoStringBuf.append( "<![CDATA[" ).append( field.get( this ) ).append( "]]>" );
					userInfoStringBuf.append( "</" ).append( fieldName ).append( ">" );
				}
			}
			catch ( IllegalAccessException ex ) 
			{
				BaseLogger.log( "9", null, null, "Exception :: userInfo.toString ["+ ex +"]" );
			}
		}
		//Changed by Prasad on 24/07/19 [Use Field to build all field xml data] END
		
		userInfoStringBuf.append("</UserInfo>");

		return userInfoStringBuf.toString();
	}
	//Changed by Rupali for the pophelp.Start
	public String getPopupValue( String propName )
	{
		String propValue = "";
		if( propName.equalsIgnoreCase( "loginCode" ) )
		{
			propValue = this.loginCode;
		}
		else if( propName.equalsIgnoreCase( "loginPwd" )  )
		{
			propValue = this.loginPwd;
		}
		else if( propName.equalsIgnoreCase( "profileId" ))
		{
			propValue = this.profileId;
		}
		//Changed by Manish on 26/05/2007 to support serevr side PopUpParam to provide login_site as site_code
		//else if( propName.equalsIgnoreCase( "siteCode" ) || propName.equalsIgnoreCase( "SITE_CODE" ) )
		else if( propName.equalsIgnoreCase( "siteCode" ) )
		{
			propValue = this.siteCode;
		}
		else if( propName.equalsIgnoreCase( "empCode" ) )
		{
			propValue = this.empCode;
		}
		else if( propName.equalsIgnoreCase( "deptCode" ) )
		{
			propValue = this.deptCode;
		}
		else if( propName.equalsIgnoreCase( "entityCode" ))
		{
			propValue = this.entityCode;
		}
		else if( propName.equalsIgnoreCase( "userLevel" ))
		{
			propValue = this.userLevel;
		}
		else if( propName.equalsIgnoreCase( "userType" ))
		{
			propValue = this.userType;
		}
		else if( propName.equalsIgnoreCase( "itemSer" ))
		{
			propValue = this.itemSer;
		}
		else if( propName.equalsIgnoreCase( "isBiUser" ))
		{
			propValue = this.isBiUser;
		}
		else if( propName.equalsIgnoreCase( "charEnc" ))
		{
			propValue = this.charEnc;
		}
		// changes by madhup 10/02/07
		else if( propName.equalsIgnoreCase( "remoteHost" ) )
		{
			propValue = this.remoteHost;
		}
		//Changed by Pragyan on 11/08/07 to retrieve new prop. resource profile id.
		else if( propName.equalsIgnoreCase( "profileIdRes" ) )
		{
			propValue = this.profileIdRes;
		}
		//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].Start
		else if( propName.equalsIgnoreCase( "loggerType" ))
		{
			propValue = this.loggerType;
		}
		//Changed by Rupali Hande on 26-08-2008 [to add the logger_status in userInfo]Request ID:-[BI89SUN007].End
		//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] starts
		else if( propName.equalsIgnoreCase( "stanCode" ))
		{
			propValue = this.stanCode;
		}
		else if( propName.equalsIgnoreCase( "designation" ))
		{
			propValue = this.designation;
		}
		else if( propName.equalsIgnoreCase( "dateJoin" ))
		{
			propValue = this.dateJoin;
		}
		else if( propName.equalsIgnoreCase( "division" ))
		{
			propValue = this.division;
		}
		//Changed by Swapnil Shirke on 01-Jul-2010 [to add stan_code__hq, designation, dateOfJoining, division in userInfo][WS90SUN043] ends
		//Added By Shahu Mali on 08-10-13.START
		else if( propName.equalsIgnoreCase( "transDB" ))
		{
			propValue = this.transDB;
		}
		//Added By Shahu Mali on 08-10-13.END
		//Added by Prajyot 18MAR2014[Theme Implementation.]Start
		else if( propName.equalsIgnoreCase( "userTheme" ) )
		{
			propValue = this.userTheme;
		}
		//Added by Prajyot 18MAR2014[Theme Implementation.]End
		
		//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - start
		else if( propName.equalsIgnoreCase( "smtpHost" ) )
		{
			propValue = this.smtpHost;
		}
		else if( propName.equalsIgnoreCase( "smtpPort" ) )
		{
			propValue = this.smtpPort;
		}
		else if( propName.equalsIgnoreCase( "smtpUser" ) )
		{
			propValue = this.smtpUser;
		}
		else if( propName.equalsIgnoreCase( "smtpPassWD" ) )
		{
			propValue = this.smtpPassWD;
		}
		else if( propName.equalsIgnoreCase( "smtpProtocolType" ) )
		{
			propValue = this.smtpProtocolType;
		}
		else if( propName.equalsIgnoreCase( "smtpMailFrom" ) )
		{
			propValue = this.smtpMailFrom;
		}
		else if( propName.equalsIgnoreCase( "adminEmailId" ) )
		{
			propValue = this.smtpMailFrom;
		}
		//Added by Pankaj T. on 10-04-2020 for Configure SMTP mail server against ENTERPRISE - end
		
		return propValue;
	}
	//Changed by Rupali for the pophelp.End

	//Added By Shahu Mali on 08-10-13.[WS3GBAS001].START
	public void setTransDB(String transDB)
    {
        //Added By Ajinkya Gopalkar on 30-NOV-17 [For Multi-tenancy]
		if(transDB != null && !"null".equalsIgnoreCase(transDB.trim()) && transDB.trim().length() > 0)
		{
			this.transDB = transDB;
		}
		else
		{
			this.transDB = "Driver";
		}
		//Added By Ajinkya Gopalkar on 30-NOV-17 [For Multi-tenancy]
    }
	public String getTransDB()
    {
        return this.transDB;
    }
	//Added By Shahu Mali on 08-10-13.[WS3GBAS001].END

	//Added by Prajyot 18MAR2014[Theme Implementation.]
	public void setUserTheme( String userTheme )
	{
		if( userTheme != null && userTheme.length() > 0 )
		{
			this.userTheme = userTheme;
		}
		else
		{
			this.userTheme = "default";
		}

	}
	//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]Start
	public void setUxInterface( String uxInterface )
	{
		if( uxInterface != null && uxInterface.length() > 0 )
		{
			if( uxInterface.equalsIgnoreCase( "1" ) )
			{
				this.uxInterface = "Standard";
			}
			else
			{
				this.uxInterface = "Galaxy";
			}
		}
		else
		{
			this.uxInterface = "Galaxy";
		}
	}
	//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]End

	public String getUserTheme()
	{
		return userTheme;
	}
	//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]Start
	public String getUxInterface()
	{
		return uxInterface;
	}
	//Added by Vishal Pathare on 4-AUG-2016 for[getting <UX_INTERFACE> for applying themes]End
	//Added by Dnyaneshwar Chavan on 4-Apr-14 [Add timeZone Data member in user info been as per Danish sir ] Start
	public String getTimeZone() {
		return timeZone;
	}

	public void setTimeZone(String timeZone) {
		this.timeZone = timeZone;
	}
	//Added by Dnyaneshwar Chavan on 4-Apr-14 [Add timeZone Data member in user info been as per Danish sir  ] End

	// Added by Raju K on 02-05-14 for Event log and Transaction lock as per danish sir START--
	//Addedd By Mahesh Patidar on 01/AUG/13[WI3DSUN001|to set session id in userinfo for event logging]
	private String sessionId = "";
	public void setSessionId(String sessionId)
	{
		this.sessionId = sessionId;
	}
	public String getSesstionId()
	{
		return this.sessionId;
	}
	//Ended By Mahesh Patidar
	// Ended by Raju K on 02-05-14 for Event log and Transaction lock as per danish sir END--
	//Added by Dnyaneshwar Chavan on 15-JAN-15  [ Host name & IP are store in LoginTrace table ] End
	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public String getHostIP() {
		return hostIP;
	}

	public void setHostIP(String hostIP) {
		this.hostIP = hostIP;
	}
	//Added by Dnyaneshwar Chavan on 15-JAN-15  [ Host name & IP are store in LoginTrace table ] End

	//Added By Prajyot on 05-JUN-2015 [Getter / Setter for Profile Description]
	public String getProfileDescr()
	{
		return this.profileDescr;
	}

	public void setProfileDescr(String profileDescr)
	{
		this.profileDescr = profileDescr;
	}

	//Added by Reema on 11-sep-15 [get & set users geoFence value]-start
	public String getUserGeoFence() {
		return userGeoFence;
	}

	public void setUserGeoFence(String userGeoFence) {
		this.userGeoFence = userGeoFence;
	}
	//Added by Reema on 11-sep-15 [get & set users geoFence value]-End

	//Added By Prajyot on 05-JUN-2015 [Request ID : W15BMIT003 - Set Current Geo Position in Login trace and USER_INFO.]
	public String getCurrentGeoPOS() {
		return E12GenericUtility.checkNull(currentGeoPOS);
	}

	public void setCurrentGeoPOS(String currentGeoPOS) {
		BaseLogger.log("2",null,null,"Setting Current Geo Position...");
		this.currentGeoPOS = E12GenericUtility.checkNull(currentGeoPOS);
	}

	// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] START
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = E12GenericUtility.checkNull(userName);
	}
	// Added by Sandeshs 09-Feb-2016 [Req:S15JBAS002 Social Post] END

	// Added by Sandeshs 23-Feb-2016 [Req:S15KBAS001] START
	public String getIsPasswordStore() {
		return isPasswordStore;
	}

	public void setIsPasswordStore(String isPasswordStore) {
		this.isPasswordStore = isPasswordStore;
	}
	// Added by Sandeshs 23-Feb-2016 [Req:S15KBAS001] START

	// Added by Abhishek on 11.03.2016 [Req ID : S15LBAS004 Authentication chnages ] START
	public String getEntryType() {
		return entryType;
	}
	public void setEntryType(String entryType) {
		this.entryType = entryType;
	}

	public String getEntryId() {
		return entryId;
	}
	public void setEntryId(String entryId) {
		this.entryId = entryId;
	}
	// Added by Abhishek on 11.03.2016 [Req ID : S15LBAS004 Authentication changes ] END

	// Added by Sandeshs 21-Jun-2016 [Req:W15BSUN011] START
	public String getDefaultMenu() {
		return defaultMenu;
	}

	public void setDefaultMenu(String defaultMenu) {
		this.defaultMenu = defaultMenu;
	}
	// Added by Sandeshs 21-Jun-2016 [Req:W15BSUN011] END

	//Added By Ajinkya Gopalkar on 9-MAR-17[For store device ID in userInfo] Start
	public String getDeviceID() {
		return deviceID;
	}

	public void setDeviceID(String deviceID) {
		this.deviceID = deviceID;
	}
	//Added By Ajinkya Gopalkar on 9-MAR-17[For store device ID in userInfo] End
	//Added by Sainath on 20/09/18 [add deviceType in userInfo] START
	public String getDeviceType()
	{
		return deviceType;
	}

	public void setDeviceType(String deviceType)
	{
		this.deviceType=deviceType;
	}
	//Added by Sainath on 20/09/18 [add deviceType in userInfo] END

	//Added By Suraj on 20-march-2017 [To configure footer options in slide menu panel ]Start
	public String getFeatures() {
		return features;
	}

	public void setFeatures(String features) {
		this.features = features;
	}
	//Added By Suraj on 20-march-2017 [To configure footer options in slide menu panel ]End


	//Added By Ajinkya Gopalkar on 10-MAR-17[For store data Mode in userInfo] Start
	public String getDataMode() {
		return E12GenericUtility.checkNull(dataMode);
	}

	public void setDataMode(String dataMode) {
		this.dataMode = E12GenericUtility.checkNull(dataMode);
	}
	//Added By Ajinkya Gopalkar on 10-MAR-17[For store data Mode in userInfo] End

	//Added by Pankaj R on 26-Oct-17 to add a enterprise image in this column
	public String getEnterprise() {
		return enterprise;
	}

	public void setEnterprise(String enterprise) {
		this.enterprise = enterprise;
	}
	//Added by Pankaj R on 26-Oct-17 to add a enterprise image in this column
	
	//Added by Jay k to add a social opt column
		public String getSocialOpt() {
			return socialOpt;
		}

		public void setSocialOpt(String socialOpt) {
			this.socialOpt = socialOpt;
		}
	//Added by Jay k to add a social opt column

	//Added by Sagar B. to track GPS configuration on user level on [11-JAN-18]START
	public String getGeoPosOption() {
		return geoPosOption;
	}

	public void setGeoPosOption(String geoPosOption) {
		this.geoPosOption = geoPosOption;
	}
	//Added by Sagar B. to track GPS configuration on user level on [11-JAN-18]END

	//Added by Shrutika on 14-02-18 [Start] for get and set fin_entity value when login or change the site code.
	public String getFin_entity() {
		return fin_entity;
	}

	public void setFin_entity(String fin_entity) {
		this.fin_entity = fin_entity;
	}
	//Added by Shrutika on 14-02-18 [End] for get and set fin_entity value when login or change the site code.

	//Added by Sagar B. to track address of current geopos and store in table[10-Apr-18]START
	public String getCurrentGeoPOSName() {
		return currentGeoPOSName;
	}

	public void setCurrentGeoPOSName(String currentGeoPOSName) {
		this.currentGeoPOSName = currentGeoPOSName;
	}
	//Added by Sagar B. to track address of current geopos and store in table[10-Apr-18]END
	//Changes made by Pratheek on 29-01-19[ to get and set facility code value when login or change the site ]-Start
	public String getFacility_code() {
		return facility_code;
	}

	public void setFacility_code(String facility_code) {
		this.facility_code = facility_code;
	}
	//Changes made by Pratheek on 29-01-19[ to get and set facility code value when login or change the site ]-End
	//Added by Sagar B. to set offline edit configuration enterprise-wise[13-Mar-19]START
	private String isAllowOfflineEdit = "Y";
	public String getIsAllowOfflineEdit() {
		return isAllowOfflineEdit;
	}

	public void setIsAllowOfflineEdit(String isAllowOfflineEdit) {
		this.isAllowOfflineEdit = isAllowOfflineEdit;
	}
	//Added by Sagar B. to set offline edit configuration enterprise-wise[13-Mar-19]END
	//Added by Sagar B. to set offline delete configuration enterprise-wise[13-Mar-19]START
	private String isAllowOfflineDelete = "Y";
	public String getIsAllowOfflineDelete() {
		return isAllowOfflineDelete;
	}

	public void setIsAllowOfflineDelete(String isAllowOfflineDelete) {
		this.isAllowOfflineDelete = isAllowOfflineDelete;
	}
	//Added by Sagar B. to set offline delete configuration enterprise-wise[13-Mar-19]END

	//Changed By Pankaj T. on 21-10-19 set USER_CODE, MOBILE_NO, EMAIL_ID of user in userInfo - start
	public String getLoginUserId() {
		return loginUserId;
	}

	public void setLoginUserId(String loginUserId) {
		this.loginUserId = loginUserId;
	}

	public String getLoginMobileNo() {
		return loginMobileNo;
	}

	public void setLoginMobileNo(String loginMobileNo) {
		this.loginMobileNo = loginMobileNo;
	}

	public String getLoginEmailId() {
		return loginEmailId;
	}

	public void setLoginEmailId(String loginEmailId) {
		this.loginEmailId = loginEmailId;
	}
    //Changed By Pankaj T. on 21-10-19 set USER_CODE, MOBILE_NO, EMAIL_ID of user in userInfo - end
    
	//Added by Jatin M on 24-Jun-2022 [To set prior session timeout in UserInfoBean] - START
    public String getSessTimeoutInSec() {
		return sessTimeoutInSecs;
	}

	public void setSessTimeoutInSec(String sessTimeoutInSecs) {
		this.sessTimeoutInSecs = sessTimeoutInSecs;
	}
	//Added by Jatin M on 24-Jun-2022 [To set prior session timeout in UserInfoBean] - END
}
