Package com.cubusmail.common.model

Examples of com.cubusmail.common.model.AddressFolder


  public void createTestData() {

    try {
      UserAccount account = this.userAccountDao.getUserAccountByUsername( "schlierf" );
      List<AddressFolder> folderList = this.userAccountDao.retrieveAddressFolders( account );
      AddressFolder addressFolder = folderList.get( 0 );
      for (int i = 0; i < alpha.length(); i++) {
        char begin = alpha.charAt( i );
        for (int j = 1; j < 2; j++) {
          Address address = this.applicationContext.getBean( Address.class );
          address.setFirstName( begin + "firstName" + j );
View Full Code Here


      Address savedAddress = savedAddressList.get( 0 );
      Address testAddress2 = testAddressList.get( 1 );

      // copy modify properties
      Long saveId = savedAddress.getId();
      AddressFolder savedFolder = savedAddress.getAddressFolder();
      BeanUtils.copyProperties( savedAddress, testAddress2 );
      savedAddress.setId( saveId );
      savedAddress.setAddressFolder( savedFolder );
      this.userAccountDao.saveAddress( savedAddress );
View Full Code Here

   * com.cubusmail.gwtui.client.services.IUserAccountService#createContactFolder
   * (com.cubusmail.gwtui.domain.ContactFolder)
   */
  public AddressFolder createAddressFolder( String folderName ) {

    AddressFolder folder = new AddressFolder();
    folder.setName( folderName );

    UserAccount account = SessionManager.get().getUserAccount();
    folder.setUserAccount( account );
    this.userAccountDao.saveAddressFolder( folder );

    return folder;
  }
View Full Code Here

  public static TreeNode[] createAddressFolderTreeNodes( List<AddressFolder> folderList ) {

    TreeNode[] nodes = new TreeNode[folderList.size()];
    for (int i = 0; i < folderList.size(); i++) {
      AddressFolder folder = folderList.get( i );
      nodes[i] = new TreeNode( folder.getName() );
      nodes[i].setAttribute( "icon", ImageProvider.ADDRESS_FOLDER );
      nodes[i].setID( folder.getName() );
      nodes[i].setAttribute( GWTConstants.ADDRESS_FOLDER, folder );
    }

    return nodes;
  }
View Full Code Here

   * com.smartgwt.client.data.DSResponse)
   */
  @Override
  protected void executeFetch( final String requestId, final DSRequest request, final DSResponse response ) {

    AddressFolder folder = GWTSessionManager.get().getCurrentAddressFolder();
    String beginChars = request.getCriteria().getAttribute( GWTConstants.ADDRESS_BEGIN_CHARS );
    ServiceProvider.getUserAccountService().retrieveAddressList( folder, beginChars,
        new AsyncCallback<List<Address>>() {

          @Override
View Full Code Here

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

    AddressFolder folder = getApplicationContext().getBean( AddressFolder.class );
    folder.setType( AddressFolderType.STANDARD );
    folder.setName( "Standard" );
    folder.setUserAccount( account );
    account.addAddressFolder( folder );
    this.userAccountDao.saveAddressFolder( folder );

    folder = getApplicationContext().getBean( AddressFolder.class );
    folder.setType( AddressFolderType.RECIPIENTS );
    folder.setName( "Recipients" );
    folder.setUserAccount( account );
    account.addAddressFolder( folder );
    this.userAccountDao.saveAddressFolder( folder );

    return account;
  }
View Full Code Here

  private class AddressFolderSelectionChangedHandler implements SelectionChangedHandler {

    public void onSelectionChanged( SelectionEvent event ) {

      TreeNode selectedNode = (TreeNode) event.getRecord();
      AddressFolder folder = (AddressFolder) selectedNode.getAttributeAsObject( GWTConstants.ADDRESS_FOLDER );
      if ( !selectedNode.equals( currentTreeNode ) ) {
        currentTreeNode = selectedNode;
        GWTSessionManager.get().setCurrentAddressFolder( folder );
        EventBroker.get().fireAddressFolderSelected( folder );
        GWTSessionManager.get().setCurrentBeginChars( null );
View Full Code Here

TOP

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

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.