public class FocalConstants {
	
	private FocalConstants() {
		
	}
	
	public static final String TITLE_POSTFIX = ".title";
	public static final String MESSAGE_POSTFIX = ".message";
	
	public static final String STATUS_ERROR_SAVE = "focal.status.error.save";
	public static final String STATUS_ERROR_SAVE_TITLE = "focal.status.error.save.title";
	public static final String STATUS_ERROR_SAVE_MESSAGE = "focal.status.error.save.message";
	
	public static final String STATUS_SUCCESS_SAVE = "focal.status.success.save";
	public static final String STATUS_SUCCESS_SAVE_TITLE = "focal.status.success.save.title";
	public static final String STATUS_SUCCESS_SAVE_MESSAGE = "focal.status.success.save.message";
	
	public static final String STATUS_ERROR_SAVE_CUSTOMER = "focal.status.error.save.customer";
	public static final String STATUS_ERROR_SAVE_CUSTOMER_TITLE = "focal.status.error.save.customer.title";
	public static final String STATUS_ERROR_SAVE_CUSTOMER_MESSAGE = "focal.status.error.save.customer.message";
	
	public static final String STATUS_SUCCESS_SAVE_CUSTOMER = "focal.status.success.save.customer";
	public static final String STATUS_SUCCESS_SAVE_CUSTOMER_TITLE = "focal.status.success.save.customer.title";
	public static final String STATUS_SUCCESS_SAVE_CUSTOMER_MESSAGE = "focal.status.success.save.customer.message";
	
	public static final String STATUS_SUCCESS_CREATE_COMPANY = "focal.status.success.create.company";
	public static final String STATUS_SUCCESS_CREATE_COMPANY_TITLE = "focal.status.success.create.company.title";
	public static final String STATUS_SUCCESS_CREATE_COMPANY_MESSAGE = "focal.status.success.create.company.message";
	
	public static final String STATUS_ERROR_CREATE_COMPANY = "focal.status.error.create.company";
	public static final String STATUS_ERROR_CREATE_COMPANY_TITLE = "focal.status.error.create.company.title";
	public static final String STATUS_ERROR_CREATE_COMPANY_MESSAGE = "focal.status.error.create.company.message";
	
	public static final String STATUS_ERROR_FIND_PROJECTS = "focal.status.error.findprojects";
	public static final String STATUS_ERROR_FIND_PROJECTS_TITLE = "focal.status.error.findprojects.title";
	public static final String STATUS_ERROR_FIND_PROJECTS_MESSAGE = "focal.status.error.findprojects.message";
	
