Examples of CommentThread


Examples of edu.chl.jadetalk.core.CommentThread

        imageDataManagerBean.saveImageToCache(filename, imageData);
        imageDataManagerBean.uploadImage(filename, imageData);
       
        // Create image entry
        Image image = new Image();
        CommentThread ct = new CommentThread();
        ct.setComments(new LinkedList<Comment>());
        image.setCommentThread(ct);
        image.setImageLocation(filename);
        image.setRatings(new LinkedList<Rating>());
        image.setUser(user);
       
View Full Code Here

Examples of models.CommentThread

public class CommentThreadApp extends Controller {

    @Transactional
    public static Result updateState(Long id, CommentThread.ThreadState state) {
        CommentThread thread = CommentThread.find.byId(id);

        if (thread == null) {
            return notFound();
        }

        Operation operation;

        switch(state) {
            case OPEN:
                operation = Operation.REOPEN;
                break;
            case CLOSED:
                operation = Operation.CLOSE;
                break;
            default:
                throw new UnsupportedOperationException();
        }

        if (!AccessControl.isAllowed(UserApp.currentUser(), thread.asResource(), operation)) {
            return forbidden();
        }

        CommentThread.ThreadState previousState = thread.state;
        thread.state = state;
        thread.update();

        try {
            NotificationEvent.afterStateChanged(previousState, thread);
        } catch (Exception e) {
            play.Logger.warn(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.