Package in.partake.model

Examples of in.partake.model.UserMessageEx


        Message message = daos.getMessageAccess().find(con, UUID.fromString(receivedMessage.getMessageId()));
        if (message == null)
            return null;

        return new UserMessageEx(receivedMessage, sender, event, message);
    }
View Full Code Here


            Message message = daos.getMessageAccess().find(con, UUID.fromString(userMessage.getMessageId()));
            if (message == null)
                continue;

            UserMessageEx messageEx = new UserMessageEx(userMessage, sender, event, message);
            userMessageExs.add(messageEx);
        }

        return userMessageExs;
    }
View Full Code Here

        this.messageId = messageId;
    }

    @Override
    protected UserMessageEx doExecute(PartakeConnection con, IPartakeDAOs daos) throws DAOException, PartakeException {
        UserMessageEx message = MessageDAOFacade.findUserReceivedMessage(con, daos, messageId);
        if (message == null)
            throw new PartakeException(UserErrorCode.INVALID_NOTFOUND);

        if (!user.getId().equals(message.getReceiverId()))
            throw new PartakeException(UserErrorCode.FORBIDDEN_MESSAGE_SHOW);

        if (!message.isOpened()) {
            UserReceivedMessage newMessage = new UserReceivedMessage(message);
            newMessage.setOpened(true);
            newMessage.setModifiedAt(TimeUtil.getCurrentDateTime());
            daos.getUserReceivedMessageAccess().put(con, newMessage);
        }
View Full Code Here

TOP

Related Classes of in.partake.model.UserMessageEx

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.