Package com.trustyoram.web.storage.config

Examples of com.trustyoram.web.storage.config.PhotoInternalStorage


      trans.begin();
      try {
        int photoOrder = 0;
       
        for (Storage o: storages) {
          PhotoInternalStorage storage = (PhotoInternalStorage)o;
          Photo photo = new Photo();
          photo.setFullSizeBW(storage.getFullSizeBW());
          photo.setFullSizeColor(storage.getFullSizeColor());
          photo.setThumbnailBW(storage.getThumbnailBW());
          photo.setThumbnailColor(storage.getThumbnailColor());
          photo.setOrder(photoOrder++);
         
          entity.persist(photo);
        }       
      } finally {
View Full Code Here


    Storage storage;
    TreeMap<String, Storage> storages;
    ArrayList<Storage> storagelist;
    HtmlStorage htmlStorage;
    InternalStorage internalStorage;
    PhotoInternalStorage photoInternalStorage;
    ImageLinkStorage imageLinkStorage;
    int i;
    Iterator<String> keys;

    try {
      IPath root = Configuration.getSystemRoot().getRoot().getFolderItem(subfolder);

      files = getDefinitionFiles(root, "storage.xml");
      storages = new TreeMap<String, Storage>();

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

          if (storage instanceof ImageLinkStorage) {
            imageLinkStorage = (ImageLinkStorage) storage;

            imageLinkStorage.setImage(getUrl(files[i].getParent(), imageLinkStorage.getImage()));
          } else if (storage instanceof InternalStorage) {
            internalStorage = (InternalStorage) storage;

            internalStorage.setUrl(getUrl(files[i].getParent(), internalStorage.getUrl()));
          } else if (storage instanceof PhotoInternalStorage) {
            photoInternalStorage = (PhotoInternalStorage) storage;

            photoInternalStorage.setFullSizeBW(
                getUrl(files[i].getParent(), photoInternalStorage.getFullSizeBW()));

            photoInternalStorage.setFullSizeColor(
                getUrl(files[i].getParent(), photoInternalStorage.getFullSizeColor()));

            photoInternalStorage.setThumbnailBW(
                getUrl(files[i].getParent(), photoInternalStorage.getThumbnailBW()));

            photoInternalStorage.setThumbnailColor(
                getUrl(files[i].getParent(), photoInternalStorage.getThumbnailColor()));

            photoInternalStorage.setTitle(files[i].getParent().getName());
          } else if (storage instanceof HtmlStorage) {
            htmlStorage = (HtmlStorage) storage;

            htmlStorage.setFile(
              getNonServletUrl(files[i].getParent(), htmlStorage.getFile()));
View Full Code Here

TOP

Related Classes of com.trustyoram.web.storage.config.PhotoInternalStorage

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.