Package com.wesabe.grendel.entities

Examples of com.wesabe.grendel.entities.Document


    @PathParam("user_id") String userId, @PathParam("owner_id") String ownerId,
    @PathParam("name") String name) {
   
    final Session session = credentials.buildSession(userDAO, userId);
    final User owner = findUser(ownerId);
    final Document doc = findDocument(owner, name);
   
    checkLinkage(doc, session.getUser());
   
    doc.unlinkUser(session.getUser());
    documentDAO.saveOrUpdate(doc);
   
    return Response.noContent().build();
  }
View Full Code Here


   
    return Response.noContent().build();
  }
 
  private Document findDocument(User owner, String name) {
    final Document doc = documentDAO.findByOwnerAndName(owner, name);
    if (doc == null) {
      throw new WebApplicationException(Status.NOT_FOUND);
    }
    return doc;
  }
View Full Code Here

TOP

Related Classes of com.wesabe.grendel.entities.Document

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.