Package de.spotnik.mail.core.model

Examples of de.spotnik.mail.core.model.UserAccount


     * read all messages from the database
     */
    private void initMessageList()
    {
        MessageController msgController = PluginContext.instance().getMessageController();
        UserAccount account = UserSession.getCurrentAccount();
        messages = new ArrayList<MessageTO>();
       
        if( account != null)
        {
            messages = msgController.findAllMessages(account.getId());
        }
        else
        {
            LOG.debug("account not available in current session");
        }
View Full Code Here


    private void initView()
    {
        AccountController accountController = PluginContext.instance().getAccountController();
        StringBuffer tags = new StringBuffer();
        boolean notFirstTag = false;
        UserAccount account;
       
        try
        {
            account = UserSession.getCurrentAccount();
            if( account == null)
            {
                throw new BusinessException("no active user session (no user logged in)");
            }
           
            List<TagTO> tagList = accountController.findAllTags(account.getId());
           
            for( TagTO tag : tagList)
            {
                if( notFirstTag)
                {
View Full Code Here

    }
   
    @Override
    public void setUp()
    {
        this.account = new UserAccount();
    }
View Full Code Here

     * @return list of all known tags
     * @throws DatabaseException
     */
    public List<TagTO> findAllTags( Long id) throws DatabaseException
    {
        UserAccount account = userAccountDao.findById(id);
        List<TagTO> result = new ArrayList<TagTO>();
       
        for( Tag tag : account.getTags())
        {
            if( tag != null)
            {
                TagTO tagTo = new TagTO();
               
View Full Code Here

     * @return the user account object
     * @throws DatabaseException
     */
    public UserAccount login( String user, String password) throws DatabaseException
    {
        UserAccount account = userAccountDao.findByUsername(user);
       
        if( password != null && password.equals(account.getPassword()))
        {
            UserSession.setCurrentAccount(account);
            return account;
        }
       
View Full Code Here

     * add the available accounts to the inbox
     */
    private void initView()
    {
        AccountController accountController = PluginContext.instance().getAccountController();
        UserAccount account;
       
        try
        {
            account = UserSession.getCurrentAccount();
           
            if( account == null)
            {
                account = accountController.login("spotnik06", "spotnik06");
            }
           
            for( MailAccount mailAccount : account.getAccounts())
            {
                createMailBox(this.inboxTreeItem, mailAccount);
            }
        }
        catch( DatabaseException ex)
View Full Code Here

TOP

Related Classes of de.spotnik.mail.core.model.UserAccount

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.