package com.ibm.servlet.personalization.userprofile;

import java.rmi.*;
import java.util.*;

/**
* This is an Enterprise Java Bean Remote Interface
*
* 
*/

public interface UPBase extends javax.ejb.EJBObject {

    /**
    * Gets the user's unique userName.
    */
    public String getUserName() throws RemoteException;

    /**
     * Gets the user's first line of address.
     * 
     */
    public String getAddress1() throws RemoteException;

    /**
     * Gets the second line if the user's address.
     */
    public String getAddress2() throws RemoteException;

    /**
      * Gets the user's town or city.
      */
    public String getCity() throws RemoteException;

    /**
      * Gets the user's daytime telephone number.
      */

    public String getDayPhone() throws RemoteException;

    /**
    * Gets the user's e-mail address.
    */
    public String getEmail() throws RemoteException;

    /**
      * Gets the name of the user's employer.
      */

    public String getEmployer() throws RemoteException;

    /**
      * Gets the user's fax number.
      */

    public String getFax() throws RemoteException;

    /**
     * Get the user's language of choice.
    */

    public String getLanguage() throws RemoteException;

    /**
    * Gets the user's country.
    */
    public String getNation() throws RemoteException;

    /**
     * Gets the user's nighttime telephone number.
     */

    public String getNightPhone() throws RemoteException;


    /**
     * Gets the user's zip code or postal code.
     */

    public String getPostalCode() throws RemoteException;


    /**
      * Gets the user's state or province.
      */
    public String getStateOrProvince() throws RemoteException;


    /**
     * Gets the user's first name.
     */
    public String getFirstName() throws RemoteException;


    /**
    *	Gets the user's sur name.
    */

    public String getSurName() throws RemoteException;


    /**
      * Sets the first line of the user's street address.
      * @param value  New first line of the street address
      */
    public void setAddress1(String value) throws RemoteException;

    /**
      * Sets the user's second street address.
      * @param value  New second line of the street address
      */
    public void setAddress2(String value) throws RemoteException;

    /**
     * Sets the user's town or city.
     * @param value  New town or city
     */
    public void setCity(String value) throws RemoteException;
    /**
     * Sets the user's daytime telephone number.
     * @param value  New daytime telephone number
     */

    public void setDayPhone(String value) throws RemoteException;


    /**
     * Sets the user's e-mail address.
     * @param value  New e-mail address
     */
    public void setEmail(String value) throws RemoteException;

    /**
     * Sets the name of the user's employer.
     * @param value  New employer or company name
     */
    public void setEmployer(String value) throws RemoteException;

    /**
      * Sets the user's fax number.
      * @param value  New fax number
      */
    public void setFax(String value) throws RemoteException;

    /**
      * Sets the user's first name.
      * @param value - New first name
      */
    public void setFirstName(String value) throws RemoteException;

    /**
        Sets the user's language of choice.
        * @param value Language identifier
        */
    public void setLanguage(String value) throws RemoteException;

    /**
      * Sets the user's country.
      * @param value  New country
      */
    public void setNation(String value) throws RemoteException;   

    /**
      * Sets the user's nighttime telephone number.
      * @param value  New nighttime telephone number
      */
    public void setNightPhone(String value) throws RemoteException;

    /**
      * Sets the user's zip code or postal code.
      * @param value  New zip code or postal code
      */
    public void setPostalCode(String value) throws RemoteException;

    /**
     * Sets the user's state or province.
     * @param value  New state or province
     */
    public void setStateOrProvince(String value) throws RemoteException;

    /**
       Sets the user's sur name.
       * @param value New sur name
       */

    public void setSurName(String value) throws RemoteException;

    /**
     * To get all the demographic properties in a single call.
     * Demographic properties are stored as key value pairs.
     * Getter methods are used as keys for storing 
     * demographic properties.For ex: for email, key used is
     * "getEmail".
     *
     */
    public Hashtable getAllProperties() throws RemoteException;



    /**
   * To update all the properties in a single method call. This is used
   * When userprofile is created/accessed with autoCommit = false;
   * i.e UserProfileManager.addUserProfile(String userName,boolean mode,boolean autoCommit)
   *     UserProfileManager.getUserProfile(String userName,boolean mode,boolean autoCommit)
   *
   *   @param address1  New first line of the street address 
   *   @param address2  New second line of the street address
   *   @param nation    New country
   *   @param dayPhone  New daytime telephone number
   *   @param email     New e-mail address
   *   @param employer  New employer or company name
   *   @param fax       New fax number
   *   @param firstName New first Name
   *   @param language  New Language
   *   @param surName   New Surname
   *   @param nightPhone New night-phone
   *   @param stateOrProvince new State Or Province
   *   @param city       New Town or City
   *   @param postalCode New postal code or zip
   *   @param newColumns New values of columns added by user by extending datawrapper
   *
   */
    void sync(String address1, String address2, String nation,
              String dayPhone,String email,String employer, String fax, String firstName,
              String language, String surName, String nightPhone, String stateOrProvince,
              String city, String postalCode, Hashtable newColunms) throws RemoteException;

    /**
     * This method is used in handling columns added by  user by extending
    * datawrapper. If UserProfile enterprise bean is extended, extending 
    * datawrapper with UserProfileExtender for adding columns from datawrapper is
    * not supported.
    *
     * @param fieldName java.lang.String
     * @param value java.lang.String
     */

    void setByType(String column, Object value) throws RemoteException;


    /**
     * This is used to handle Columns added by Extending DataWrapper. 
    * If UserProfile enterprise bean is extended, extending datawrapper 
    * with UserProfileExtender for adding columns from datawrapper is
    * not supported.
    *
     * @param field java.lang.String
     */

    Object getByType(String column) throws RemoteException;


}