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

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


    // Setup uris
    page1URI = new PageURIImpl(site, page1path, page1uuid);
    page2URI = new PageURIImpl(site, page2path, page2uuid);
    imageURI = new ImageResourceURIImpl(site, imagePath, imageUuid);
    documentURI = new FileResourceURIImpl(site, documentPath, documentUuid);

    // Prepare the pages
    PageReader pageReader = new PageReader();
    pages = new Page[2];
    for (int i = 0; i < pages.length; i++) {
View Full Code Here


        }
        fileURI = new GeneralResourceURIImpl(site, filePath, id);
      } else {
        filePath = path;
        fileName = FilenameUtils.getName(filePath);
        fileURI = new FileResourceURIImpl(site, filePath, null);
      }

      // Try to load the resource
      try {
        fileResource = (Resource<? extends FileContent>) contentRepository.get(fileURI);
View Full Code Here

    // Create the file uri, either from the id or the path. If none is
    // specified, issue a warning
    ResourceURI uri = null;
    if (StringUtils.isNotBlank(fileId)) {
      uri = new FileResourceURIImpl(site, null, fileId);
    } else if (StringUtils.isNotBlank(filePath)) {
      uri = new FileResourceURIImpl(site, filePath, null);
    } else {
      throw new JspException("Neither resource id nor resource path were specified");
    }

    // Try to load the file from the content repository
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

    } else {
      path = URI_PREFIX + "/" + id;
      url = new WebUrlImpl(site, path);
    }

    ResourceURI uri = new FileResourceURIImpl(site, path, id, version);
    FileResourceSearchResultItemImpl result = new FileResourceSearchResultItemImpl(uri, url, relevance, site, metadata);

    if (metadataMap.get(XML) != null)
      result.setFileXml((String) metadataMap.get(XML).getValues().get(0));
    if (metadataMap.get(HEADER_XML) != null)
View Full Code Here

TOP

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

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.