Package kr.or.javacafe.board.domain

Examples of kr.or.javacafe.board.domain.ArticleFile


        for (String strTempRecord : arrTemp) {
          String[] arrRecord = strTempRecord.split("<@COL@>");

          FileUpDownUtil.fileCopy(strFilePath, strRealFilePath, arrRecord[1]);

          ArticleFile aFile = new ArticleFile();
          aFile.setFileNmReal(arrRecord[0]);
          aFile.setFileNmUpload(arrRecord[1]);
          aFile.setFileSize(new Long(arrRecord[2]));
          aFile.setFilePath(strRealFilePath);
          aFile.setContentType(arrRecord[3]);

          objFileList.add(aFile);
        }
      }
View Full Code Here


        for (String strTempRecord : arrTemp) {
          String[] arrRecord = strTempRecord.split("<@COL@>");

          FileUpDownUtil.fileCopy(strFilePath, strRealFilePath, arrRecord[1]);

          ArticleFile aFile = new ArticleFile();
          aFile.setFileNmReal(arrRecord[0]);
          aFile.setFileNmUpload(arrRecord[1]);
          aFile.setFileSize(new Long(arrRecord[2]));
          aFile.setFilePath(strRealFilePath);
          aFile.setContentType(arrRecord[3]);

          objFileList.add(aFile);
        }
      }
View Full Code Here

    // DB 내용 삭제
    Article paramArticle = new Article();
    paramArticle.setAtcNo(new Integer(atcNo));

    ArticleFile paramArticleFile = new ArticleFile();
    paramArticleFile.setAtcNo(new Integer(atcNo));

    boardBO.removeArticle(paramArticle, paramArticleFile);

    if (single.equals("on"))
      return "redirect:/board/list/BBS_ID/" + bbsId + "?single=on";
View Full Code Here

 
 
  @RequestMapping(value = "/file/download/BBS_ID/{bbsId}/FILE_SEQ/{fileSeq}", method = RequestMethod.GET)
  public void fileDownload(@PathVariable String bbsId, @PathVariable String fileSeq, HttpServletResponse response) throws IOException {
    // 파일 정보를 구한다.
    ArticleFile articleFile = boardBO.getDownloadFile(new Integer(fileSeq));

    String strRealFilePath;    // REAL 디렉토리의 파일경로
    if (System.getProperty("os.name").contains("Windows")) {
      strRealFilePath = m_strLocalUploadPathReal + m_SEPARATOR + bbsId;       
    } else {
      strRealFilePath = m_strServerUploadPathReal + m_SEPARATOR + bbsId;               
    }

    // 다운로드
    FileUpDownUtil.fileDownload(response, strRealFilePath, articleFile.getFileNmUpload(), articleFile.getContentType(), articleFile.getFileNmReal());
  }
View Full Code Here

 
  @RequestMapping(value = "/file/remove/BBS_ID/{bbsId}/ATC_NO/{atcNo}/FILE_SEQ/{fileSeq}", method = RequestMethod.GET)
  public String fileUploadRemove(@RequestParam(value = "single", required = false, defaultValue = "") String single, @PathVariable String bbsId, @PathVariable String atcNo, @PathVariable String fileSeq, HttpServletResponse response) throws IOException {
    // 파일 정보를 구한다.
    ArticleFile articleFile = boardBO.getDownloadFile(new Integer(fileSeq));

    String strRealFilePath;    // REAL 디렉토리의 파일경로
    if (System.getProperty("os.name").contains("Windows")) {
      strRealFilePath = m_strLocalUploadPathReal + m_SEPARATOR + bbsId;       
    } else {
      strRealFilePath = m_strServerUploadPathReal + m_SEPARATOR + bbsId;               
    }

    // REAL 파일을 구해서 삭제
    File objRealFile = new File(strRealFilePath + m_SEPARATOR + articleFile.getFileNmUpload());
    if (objRealFile.delete()) {
      logger.debug("File Remove Error !!!");
    }

    // DB 삭제
    ArticleFile aFile = new ArticleFile();
    aFile.setFileSeq(new Integer(fileSeq));
    boardBO.removeArticleFile(aFile);

    if (single.equals("on"))
      return "redirect:/board/edit/BBS_ID/" + bbsId + "/ATC_NO/" + atcNo + "?single=on";
    else
View Full Code Here

TOP

Related Classes of kr.or.javacafe.board.domain.ArticleFile

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.