Package com.centraview.preference

Examples of com.centraview.preference.PreferenceLocal


  {
    UserPrefererences up = new UserPrefererences();
    try {
      InitialContext ic = CVUtility.getInitialContext();
      PreferenceLocalHome home = (PreferenceLocalHome) ic.lookup("local/Preference");
      PreferenceLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      up = remote.getUserPreferences(individualId);
    } catch (Exception e) {
      logger.error("[getUserObject]: Exception", e);
    }
    UserObject userObj = new UserObject(individualId, firstName, lastName, up, userType);

    if (individualId != 0) {
      userObj.setIndividualID(individualId);
      try {
        InitialContext ic = CVUtility.getInitialContext();
        ContactFacadeLocalHome home = (ContactFacadeLocalHome) ic.lookup("local/ContactFacade");
        ContactFacadeLocal remote = home.create();
        remote.setDataSource(this.dataSource);
        int entityID = remote.getEntityIDForIndividual(individualId);
        EntityVO entityVO = remote.getEntity(entityID);
        AddressVO primaryAdd = entityVO.getPrimaryAddress();
        userObj.setEntityName(entityVO.getName());
        userObj.setEntityId(entityID);
        userObj.setAddressVO(primaryAdd);
      } catch (Exception e) {
View Full Code Here


      preferenceVO.setPreferenceValue(String.valueOf(folderID));
      Vector preferenceVector = new Vector();
      preferenceVector.addElement(preferenceVO);
      InitialContext ic = CVUtility.getInitialContext();
      PreferenceLocalHome home = (PreferenceLocalHome) ic.lookup("local/Preference");
      PreferenceLocal localPreference = home.create();
      localPreference.setDataSource(this.dataSource);
      localPreference.updateUserPreference(userTargetIndividualId, preferenceVector);
    } catch (Exception e) {
      logger.error("[addUser] Exception thrown.", e);
      throw new UserException(UserException.INSERT_FAILED, "Failed in User ejb while adding User");
    } finally {
      cvdl.destroy();
View Full Code Here


      InitialContext ic = CVUtility.getInitialContext();
      PreferenceLocalHome home = (PreferenceLocalHome)ic.lookup("local/Preference");

      PreferenceLocal remote = home.create();
      remote.setDataSource(this.dataSource);

      //hmEmail = remote.getUserEmailDelegators(userID);
      hmEmail.put(new Integer(userID),Constants.VIEWSENDEMAIL);

View Full Code Here

//   Modified by Deepa
//  User Preferences value will decide content type of the email. ie. Plain text or Html text

  InitialContext ic = CVUtility.getInitialContext();
  PreferenceLocalHome home  = (PreferenceLocalHome)ic.lookup("local/Preference");
  PreferenceLocal localPref =  home.create();
  localPref.setDataSource(this.dataSource);

  UserPrefererences userPref = localPref.getUserPreferences(userId);


  if(userPref != null)
  if (userPref.getContentType() != null && userPref.getContentType().equals("PLAIN"))
  {
View Full Code Here

TOP

Related Classes of com.centraview.preference.PreferenceLocal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.