Package ch.entwine.weblounge.common.impl.content.file

Examples of ch.entwine.weblounge.common.impl.content.file.FileResourceImpl


   * @throws IllegalStateException
   */
  @Test
  public void testWithoutModification() throws ContentRepositoryException,
  IllegalStateException, IOException {
    FileResource fileResource = new FileResourceImpl(documentURI);

    SearchQuery q = new SearchQueryImpl(site);
    SearchResult result = repository.find(q);
    assertEquals(1, result.getDocumentCount());

View Full Code Here


    page.setTemplate("home");

    otherPage = new PageImpl(new PageURIImpl(site, "/weblounge/other"));
    otherPage.setTemplate("home");

    file = new FileResourceImpl(new FileResourceURIImpl(site));
  }
View Full Code Here

   * {@inheritDoc}
   *
   * @see ch.entwine.weblounge.common.repository.ResourceSerializer#newResource(ch.entwine.weblounge.common.site.Site)
   */
  public Resource<FileContent> newResource(Site site) {
    return new FileResourceImpl(new FileResourceURIImpl(site));
  }
View Full Code Here

    URI uri = null;
    Resource<?> resource = null;
    try {
      // Parse the resource and store it
      logger.debug("Creating new resource at {}", resourceURI);
      resource = new FileResourceImpl(resourceURI);
      resource.setCreated(user, new Date());
      contentRepository.put(resource, true);
      uri = new URI(UrlUtils.concat(request.getRequestURL().toString(), resourceURI.getIdentifier()));
    } catch (URISyntaxException e) {
      logger.warn("Error creating a uri for resource {}: {}", resourceURI, e.getMessage());
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.impl.content.file.FileResourceImpl

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.