Package com.cubusmail.common.model

Examples of com.cubusmail.common.model.Identity


   * @throws IOException
   */
  public void setGWTMessage( GWTMessage gwtMsg ) throws MessagingException, IOException {

    UserAccount account = SessionManager.get().getUserAccount();
    Identity identity = account.getIdentityById( gwtMsg.getIdentityId() );

    setFrom( identity.getInternetAddress() );

    if ( !StringUtils.isEmpty( identity.getReplyTo() ) ) {
      setReplyTo( identity.getReplyTo() );
    }

    setTo( gwtMsg.getTo() );
    setCc( gwtMsg.getCc() );
    setBcc( gwtMsg.getBcc() );
View Full Code Here


    account.setCreated( new Date() );
    account.setLastLogin( new Date() );
    this.userAccountDao.saveUserAccount( account );

    // check Identities
    Identity defaultIdentity = createDefaultIdentity( mailbox );
    account.addIdentity( defaultIdentity );
    this.userAccountDao.saveIdentities( account );

    AddressFolder folder = getApplicationContext().getBean( AddressFolder.class );
    folder.setType( AddressFolderType.STANDARD );
View Full Code Here

   * @param mailbox
   * @return
   */
  private Identity createDefaultIdentity( IMailbox mailbox ) {

    Identity defaultIdentity = getApplicationContext().getBean( "identity", Identity.class );
    defaultIdentity.setEmail( mailbox.getEmailAddress() );
    defaultIdentity.setStandard( true );

    return defaultIdentity;
  }
View Full Code Here

TOP

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

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.