Package com.trustyoram.web.storage.showreel

Examples of com.trustyoram.web.storage.showreel.HtmlShowreel


  public static TreeMap<String, Showreel[]> getCategories(
      HttpServletRequest request) throws StorageServletException, IOException {
    IFile[] files;
    Showreel showreel;
    //InternalShowreel internalShowreel;
    HtmlShowreel htmlShowreel;
    //IFile f;
    ArrayList<Showreel> showreels;
    int i;
    IPath root;

    try {
      if (categories == null) {
        synchronized (ArrayListHelper.class) {
          if (categories == null) {
            root = Configuration.getSystemRoot().getRoot().getFolderItem("showreel");
            files = StorageHelper.getDefinitionFiles(root, "showreel.xml");

            showreels = new ArrayList<Showreel>();

            for (i = 0; i < files.length; i++) {
              try {
                showreel = Showreel.load(files[i]);

                if (showreel instanceof HtmlShowreel) {
                  htmlShowreel = (HtmlShowreel) showreel;
                  htmlShowreel.setFile(StorageHelper.getNonServletUrl(files[i].getParent(), htmlShowreel.getFile()));
                }

                showreels.add(showreel);
              } catch (Exception e) {
                log.log(Level.SEVERE,
View Full Code Here


             
              InputStream in = new FileInputStream(o.getFile());
              trailer = IOUtils.toString(in);
              in.close();
            } else {
              HtmlShowreel o = (HtmlShowreel)showreel;
             
              trailer = FileUtils.read(Configuration.getSystemRoot().getRoot().getFileItem(o.getFile()));
            }
           
            shorts.setTrailer(trailer);
           
            entity.persist(shorts);
View Full Code Here

TOP

Related Classes of com.trustyoram.web.storage.showreel.HtmlShowreel

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.