1 19 20 package com.sslexplorer.networkplaces.model; 21 22 import java.util.Calendar ; 23 24 import com.sslexplorer.policyframework.LaunchSession; 25 import com.sslexplorer.vfs.webdav.DAVUtilities; 26 27 public class FolderItem extends FileSystemItem { 28 29 private String folderPath; 30 private String storeName; 31 32 public FolderItem(LaunchSession launchSession, String fileName, String storeName, String folderPath, Calendar dateModified, String fileType, boolean selected, int idx) { 33 super(launchSession, fileName, dateModified, fileType, selected, 0, idx); 34 this.folderPath = folderPath; 35 this.storeName = storeName; 36 } 37 38 public String getFolderPath() { 39 return folderPath; 40 } 41 42 public void setFolderPath(String folderPath) { 43 this.folderPath = folderPath; 44 } 45 46 public String onClick(String path) { 47 if (getFileName().equals("../")){ 48 return "/fileSystem.do?" + LaunchSession.LAUNCH_ID + "=" + getLaunchSession().getId() + "&actionTarget=list&startRow=0&path=" + DAVUtilities.encodePath(DAVUtilities.dirname(this.folderPath)); 49 } 50 else{ 51 return "/fileSystem.do?" + LaunchSession.LAUNCH_ID + "=" + getLaunchSession().getId() + "&actionTarget=list&startRow=0&path=" + DAVUtilities.encodePath(DAVUtilities.concatenatePaths(folderPath, getFileName())); 52 } 53 } 54 55 public String getWebFolderPath() { 56 return "/fs/" + folderPath + "/" + getFileName(); 57 } 58 } 59 | Popular Tags |