Examples of LinkListRepresentation


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

Examples of com.wesabe.grendel.representations.LinkListRepresentation

      }
    }
   
    @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

Examples of com.wesabe.grendel.representations.LinkListRepresentation

    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
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.