Package com.wesabe.grendel.representations

Examples of com.wesabe.grendel.representations.LinkListRepresentation


      when(doc.getName()).thenReturn("document1.txt");
      when(doc.toString()).thenReturn("document1.txt");
      when(doc.getOwner()).thenReturn(owner);
      when(doc.getLinkedUsers()).thenReturn(ImmutableSet.of(reader));
     
      this.rep = new LinkListRepresentation(uriInfo, doc);
    }
View Full Code Here


      }
    }
   
    @Test
    public void itReturnsADocumentList() throws Exception {
      final LinkListRepresentation docs = resource.listLinks(uriInfo, credentials, "bob", "document1.txt");
     
      assertThat(docs.getDocument()).isEqualTo(document);
      assertThat(docs.getUriInfo()).isEqualTo(uriInfo);
    }
View Full Code Here

    final Document doc = documentDAO.findByOwnerAndName(session.getUser(), documentName);
    if (doc == null) {
      throw new WebApplicationException(Status.NOT_FOUND);
    }
   
    return new LinkListRepresentation(uriInfo, doc);
  }
View Full Code Here

TOP

Related Classes of com.wesabe.grendel.representations.LinkListRepresentation

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.