예제 #1
0
 @Override
 protected void getCurrentFolderParam(final HttpServletRequest request) {
   String currFolder = getParameter(request, "currentFolder");
   if (!(currFolder == null || currFolder.equals(""))) {
     this.currentFolder = PathUtils.addSlashToBeginning(PathUtils.addSlashToEnd(currFolder));
   }
 }
  /**
   * Gets configuration value of baseUrl. When config value is not set, then return default value.
   *
   * @param request request
   * @return default baseDir value
   */
  @Override
  public String getBaseUrl(final HttpServletRequest request) {
    String baseURL = null;
    try {
      IConfiguration conf = ConfigurationFactory.getInstace().getConfiguration();
      baseURL = conf.getBaseURL();
    } catch (Exception e) {
      baseURL = null;
    }
    if (baseURL == null || baseURL.equals("")) {
      baseURL = super.getBaseUrl(request);
    }

    return PathUtils.addSlashToBeginning(PathUtils.addSlashToEnd(baseURL));
  }
예제 #3
0
 /** sets new folder name. */
 private void setNewFolder() {
   String tmp1 = this.currentFolder.substring(0, this.currentFolder.lastIndexOf('/'));
   this.newFolderPath = tmp1.substring(0, tmp1.lastIndexOf('/') + 1).concat(this.newFolderName);
   this.newFolderPath = PathUtils.addSlashToEnd(this.newFolderPath);
 }