Package com.cubusmail.common.model

Examples of com.cubusmail.common.model.Preferences


public abstract class ServletUtil {

  public static final String getDefaultLocale( HttpServletRequest request ) {

    if ( SessionManager.isLoggedIn() ) {
      Preferences prefs = SessionManager.get().getPreferences();
      return prefs.getLanguage();
    }
    else {
      return request.getLocale().toString();
    }
  }
View Full Code Here


  }

  public static final String getCSS() {

    if ( SessionManager.isLoggedIn() ) {
      Preferences prefs = SessionManager.get().getPreferences();
      return prefs.getTheme();
    }
    else {
      return "";
    }
  }
View Full Code Here

   * .ibatis.sqlmap.client.extensions.ResultGetter)
   */
  public Object getResult( ResultGetter getter ) throws SQLException {

    String preferencesJson = getter.getString();
    Preferences preferences = null;

    if ( preferencesJson != null ) {
      preferences = new Preferences();
      try {
        JSONObject object = new JSONObject( preferencesJson );
        Field[] fields = Preferences.class.getFields();
        if ( fields != null ) {
          for (Field field : fields) {
View Full Code Here

            pagedMessages[pagedIndex++] = msgs[msgIndex];
          }
          FetchProfile completeProfile = MessageUtils.createFetchProfile( true, null );
          currentFolder.fetch( pagedMessages, completeProfile );

          Preferences preferences = SessionManager.get().getPreferences();

          GWTMessageRecord[] messageStringArray = ConvertUtil.convertMessagesToStringArray(
              getApplicationContext(), preferences, (IMAPFolder) currentFolder.getFolder(), pageSize,
              pagedMessages );
View Full Code Here

        }
      }
      gwtMsg.setAttachments( attachments );
    }

    Preferences preferences = SessionManager.get().getPreferences();
    GWTMessageRecord[] messageArray = ConvertUtil.convertMessagesToStringArray( this.applicationContext, preferences,
        (IMAPFolder) this.message.getFolder(), 1, new Message[] { this.message } );
    gwtMsg.setMessageRecord( messageArray[0] );

    return gwtMsg;
View Full Code Here

   */
  public void createReplyMessage( Message msg, boolean replyAll ) throws MessagingException, IOException {

    init();
    this.message = (MimeMessage) msg.reply( replyAll );
    Preferences prefs = SessionManager.get().getPreferences();
    MessageTextUtil.messageTextFromPart( msg, this, true, MessageTextMode.REPLY, prefs, 0 );
    addReplyInfo( msg );
  }
View Full Code Here

        }

        addComposeAttachment( newSource );
      }
    }
    Preferences prefs = SessionManager.get().getPreferences();
    MessageTextUtil.messageTextFromPart( msg, this, true, MessageTextMode.REPLY, prefs, 0 );
  }
View Full Code Here

   * @throws IOException
   */
  public void readBodyContent( boolean loadImages, MessageTextMode mode ) throws MessagingException, IOException {

    init();
    Preferences prefs = SessionManager.get().getPreferences();
    MessageTextUtil.messageTextFromPart( this.message, this, loadImages, mode, prefs, 0 );

    if ( StringUtils.isEmpty( this.messageTextPlain ) && StringUtils.isEmpty( this.messageTextHtml ) ) {
      if ( !StringUtils.isEmpty( this.messageImageHtml ) && prefs.isShowHtml() ) {
        this.messageTextHtml = this.messageImageHtml;
        setHtmlMessage( true );
        setTrustImages( true );
        setHasImages( true );
      }
View Full Code Here

  }

  public void start() {

    Preferences preferences = GWTSessionManager.get().getPreferences();
    if ( preferences.getMessagesReloadPeriod() > 0 ) {
      this.timer.scheduleRepeating( preferences.getMessagesReloadPeriod() );
    }
    else {
      this.timer.cancel();
    }
  }
View Full Code Here

TOP

Related Classes of com.cubusmail.common.model.Preferences

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.