	public static final String STATUS_ERROR_FIND_NOPROJECTS = "focal.status.error.noprojects";
	public static final String STATUS_ERROR_EMPTY_SEARCH_STRING = "focal.status.error.nosearch";
	public static final String STATUS_SUCCESS_PROJECTS = "focal.status.success.projects";

} public class IWBundleStarter implements IWBundleStartable {
	
	public static final String IW_BUNDLE_IDENTIFIER = "is.idega.idegaweb.egov.cases.focal";

	public void start(IWBundle starterBundle) {
		GlobalIncludeManager.getInstance().addBundleStyleSheet(IW_BUNDLE_IDENTIFIER, "/style/focal.css");
		CaseCodeManager.getInstance().addCaseBusinessForCode(CasesConstants.CASE_CODE_KEY, CasesBusiness.class);
		registerCaseChangeListener(starterBundle);
	}

	public void stop(IWBundle starterBundle) {
	}
	
	private void registerCaseChangeListener(IWBundle starterBundle) {
	}

} public class FocalProjectList {
	
	private List projects = new ArrayList();

	public List getProjects() {
		return projects;
	}

	public void setProjects(List projects) {
		this.projects = projects;
	}

} public interface ExportCasesManagement extends IBOService {

	/**
	 * 
	 * <p>
	 * Updates case external id with a project id which the case was created under
	 * <br />
	 * Cases updated are only those containing success status mean to describe if move to focal system was successful
	 * </p>
	 * 
	 * @param cases - list of is.idega.idegaweb.egov.cases.focal.business.beans.CaseArg
	 */
	public abstract void updateCasesExternalId(String project_id, List cases);
} public interface FocalCasesIntegration extends IBOService {
	/**
	 * @see is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegrationBean#findProjects
	 */
	public List findProjects(String search_txt) throws Exception,
			RemoteException;

	/**
	 * @see is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegrationBean#createCompany
	 */
	public Status createCompany(CompanyInfo companyInfo) throws Exception,
			RemoteException;

	/**
	 * @see is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegrationBean#createCustomerBean
	 */
	public CustomerPersonalInfo createCustomerBean(String personalID,
			IWContext iwc) throws Exception, RemoteException;

	/**
	 * @see is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegrationBean#findCustomer
	 */
	public CUSTOMER findCustomer(String search_txt) throws Exception,
			RemoteException;

	/**
	 * @see is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegrationBean#createCasesUnderProject
	 */
	public List createCasesUnderProject(String project_id, String projectName,
			List cases) throws Exception, RemoteException;

	/**
	 * @see is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegrationBean#createUpdateCustomer
	 */
	public Status createUpdateCustomer(CustomerPersonalInfo customer)
			throws Exception, RemoteException;
} public class UnsuccessfulStatusException extends Exception {

	private static final long serialVersionUID = 8020380823364682303L;
	
	public UnsuccessfulStatusException()
    {
    }

    public UnsuccessfulStatusException(String s)
    {
        super(s);
    }

    public UnsuccessfulStatusException(String s, Throwable throwable)
    {
        super(s, throwable);
    }

    public UnsuccessfulStatusException(Throwable throwable)
    {
        super(throwable);
    }
	
	private Status status;

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

} public class CaseArg {
	
	private GeneralCase gcase;
	private Status status;
	
	public GeneralCase getGcase() {
		return gcase;
	}
	public void setGcase(GeneralCase gcase) {
		this.gcase = gcase;
	}
	public Status getStatus() {
		return status;
	}
	public void setStatus(Status status) {
		this.status = status;
	}
} public class CompanyInfo {
	
	private String address1;
    private String address2;
    private String companyName;
    private String county;
    private String country;
    private String email;
    private String fax;
    private String homepage;
    private String language;
    private String location;
    private String phoneWork;
    private String postAddress;
    private String socNumber;
    private String status;
    private boolean targetMail;
    
	public String getAddress1() {
		return address1;
	}
	public void setAddress1(String address1) {
		this.address1 = address1;
	}
	public String getAddress2() {
		return address2;
	}
	public void setAddress2(String address2) {
		this.address2 = address2;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getCounty() {
		return county;
	}
	public void setCounty(String county) {
		this.county = county;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public String getHomepage() {
		return homepage;
	}
	public void setHomepage(String homepage) {
		this.homepage = homepage;
	}
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public String getPhoneWork() {
		return phoneWork;
	}
	public void setPhoneWork(String phoneWork) {
		this.phoneWork = phoneWork;
	}
	public String getPostAddress() {
		return postAddress;
	}
	public void setPostAddress(String postAddress) {
		this.postAddress = postAddress;
	}
	public String getSocNumber() {
		return socNumber;
	}
	public void setSocNumber(String socNumber) {
		this.socNumber = socNumber;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public boolean isTargetMail() {
		return targetMail;
	}
	public void setTargetMail(boolean targetMail) {
		this.targetMail = targetMail;
	}

} public class Status {
	
	public static final int success 				= 0;
	public static final int unknown_fail 			= 1;
	public static final int no_customer 			= 2;
	public static final int no_projects 			= 3;
	public static final int failed_to_save 			= 6;
	
	/*
	 * "1" = Error with getting a support document. A more detailed error message comes within "errorText"
		"2" =  errorText = "Error: User does not have access to use this webservice"
		"3" = errorText = "Error: Database was not found on "| + strServer + | " - " |  + strPath +|"|
		"6" = errorText = " Error: The saving of a document in the document system was not successful" + Cstr(Err) + "   -   " + Error  (A more detailed explanation comes why saving was not successful)
		"0" = OK, no errorText sent with
		"100" = errorText = "Error  " + Cstr(Err) + "   -   " + Error   (These are errors that I can not forsee, and therefore here come direct error messages from Notes in errorText) 
	 */
	
	private int status = -1;
	
	public Status(int status) {
		
		if(status < 0 || (status > 3 && status != 6))
			throw new RuntimeException("Value not supported: "+status);
		
		this.status = status;
	}
	
	public Integer getStatus() {
		
		return new Integer(status);
	}
} public class CUSTOMER  extends is.idega.idegaweb.egov.cases.focal.business.server.focalService.RETURNSTATUS  implements java.io.Serializable {
    private java.lang.String ADDRESS1;

    private java.lang.String ADDRESS2;

    private java.lang.String AVARP;

    private java.lang.String BEEPER;

    private java.lang.String CARPHONE;

    private java.lang.String CONTACTSEPERATOR;

    private java.lang.String COUNTY;

    private java.lang.String COUNTRY;

    private java.lang.String CUSTOMERNAME;

    private java.lang.String DEPARTMENT;

    private java.lang.String EMAILADDRESS;

    private java.lang.String FAX;

    private java.lang.String FAXOFFICE;

    private java.lang.String GSM;

    private java.lang.String HOMEPAGE;

    private java.lang.String JOBSTATUS;

    private java.lang.String LANGUAGE;

    private java.lang.String PHONEHOME;

    private java.lang.String PHONEOFFICE;

    private java.lang.String PHONEWORK;

    private java.lang.String POSTADDRESS;

    private java.lang.String TITLE;

    public CUSTOMER() {
    }

    public CUSTOMER(
           java.lang.String ERRORTEXT,
           java.lang.String STATUS,
           java.lang.String ADDRESS1,
           java.lang.String ADDRESS2,
           java.lang.String AVARP,
           java.lang.String BEEPER,
           java.lang.String CARPHONE,
           java.lang.String CONTACTSEPERATOR,
           java.lang.String COUNTY,
           java.lang.String COUNTRY,
           java.lang.String CUSTOMERNAME,
           java.lang.String DEPARTMENT,
           java.lang.String EMAILADDRESS,
           java.lang.String FAX,
           java.lang.String FAXOFFICE,
           java.lang.String GSM,
           java.lang.String HOMEPAGE,
           java.lang.String JOBSTATUS,
           java.lang.String LANGUAGE,
           java.lang.String PHONEHOME,
           java.lang.String PHONEOFFICE,
           java.lang.String PHONEWORK,
           java.lang.String POSTADDRESS,
           java.lang.String TITLE) {
        super(
            ERRORTEXT,
            STATUS);
        this.ADDRESS1 = ADDRESS1;
        this.ADDRESS2 = ADDRESS2;
        this.AVARP = AVARP;
        this.BEEPER = BEEPER;
        this.CARPHONE = CARPHONE;
        this.CONTACTSEPERATOR = CONTACTSEPERATOR;
        this.COUNTY = COUNTY;
        this.COUNTRY = COUNTRY;
        this.CUSTOMERNAME = CUSTOMERNAME;
        this.DEPARTMENT = DEPARTMENT;
        this.EMAILADDRESS = EMAILADDRESS;
        this.FAX = FAX;
        this.FAXOFFICE = FAXOFFICE;
        this.GSM = GSM;
        this.HOMEPAGE = HOMEPAGE;
        this.JOBSTATUS = JOBSTATUS;
        this.LANGUAGE = LANGUAGE;
        this.PHONEHOME = PHONEHOME;
        this.PHONEOFFICE = PHONEOFFICE;
        this.PHONEWORK = PHONEWORK;
        this.POSTADDRESS = POSTADDRESS;
        this.TITLE = TITLE;
    }


    /**
     * Gets the ADDRESS1 value for this CUSTOMER.
     * 
     * @return ADDRESS1
     */
    public java.lang.String getADDRESS1() {
        return ADDRESS1;
    }


    /**
     * Sets the ADDRESS1 value for this CUSTOMER.
     * 
     * @param ADDRESS1
     */
    public void setADDRESS1(java.lang.String ADDRESS1) {
        this.ADDRESS1 = ADDRESS1;
    }


    /**
     * Gets the ADDRESS2 value for this CUSTOMER.
     * 
     * @return ADDRESS2
     */
    public java.lang.String getADDRESS2() {
        return ADDRESS2;
    }


    /**
     * Sets the ADDRESS2 value for this CUSTOMER.
     * 
     * @param ADDRESS2
     */
    public void setADDRESS2(java.lang.String ADDRESS2) {
        this.ADDRESS2 = ADDRESS2;
    }


    /**
     * Gets the AVARP value for this CUSTOMER.
     * 
     * @return AVARP
     */
    public java.lang.String getAVARP() {
        return AVARP;
    }


    /**
     * Sets the AVARP value for this CUSTOMER.
     * 
     * @param AVARP
     */
    public void setAVARP(java.lang.String AVARP) {
        this.AVARP = AVARP;
    }


    /**
     * Gets the BEEPER value for this CUSTOMER.
     * 
     * @return BEEPER
     */
    public java.lang.String getBEEPER() {
        return BEEPER;
    }


    /**
     * Sets the BEEPER value for this CUSTOMER.
     * 
     * @param BEEPER
     */
    public void setBEEPER(java.lang.String BEEPER) {
        this.BEEPER = BEEPER;
    }


    /**
     * Gets the CARPHONE value for this CUSTOMER.
     * 
     * @return CARPHONE
     */
    public java.lang.String getCARPHONE() {
        return CARPHONE;
    }


    /**
     * Sets the CARPHONE value for this CUSTOMER.
     * 
     * @param CARPHONE
     */
    public void setCARPHONE(java.lang.String CARPHONE) {
        this.CARPHONE = CARPHONE;
    }


    /**
     * Gets the CONTACTSEPERATOR value for this CUSTOMER.
     * 
     * @return CONTACTSEPERATOR
     */
    public java.lang.String getCONTACTSEPERATOR() {
        return CONTACTSEPERATOR;
    }


    /**
     * Sets the CONTACTSEPERATOR value for this CUSTOMER.
     * 
     * @param CONTACTSEPERATOR
     */
    public void setCONTACTSEPERATOR(java.lang.String CONTACTSEPERATOR) {
        this.CONTACTSEPERATOR = CONTACTSEPERATOR;
    }


    /**
     * Gets the COUNTY value for this CUSTOMER.
     * 
     * @return COUNTY
     */
    public java.lang.String getCOUNTY() {
        return COUNTY;
    }


    /**
     * Sets the COUNTY value for this CUSTOMER.
     * 
     * @param COUNTY
     */
    public void setCOUNTY(java.lang.String COUNTY) {
        this.COUNTY = COUNTY;
    }


    /**
     * Gets the COUNTRY value for this CUSTOMER.
     * 
     * @return COUNTRY
     */
    public java.lang.String getCOUNTRY() {
        return COUNTRY;
    }


    /**
     * Sets the COUNTRY value for this CUSTOMER.
     * 
     * @param COUNTRY
     */
    public void setCOUNTRY(java.lang.String COUNTRY) {
        this.COUNTRY = COUNTRY;
    }


    /**
     * Gets the CUSTOMERNAME value for this CUSTOMER.
     * 
     * @return CUSTOMERNAME
     */
    public java.lang.String getCUSTOMERNAME() {
        return CUSTOMERNAME;
    }


    /**
     * Sets the CUSTOMERNAME value for this CUSTOMER.
     * 
     * @param CUSTOMERNAME
     */
    public void setCUSTOMERNAME(java.lang.String CUSTOMERNAME) {
        this.CUSTOMERNAME = CUSTOMERNAME;
    }


    /**
     * Gets the DEPARTMENT value for this CUSTOMER.
     * 
     * @return DEPARTMENT
     */
    public java.lang.String getDEPARTMENT() {
        return DEPARTMENT;
    }


    /**
     * Sets the DEPARTMENT value for this CUSTOMER.
     * 
     * @param DEPARTMENT
     */
    public void setDEPARTMENT(java.lang.String DEPARTMENT) {
        this.DEPARTMENT = DEPARTMENT;
    }


    /**
     * Gets the EMAILADDRESS value for this CUSTOMER.
     * 
     * @return EMAILADDRESS
     */
    public java.lang.String getEMAILADDRESS() {
        return EMAILADDRESS;
    }


    /**
     * Sets the EMAILADDRESS value for this CUSTOMER.
     * 
     * @param EMAILADDRESS
     */
    public void setEMAILADDRESS(java.lang.String EMAILADDRESS) {
        this.EMAILADDRESS = EMAILADDRESS;
    }


    /**
     * Gets the FAX value for this CUSTOMER.
     * 
     * @return FAX
     */
    public java.lang.String getFAX() {
        return FAX;
    }


    /**
     * Sets the FAX value for this CUSTOMER.
     * 
     * @param FAX
     */
    public void setFAX(java.lang.String FAX) {
        this.FAX = FAX;
    }


    /**
     * Gets the FAXOFFICE value for this CUSTOMER.
     * 
     * @return FAXOFFICE
     */
    public java.lang.String getFAXOFFICE() {
        return FAXOFFICE;
    }


    /**
     * Sets the FAXOFFICE value for this CUSTOMER.
     * 
     * @param FAXOFFICE
     */
    public void setFAXOFFICE(java.lang.String FAXOFFICE) {
        this.FAXOFFICE = FAXOFFICE;
    }


    /**
     * Gets the GSM value for this CUSTOMER.
     * 
     * @return GSM
     */
    public java.lang.String getGSM() {
        return GSM;
    }


    /**
     * Sets the GSM value for this CUSTOMER.
     * 
     * @param GSM
     */
    public void setGSM(java.lang.String GSM) {
        this.GSM = GSM;
    }


    /**
     * Gets the HOMEPAGE value for this CUSTOMER.
     * 
     * @return HOMEPAGE
     */
    public java.lang.String getHOMEPAGE() {
        return HOMEPAGE;
    }


    /**
     * Sets the HOMEPAGE value for this CUSTOMER.
     * 
     * @param HOMEPAGE
     */
    public void setHOMEPAGE(java.lang.String HOMEPAGE) {
        this.HOMEPAGE = HOMEPAGE;
    }


    /**
     * Gets the JOBSTATUS value for this CUSTOMER.
     * 
     * @return JOBSTATUS
     */
    public java.lang.String getJOBSTATUS() {
        return JOBSTATUS;
    }


    /**
     * Sets the JOBSTATUS value for this CUSTOMER.
     * 
     * @param JOBSTATUS
     */
    public void setJOBSTATUS(java.lang.String JOBSTATUS) {
        this.JOBSTATUS = JOBSTATUS;
    }


    /**
     * Gets the LANGUAGE value for this CUSTOMER.
     * 
     * @return LANGUAGE
     */
    public java.lang.String getLANGUAGE() {
        return LANGUAGE;
    }


    /**
     * Sets the LANGUAGE value for this CUSTOMER.
     * 
     * @param LANGUAGE
     */
    public void setLANGUAGE(java.lang.String LANGUAGE) {
        this.LANGUAGE = LANGUAGE;
    }


    /**
     * Gets the PHONEHOME value for this CUSTOMER.
     * 
     * @return PHONEHOME
     */
    public java.lang.String getPHONEHOME() {
        return PHONEHOME;
    }


    /**
     * Sets the PHONEHOME value for this CUSTOMER.
     * 
     * @param PHONEHOME
     */
    public void setPHONEHOME(java.lang.String PHONEHOME) {
        this.PHONEHOME = PHONEHOME;
    }


    /**
     * Gets the PHONEOFFICE value for this CUSTOMER.
     * 
     * @return PHONEOFFICE
     */
    public java.lang.String getPHONEOFFICE() {
        return PHONEOFFICE;
    }


    /**
     * Sets the PHONEOFFICE value for this CUSTOMER.
     * 
     * @param PHONEOFFICE
     */
    public void setPHONEOFFICE(java.lang.String PHONEOFFICE) {
        this.PHONEOFFICE = PHONEOFFICE;
    }


    /**
     * Gets the PHONEWORK value for this CUSTOMER.
     * 
     * @return PHONEWORK
     */
    public java.lang.String getPHONEWORK() {
        return PHONEWORK;
    }


    /**
     * Sets the PHONEWORK value for this CUSTOMER.
     * 
     * @param PHONEWORK
     */
    public void setPHONEWORK(java.lang.String PHONEWORK) {
        this.PHONEWORK = PHONEWORK;
    }


    /**
     * Gets the POSTADDRESS value for this CUSTOMER.
     * 
     * @return POSTADDRESS
     */
    public java.lang.String getPOSTADDRESS() {
        return POSTADDRESS;
    }


    /**
     * Sets the POSTADDRESS value for this CUSTOMER.
     * 
     * @param POSTADDRESS
     */
    public void setPOSTADDRESS(java.lang.String POSTADDRESS) {
        this.POSTADDRESS = POSTADDRESS;
    }


    /**
     * Gets the TITLE value for this CUSTOMER.
     * 
     * @return TITLE
     */
    public java.lang.String getTITLE() {
        return TITLE;
    }


    /**
     * Sets the TITLE value for this CUSTOMER.
     * 
     * @param TITLE
     */
    public void setTITLE(java.lang.String TITLE) {
        this.TITLE = TITLE;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof CUSTOMER)) return false;
        CUSTOMER other = (CUSTOMER) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = super.equals(obj) && 
            ((this.ADDRESS1==null && other.getADDRESS1()==null) || 
             (this.ADDRESS1!=null &&
              this.ADDRESS1.equals(other.getADDRESS1()))) &&
            ((this.ADDRESS2==null && other.getADDRESS2()==null) || 
             (this.ADDRESS2!=null &&
              this.ADDRESS2.equals(other.getADDRESS2()))) &&
            ((this.AVARP==null && other.getAVARP()==null) || 
             (this.AVARP!=null &&
              this.AVARP.equals(other.getAVARP()))) &&
            ((this.BEEPER==null && other.getBEEPER()==null) || 
             (this.BEEPER!=null &&
              this.BEEPER.equals(other.getBEEPER()))) &&
            ((this.CARPHONE==null && other.getCARPHONE()==null) || 
             (this.CARPHONE!=null &&
              this.CARPHONE.equals(other.getCARPHONE()))) &&
            ((this.CONTACTSEPERATOR==null && other.getCONTACTSEPERATOR()==null) || 
             (this.CONTACTSEPERATOR!=null &&
              this.CONTACTSEPERATOR.equals(other.getCONTACTSEPERATOR()))) &&
            ((this.COUNTY==null && other.getCOUNTY()==null) || 
             (this.COUNTY!=null &&
              this.COUNTY.equals(other.getCOUNTY()))) &&
            ((this.COUNTRY==null && other.getCOUNTRY()==null) || 
             (this.COUNTRY!=null &&
              this.COUNTRY.equals(other.getCOUNTRY()))) &&
            ((this.CUSTOMERNAME==null && other.getCUSTOMERNAME()==null) || 
             (this.CUSTOMERNAME!=null &&
              this.CUSTOMERNAME.equals(other.getCUSTOMERNAME()))) &&
            ((this.DEPARTMENT==null && other.getDEPARTMENT()==null) || 
             (this.DEPARTMENT!=null &&
              this.DEPARTMENT.equals(other.getDEPARTMENT()))) &&
            ((this.EMAILADDRESS==null && other.getEMAILADDRESS()==null) || 
             (this.EMAILADDRESS!=null &&
              this.EMAILADDRESS.equals(other.getEMAILADDRESS()))) &&
            ((this.FAX==null && other.getFAX()==null) || 
             (this.FAX!=null &&
              this.FAX.equals(other.getFAX()))) &&
            ((this.FAXOFFICE==null && other.getFAXOFFICE()==null) || 
             (this.FAXOFFICE!=null &&
              this.FAXOFFICE.equals(other.getFAXOFFICE()))) &&
            ((this.GSM==null && other.getGSM()==null) || 
             (this.GSM!=null &&
              this.GSM.equals(other.getGSM()))) &&
            ((this.HOMEPAGE==null && other.getHOMEPAGE()==null) || 
             (this.HOMEPAGE!=null &&
              this.HOMEPAGE.equals(other.getHOMEPAGE()))) &&
            ((this.JOBSTATUS==null && other.getJOBSTATUS()==null) || 
             (this.JOBSTATUS!=null &&
              this.JOBSTATUS.equals(other.getJOBSTATUS()))) &&
            ((this.LANGUAGE==null && other.getLANGUAGE()==null) || 
             (this.LANGUAGE!=null &&
              this.LANGUAGE.equals(other.getLANGUAGE()))) &&
            ((this.PHONEHOME==null && other.getPHONEHOME()==null) || 
             (this.PHONEHOME!=null &&
              this.PHONEHOME.equals(other.getPHONEHOME()))) &&
            ((this.PHONEOFFICE==null && other.getPHONEOFFICE()==null) || 
             (this.PHONEOFFICE!=null &&
              this.PHONEOFFICE.equals(other.getPHONEOFFICE()))) &&
            ((this.PHONEWORK==null && other.getPHONEWORK()==null) || 
             (this.PHONEWORK!=null &&
              this.PHONEWORK.equals(other.getPHONEWORK()))) &&
            ((this.POSTADDRESS==null && other.getPOSTADDRESS()==null) || 
             (this.POSTADDRESS!=null &&
              this.POSTADDRESS.equals(other.getPOSTADDRESS()))) &&
            ((this.TITLE==null && other.getTITLE()==null) || 
             (this.TITLE!=null &&
              this.TITLE.equals(other.getTITLE())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = super.hashCode();
        if (getADDRESS1() != null) {
            _hashCode += getADDRESS1().hashCode();
        }
        if (getADDRESS2() != null) {
            _hashCode += getADDRESS2().hashCode();
        }
        if (getAVARP() != null) {
            _hashCode += getAVARP().hashCode();
        }
        if (getBEEPER() != null) {
            _hashCode += getBEEPER().hashCode();
        }
        if (getCARPHONE() != null) {
            _hashCode += getCARPHONE().hashCode();
        }
        if (getCONTACTSEPERATOR() != null) {
            _hashCode += getCONTACTSEPERATOR().hashCode();
        }
        if (getCOUNTY() != null) {
            _hashCode += getCOUNTY().hashCode();
        }
        if (getCOUNTRY() != null) {
            _hashCode += getCOUNTRY().hashCode();
        }
        if (getCUSTOMERNAME() != null) {
            _hashCode += getCUSTOMERNAME().hashCode();
        }
        if (getDEPARTMENT() != null) {
            _hashCode += getDEPARTMENT().hashCode();
        }
        if (getEMAILADDRESS() != null) {
            _hashCode += getEMAILADDRESS().hashCode();
        }
        if (getFAX() != null) {
            _hashCode += getFAX().hashCode();
        }
        if (getFAXOFFICE() != null) {
            _hashCode += getFAXOFFICE().hashCode();
        }
        if (getGSM() != null) {
            _hashCode += getGSM().hashCode();
        }
        if (getHOMEPAGE() != null) {
            _hashCode += getHOMEPAGE().hashCode();
        }
        if (getJOBSTATUS() != null) {
            _hashCode += getJOBSTATUS().hashCode();
        }
        if (getLANGUAGE() != null) {
            _hashCode += getLANGUAGE().hashCode();
        }
        if (getPHONEHOME() != null) {
            _hashCode += getPHONEHOME().hashCode();
        }
        if (getPHONEOFFICE() != null) {
            _hashCode += getPHONEOFFICE().hashCode();
        }
        if (getPHONEWORK() != null) {
            _hashCode += getPHONEWORK().hashCode();
        }
        if (getPOSTADDRESS() != null) {
            _hashCode += getPOSTADDRESS().hashCode();
        }
        if (getTITLE() != null) {
            _hashCode += getTITLE().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(CUSTOMER.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:DefaultNamespace", "CUSTOMER"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("ADDRESS1");
        elemField.setXmlName(new javax.xml.namespace.QName("", "ADDRESS1"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("ADDRESS2");
        elemField.setXmlName(new javax.xml.namespace.QName("", "ADDRESS2"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("AVARP");
        elemField.setXmlName(new javax.xml.namespace.QName("", "AVARP"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("BEEPER");
        elemField.setXmlName(new javax.xml.namespace.QName("", "BEEPER"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("CARPHONE");
        elemField.setXmlName(new javax.xml.namespace.QName("", "CARPHONE"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("CONTACTSEPERATOR");
        elemField.setXmlName(new javax.xml.namespace.QName("", "CONTACTSEPERATOR"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("COUNTY");
        elemField.setXmlName(new javax.xml.namespace.QName("", "COUNTY"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("COUNTRY");
        elemField.setXmlName(new javax.xml.namespace.QName("", "COUNTRY"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("CUSTOMERNAME");
        elemField.setXmlName(new javax.xml.namespace.QName("", "CUSTOMERNAME"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("DEPARTMENT");
        elemField.setXmlName(new javax.xml.namespace.QName("", "DEPARTMENT"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("EMAILADDRESS");
        elemField.setXmlName(new javax.xml.namespace.QName("", "EMAILADDRESS"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("FAX");
        elemField.setXmlName(new javax.xml.namespace.QName("", "FAX"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("FAXOFFICE");
        elemField.setXmlName(new javax.xml.namespace.QName("", "FAXOFFICE"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("GSM");
        elemField.setXmlName(new javax.xml.namespace.QName("", "GSM"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("HOMEPAGE");
        elemField.setXmlName(new javax.xml.namespace.QName("", "HOMEPAGE"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("JOBSTATUS");
        elemField.setXmlName(new javax.xml.namespace.QName("", "JOBSTATUS"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("LANGUAGE");
        elemField.setXmlName(new javax.xml.namespace.QName("", "LANGUAGE"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PHONEHOME");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PHONEHOME"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PHONEOFFICE");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PHONEOFFICE"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PHONEWORK");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PHONEWORK"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("POSTADDRESS");
        elemField.setXmlName(new javax.xml.namespace.QName("", "POSTADDRESS"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("TITLE");
        elemField.setXmlName(new javax.xml.namespace.QName("", "TITLE"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

} public class NOTESPROJECT  implements java.io.Serializable {
    private java.lang.String PROJECTCUSTOMER;

    private java.lang.String PROJECTNAME;

    private java.lang.String PROJECTNUMBER;

    private java.lang.String PROJECTSTATUS;

    public NOTESPROJECT() {
    }

    public NOTESPROJECT(
           java.lang.String PROJECTCUSTOMER,
           java.lang.String PROJECTNAME,
           java.lang.String PROJECTNUMBER,
           java.lang.String PROJECTSTATUS) {
           this.PROJECTCUSTOMER = PROJECTCUSTOMER;
           this.PROJECTNAME = PROJECTNAME;
           this.PROJECTNUMBER = PROJECTNUMBER;
           this.PROJECTSTATUS = PROJECTSTATUS;
    }


    /**
     * Gets the PROJECTCUSTOMER value for this NOTESPROJECT.
     * 
     * @return PROJECTCUSTOMER
     */
    public java.lang.String getPROJECTCUSTOMER() {
        return PROJECTCUSTOMER;
    }


    /**
     * Sets the PROJECTCUSTOMER value for this NOTESPROJECT.
     * 
     * @param PROJECTCUSTOMER
     */
    public void setPROJECTCUSTOMER(java.lang.String PROJECTCUSTOMER) {
        this.PROJECTCUSTOMER = PROJECTCUSTOMER;
    }


    /**
     * Gets the PROJECTNAME value for this NOTESPROJECT.
     * 
     * @return PROJECTNAME
     */
    public java.lang.String getPROJECTNAME() {
        return PROJECTNAME;
    }


    /**
     * Sets the PROJECTNAME value for this NOTESPROJECT.
     * 
     * @param PROJECTNAME
     */
    public void setPROJECTNAME(java.lang.String PROJECTNAME) {
        this.PROJECTNAME = PROJECTNAME;
    }


    /**
     * Gets the PROJECTNUMBER value for this NOTESPROJECT.
     * 
     * @return PROJECTNUMBER
     */
    public java.lang.String getPROJECTNUMBER() {
        return PROJECTNUMBER;
    }


    /**
     * Sets the PROJECTNUMBER value for this NOTESPROJECT.
     * 
     * @param PROJECTNUMBER
     */
    public void setPROJECTNUMBER(java.lang.String PROJECTNUMBER) {
        this.PROJECTNUMBER = PROJECTNUMBER;
    }


    /**
     * Gets the PROJECTSTATUS value for this NOTESPROJECT.
     * 
     * @return PROJECTSTATUS
     */
    public java.lang.String getPROJECTSTATUS() {
        return PROJECTSTATUS;
    }


    /**
     * Sets the PROJECTSTATUS value for this NOTESPROJECT.
     * 
     * @param PROJECTSTATUS
     */
    public void setPROJECTSTATUS(java.lang.String PROJECTSTATUS) {
        this.PROJECTSTATUS = PROJECTSTATUS;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof NOTESPROJECT)) return false;
        NOTESPROJECT other = (NOTESPROJECT) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.PROJECTCUSTOMER==null && other.getPROJECTCUSTOMER()==null) || 
             (this.PROJECTCUSTOMER!=null &&
              this.PROJECTCUSTOMER.equals(other.getPROJECTCUSTOMER()))) &&
            ((this.PROJECTNAME==null && other.getPROJECTNAME()==null) || 
             (this.PROJECTNAME!=null &&
              this.PROJECTNAME.equals(other.getPROJECTNAME()))) &&
            ((this.PROJECTNUMBER==null && other.getPROJECTNUMBER()==null) || 
             (this.PROJECTNUMBER!=null &&
              this.PROJECTNUMBER.equals(other.getPROJECTNUMBER()))) &&
            ((this.PROJECTSTATUS==null && other.getPROJECTSTATUS()==null) || 
             (this.PROJECTSTATUS!=null &&
              this.PROJECTSTATUS.equals(other.getPROJECTSTATUS())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getPROJECTCUSTOMER() != null) {
            _hashCode += getPROJECTCUSTOMER().hashCode();
        }
        if (getPROJECTNAME() != null) {
            _hashCode += getPROJECTNAME().hashCode();
        }
        if (getPROJECTNUMBER() != null) {
            _hashCode += getPROJECTNUMBER().hashCode();
        }
        if (getPROJECTSTATUS() != null) {
            _hashCode += getPROJECTSTATUS().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(NOTESPROJECT.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:DefaultNamespace", "NOTESPROJECT"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PROJECTCUSTOMER");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PROJECTCUSTOMER"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PROJECTNAME");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PROJECTNAME"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PROJECTNUMBER");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PROJECTNUMBER"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("PROJECTSTATUS");
        elemField.setXmlName(new javax.xml.namespace.QName("", "PROJECTSTATUS"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

} public class CustomerPersonalInfo extends CUSTOMER {
	
	private static final long serialVersionUID = 644025245021476293L;
	private String soc_nr;
	private boolean target_mail;
	
	public String getSocNr() {
		return soc_nr;
	}
	public void setSocNr(String soc_nr) {
		this.soc_nr = soc_nr;
	}
	public boolean getTargetMail() {
		return target_mail;
	}
	public void setTargetMail(boolean target_mail) {
		this.target_mail = target_mail;
	}
}
import is.idega.block.nationalregister.business.NationalRegisterBusiness;
import is.idega.block.nationalregister.data.NationalRegister;
import is.idega.block.nationalregister.data.NationalRegisterHome;
import is.idega.idegaweb.egov.cases.data.GeneralCase;
import is.idega.idegaweb.egov.cases.focal.FocalConstants;
import is.idega.idegaweb.egov.cases.focal.IWBundleStarter;
import is.idega.idegaweb.egov.cases.focal.beans.FocalProjectList;
import is.idega.idegaweb.egov.cases.focal.business.ExportCasesManagement;
import is.idega.idegaweb.egov.cases.focal.business.FocalCasesIntegration;
import is.idega.idegaweb.egov.cases.focal.business.UnsuccessfulStatusException;
import is.idega.idegaweb.egov.cases.focal.business.beans.CaseArg;
import is.idega.idegaweb.egov.cases.focal.business.beans.CompanyInfo;
import is.idega.idegaweb.egov.cases.focal.business.beans.Status;
import is.idega.idegaweb.egov.cases.focal.business.server.focalService.CUSTOMER;
import is.idega.idegaweb.egov.cases.focal.business.server.focalService.NOTESPROJECT;
import is.idega.idegaweb.egov.cases.focal.business.server.focalService.beans.CustomerPersonalInfo;
import is.idega.idegaweb.egov.cases.presentation.CasesProcessor;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.idega.block.process.data.CaseStatus;
import com.idega.block.process.presentation.beans.CasePresentation;
import com.idega.business.IBOLookup;
import com.idega.business.IBOLookupException;
import com.idega.business.IBORuntimeException;
import com.idega.company.companyregister.business.CompanyRegisterBusiness;
import com.idega.company.data.Company;
import com.idega.company.data.CompanyHome;
import com.idega.core.location.business.CommuneBusiness;
import com.idega.core.location.data.Commune;
import com.idega.data.IDOLookup;
import com.idega.idegaweb.IWApplicationContext;
import com.idega.presentation.IWContext;
import com.idega.presentation.Layer;
import com.idega.presentation.PresentationObject;
import com.idega.presentation.Script;
import com.idega.presentation.Table2;
import com.idega.presentation.TableCell2;
import com.idega.presentation.TableColumn;
import com.idega.presentation.TableColumnGroup;
import com.idega.presentation.TableRow;
import com.idega.presentation.TableRowGroup;
import com.idega.presentation.text.Heading1;
import com.idega.presentation.text.Link;
import com.idega.presentation.text.ListItem;
import com.idega.presentation.text.Lists;
import com.idega.presentation.text.Paragraph;
import com.idega.presentation.text.Text;
import com.idega.presentation.ui.CheckBox;
import com.idega.presentation.ui.DropdownMenu;
import com.idega.presentation.ui.Form;
import com.idega.presentation.ui.Label;
import com.idega.presentation.ui.RadioButton;
import com.idega.presentation.ui.TextArea;
import com.idega.presentation.ui.TextInput;
import com.idega.user.business.UserBusiness;
import com.idega.user.data.User;
import com.idega.util.CoreConstants;
import com.idega.util.IWTimestamp;
import com.idega.util.ListUtil;
import com.idega.util.StringUtil;
import com.idega.util.expression.ELUtil;
import com.idega.util.text.Name;
import com.idega.webface.WFUtil;

							createCustomer.setToFormSubmit(form);
							cCell.add(createCustomer);
						}
						else {
							Link createCustomer = getButtonLink(getResourceBundle().getLocalizedString("create", "Create"));
							createCustomer.setValueOnClick(PARAMETER_ACTION, String.valueOf(ACTION_CREATE_PERSON));
							createCustomer.setStyleClass("homeButton");

							createCustomer.setToFormSubmit(form);
							cCell.add(createCustomer);
						}
					}

				}
			}
			catch (Exception e) {
				e.printStackTrace();
				//TODO
			}
		}

		customerSection.add(customerTable);
		form.add(customerSection);

		Layer bottom = new Layer(Layer.DIV);
		bottom.setStyleClass("bottom");
		form.add(bottom);

		Link back = getButtonLink(getResourceBundle().getLocalizedString("back", "Back"));
		back.setStyleClass("homeButton");
		back.setValueOnClick(PARAMETER_ACTION, String.valueOf(ACTION_VIEW));
		back.setToFormSubmit(form);
		bottom.add(back);

		Link save = getButtonLink(getResourceBundle().getLocalizedString("save", "Save to Focal"));
		save.setOnClick("if(isProjectSelected()) {changeInputValue(findObj('" + PARAMETER_ACTION + "'), '" + ACTION_SAVE_FOCAL + "');} else {alert('" + noProjectAlert + "');return false;}");
		save.setToFormSubmit(form);
		bottom.add(save);

		add(form);
	}

	@Override
	protected int parseAction(IWContext iwc) {
		if (iwc.isParameterSet(PARAMETER_ACTION)) {
			return Integer.parseInt(iwc.getParameter(PARAMETER_ACTION));
		}
		return ACTION_VIEW;
	}

	@Override
	protected Lists getLegend(IWContext iwc) throws RemoteException {
		Lists list = super.getLegend(iwc);

		list.setStyleClass("formSection");
		ListItem item = new ListItem();
		item.setStyleClass("isInFocal");
		item.add(new Text(getResourceBundle().getLocalizedString("legend.is_inFocal", "Is In Focal")));
		list.add(item);

		return list;
	}

	protected FocalCasesIntegration getFocalCasesIntegration(IWApplicationContext iwac) {
		try {
			return (FocalCasesIntegration) IBOLookup.getServiceInstance(iwac, FocalCasesIntegration.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	protected UserBusiness getUserBusiness(IWApplicationContext iwac) {
		try {
			return (UserBusiness) IBOLookup.getServiceInstance(iwac, UserBusiness.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	protected CompanyRegisterBusiness getCompanyRegisterBusiness(IWApplicationContext iwac) {
		try {
			return (CompanyRegisterBusiness) IBOLookup.getServiceInstance(iwac, CompanyRegisterBusiness.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	protected NationalRegisterBusiness getNationalRegisterBusiness(IWApplicationContext iwac) {
		try {
			return (NationalRegisterBusiness) IBOLookup.getServiceInstance(iwac, NationalRegisterBusiness.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	protected CommuneBusiness getCommuneBusiness(IWApplicationContext iwac) {
		try {
			return (CommuneBusiness) IBOLookup.getServiceInstance(iwac, CommuneBusiness.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	protected ExportCasesManagement getExportCasesManagement(IWApplicationContext iwac) {
		try {
			return (ExportCasesManagement) IBOLookup.getServiceInstance(iwac, ExportCasesManagement.class);
		}
		catch (IBOLookupException ile) {
			throw new IBORuntimeException(ile);
		}
	}

	@Override
	public String getBundleIdentifier() {
		return IWBundleStarter.IW_BUNDLE_IDENTIFIER;