|  |  |  | 
|---|
|  |  |  | public String fileSysRelativePath; //文件名称的哈希值对应的文件最终存储相对路径的目录,在配置文件中配置 | 
|---|
|  |  |  | public String restUrl;//文件系统路径 | 
|---|
|  |  |  | public String webUrl ;//下载文档的web路径 | 
|---|
|  |  |  | public String webDownloadUrl ;//Action下载文档的web路径 | 
|---|
|  |  |  | public String webDownloadPath ;//下载文档的Controller的相对路径 | 
|---|
|  |  |  | public Integer hashStart ;//哈希值启始值(包含) | 
|---|
|  |  |  | public Integer hashEnd ;//哈希值截止值(包含) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | String fileSysBasePath, | 
|---|
|  |  |  | String restUrl, | 
|---|
|  |  |  | String webUrl, | 
|---|
|  |  |  | String webDownloadUrl, | 
|---|
|  |  |  | String webDownloadPath, | 
|---|
|  |  |  | Integer hashStart, | 
|---|
|  |  |  | Integer hashEnd)throws Exception{ | 
|---|
|  |  |  | this.id = id ; | 
|---|
|  |  |  | 
|---|
|  |  |  | this.fileSysRelativePath = fileSysBasePath ; | 
|---|
|  |  |  | this.restUrl = restUrl ; | 
|---|
|  |  |  | this.webUrl = webUrl ; | 
|---|
|  |  |  | this.webDownloadUrl = webDownloadUrl ; | 
|---|
|  |  |  | this.webDownloadPath = webDownloadPath ; | 
|---|
|  |  |  | this.hashStart = hashStart ; | 
|---|
|  |  |  | this.hashEnd = hashEnd ; | 
|---|
|  |  |  | if(this.id == null || this.id.trim().equals("")){ | 
|---|
|  |  |  | 
|---|
|  |  |  | this.webUrl += "/" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(this.webDownloadUrl == null || this.webDownloadUrl.trim().equals("")){ | 
|---|
|  |  |  | throw new Exception("出错,webDownloadUrl为空了!") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | this.webDownloadUrl = this.webDownloadUrl.trim() ; | 
|---|
|  |  |  | if(!this.webDownloadUrl.endsWith("/") && !this.webDownloadUrl.endsWith("\\")){ | 
|---|
|  |  |  | this.webDownloadUrl += "/" ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(this.webDownloadPath == null || this.webDownloadPath.trim().equals("")){ | 
|---|
|  |  |  | throw new Exception("出错,webDownloadPath!") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(this.hashStart == null){ | 
|---|
|  |  |  | throw new Exception("出错,hashStart为空了!") ; | 
|---|
|  |  |  | }else if(this.hashStart.intValue() < 0){ | 
|---|
|  |  |  | 
|---|
|  |  |  | + "fileSysBasePath=" + fileSysRelativePath + "\n" | 
|---|
|  |  |  | + "restUrl=" + restUrl + "\n" | 
|---|
|  |  |  | + "webUrl=" + webUrl + "\n" | 
|---|
|  |  |  | + "webDownloadUrl=" + webDownloadUrl + "\n" | 
|---|
|  |  |  | + "webDownloadPath=" + webDownloadPath + "\n" | 
|---|
|  |  |  | + "hashStart=" + hashStart + "\n" | 
|---|
|  |  |  | + "hashEnd=" + hashEnd ; | 
|---|
|  |  |  | } | 
|---|