Example #1
0
 Object onActivate() {
   boolean local = deploymentContext.isLocal();
   if (!local) {
     return Index.class;
   }
   return true;
 }
Example #2
0
  public List<String> getFolders() {
    String photo = deploymentContext.photoLocation();
    File directory = new File(photo);

    List<String> folders = new ArrayList<String>();
    for (File file : directory.listFiles()) {
      if (file.isDirectory()) {
        String name = file.getName();
        AbstractPost post = postDAO.getByGalleryName(name);
        if (post == null) {
          folders.add(name);
        }
      }
    }
    return folders;
  }
  public String getFlashCardImageLink(AbstractPost post) {
    String localPath = deploymentContext.imageLocation();
    localPath += FLASH_CARDS_FOLDER + "/" + post.getUuid() + ".jpg";

    return getLink(localPath);
  }
  public String getLessonPlanImageLink(AbstractPost post) {
    String localPath = deploymentContext.imageLocation();
    localPath += LESSON_PLAN_FOLDER + "/" + post.getUuid() + ".jpg";

    return getLink(localPath);
  }