Package com.centraview.file

Examples of com.centraview.file.FileList


     
      CvFileHome fileHome = (CvFileHome)CVUtility.getHomeObject("com.centraview.file.CvFileHome", "CvFile");
      CvFile remoteFile = fileHome.create();
      remoteFile.setDataSource(dataSource);
     
      FileList fileList = null;
     
      if (tVO.getId() != 0) {
        fileList = remoteFile.getAllTicketFiles(individualID, tVO.getId());
      }
     
View Full Code Here


      else {
        strFolderId = userobjectd.getUserPref().getDefaultFolderID();
      }

      ListPreference listpreference= userobjectd.getListPreference("File");
      FileList displaylistSession=null;


      FileList DL = new FileList() ;
      CvFileFacade fileFacade = new CvFileFacade();
      FileListElement fle = fileFacade.getParentFolder(individualID, strFolderId, dataSource);

      if (fle != null) {
        StringBuffer stringbuffer = new StringBuffer("00000000000");
        stringbuffer.setLength(11);
        String s3 = (new Integer(DL.getBeginIndex())).toString();
        stringbuffer.replace(stringbuffer.length() - s3.length(), stringbuffer.length(), s3);
        String s4 = stringbuffer.toString();
        DL.put(s4, fle);

        DL.setTotalNoOfRecords(DL.size() + 1);
        DL.setListType("File");
        DL.setBeginIndex(DL.getBeginIndex());
        DL.setEndIndex(DL.size());
      }

      com.centraview.common.ListGenerator lg = com.centraview.common.ListGenerator.getListGenerator(dataSource);
      boolean systemIncludeFlag = (userobjectd.getUserType().equals("ADMINISTRATOR") ? true : false);
      DL.putAll((FileList )lg.getFileList(individualID,1,10,"","",FileConstantKeys.MY,strFolderId,systemIncludeFlag));;

      String searchStr = request.getParameter("simpleSearch");
      if(searchStr != null && (searchStr.trim()).length() > 0)
      {
        searchStr = searchStr.trim();
        DL.setSearchString("SIMPLE: "+searchStr);
        DL.search();
      }
      request.setAttribute("displaylist" , DL );

    }
    catch (Exception e)
View Full Code Here

      remote.setDataSource(dataSource);

      CvFileHome fileHome = (CvFileHome)CVUtility.getHomeObject("com.centraview.file.CvFileHome", "CvFile");
      CvFile cvFile = fileHome.create();
      cvFile.setDataSource(dataSource);
      FileList fileList = null;
     
      if (tVO.getId() != 0) {
        fileList = cvFile.getAllTicketFiles(individualId, tVO.getId());
        fileList = setLinksFunction(fileList);
      }
View Full Code Here

   * @return
   */
  public FileList getFileList(int userid, int folderID, DisplayList DLparam)
  {

    FileList returnDL = null;
    FileList paramDL = (FileList)DLparam;

    int listSize = paramDL.getTotalNoOfRecords();
    int startAT = paramDL.getStartAT();
    int EndAt = paramDL.getEndAT();

    String powerString = paramDL.getPowerString();
    String searchString = paramDL.getSearchString();
    String sortColumn = paramDL.getSortMember();
    String fileTypeRequest = paramDL.getFileTypeRequest();

    boolean SystemIncludeFlag = paramDL.getSystemIncludeFlag();

    int curFolderID = paramDL.getCurrentFolderID();

    HashMap hm = new HashMap();
    hm.put("startATparam", new Integer(Math.max(startAT - 100, 1)));
    hm.put("EndAtparam", new Integer(Math.min(EndAt + 100, listSize)));
    hm.put("searchString", searchString);
    hm.put("sortmem", paramDL.getSortMember());
    hm.put("sortType", new Character(paramDL.getSortType()));
    hm.put("fileTypeRequest", fileTypeRequest); // all my
    hm.put("SystemIncludeFlag", new Boolean(SystemIncludeFlag));
    hm.put("curFolderID", new Integer(curFolderID));

    try {
      CvFileFacade cvFFacacde = new CvFileFacade();
      returnDL = cvFFacacde.getAllFiles(userid, hm, this.dataSource);
    } catch (Exception e) {
      System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
    }

    returnDL.setFileTypeRequest(fileTypeRequest);
    returnDL.setListType("File");
    returnDL.setListID(paramDL.getListID());
    returnDL.setStartAT(paramDL.getStartAT());
    returnDL.setEndAT(paramDL.getEndAT());
    returnDL.setSortType(paramDL.getSortType());
    returnDL.setSearchString(searchString);

    returnDL.setPowerString(powerString);

    returnDL.setSystemIncludeFlag(SystemIncludeFlag);
View Full Code Here

   * @return
   */
  public FileList getEntityFileList(int entityId, int userId, int folderID, DisplayList DLparam)
  {

    FileList returnDL = null;
    FileList paramDL = (FileList)DLparam;

    int listSize = paramDL.getTotalNoOfRecords();
    int startAT = paramDL.getStartAT();
    int EndAt = paramDL.getEndAT();

    String powerString = paramDL.getPowerString();
    String searchString = paramDL.getSearchString();
    String sortColumn = paramDL.getSortMember();
    String fileTypeRequest = paramDL.getFileTypeRequest();

    boolean SystemIncludeFlag = paramDL.getSystemIncludeFlag();

    int curFolderID = paramDL.getCurrentFolderID();

    HashMap hm = new HashMap();
    hm.put("startATparam", new Integer(Math.max(startAT - 100, 1)));
    hm.put("EndAtparam", new Integer(Math.min(EndAt + 100, listSize)));
    hm.put("searchString", searchString);
    hm.put("sortmem", paramDL.getSortMember());
    hm.put("sortType", new Character(paramDL.getSortType()));
    hm.put("fileTypeRequest", fileTypeRequest); // all my
    hm.put("SystemIncludeFlag", new Boolean(SystemIncludeFlag));
    hm.put("curFolderID", new Integer(curFolderID));

    try {
      CvFileHome aa = (CvFileHome)CVUtility.getHomeObject("com.centraview.file.CvFileHome",
          "CvFile");
      CvFile remote = (CvFile)aa.create();
      remote.setDataSource(this.dataSource);
      returnDL = remote.getEntityFiles(entityId, userId, hm);
    } catch (Exception e) {
      System.out.println("[Exception] ListGenerator.getEntityFileList: " + e.toString());
      // e.printStackTrace();
    }

    returnDL.setFileTypeRequest(fileTypeRequest);
    returnDL.setListType("File");
    returnDL.setListID(paramDL.getListID());
    returnDL.setStartAT(paramDL.getStartAT());
    returnDL.setEndAT(paramDL.getEndAT());
    returnDL.setSortType(paramDL.getSortType());
    returnDL.setSearchString(searchString);

    returnDL.setPowerString(powerString);

    returnDL.setSystemIncludeFlag(SystemIncludeFlag);
View Full Code Here

   * @param list
   * @return
   */
  public FileList createEmptyObject(FileList list)
  {
    FileList dummy = new FileList();
    dummy.setListType(list.getListType());
    dummy.setPrimaryMemberType(list.getPrimaryMemberType());
    dummy.setPrimaryTable(list.getPrimaryTable());
    dummy.setSortMember(list.getSortMember());
    dummy.setSortType(list.getSortType());
    dummy.setPrimaryMember(list.getPrimaryMember());
    dummy.setStartAT(list.getStartAT());
    dummy.setEndAT(list.getEndAT());
    dummy.setBeginIndex(0);
    dummy.setEndIndex(0);
    dummy.setSystemIncludeFlag(list.getSystemIncludeFlag());
    dummy.setFileTypeRequest(list.getFileTypeRequest());
    dummy.setCurrentFolderID(list.getCurrentFolderID());

    return dummy;
  }// end of createEmptyObject
View Full Code Here

  }

  public FileList getFilesProjectList(int userID, int startAT, int EndAt, String searchString,
      String sortColumn, String fileTypeRequest, int folderID, boolean SystemIncludeFlag)
  {
    FileList list = getFileList(userID, startAT, EndAt, searchString, sortColumn, fileTypeRequest,
        folderID, SystemIncludeFlag);
    list.setListType("BottomFiles");
    // list.setTypeoflist( typeOfList );
    FileList dl1 = (FileList)displayLists.get(new Long(list.getListID()));
    dl1.setListType("BottomFiles");
    // dl1.setTypeoflist( typeOfList );

    return list;
  }
View Full Code Here

    return list;
  }

  public FileList getFilesProjectList(int userID, int folderID, DisplayList DLparam)
  {
    FileList list = getFileList(userID, folderID, (FileList)DLparam);
    list.setListType("BottomFiles");
    FileList dl1 = (FileList)displayLists.get(new Long(list.getListID()));
    dl1.setListType("BottomFiles");
    return list;
  }
View Full Code Here

  public FileList getEmployeeHandbookList(int userID, int startATparam, int EndAtparam,
      String searchString, String sortColumn, String fileTypeRequest, int folderID,
      boolean SystemIncludeFlag)
  {
    if ((searchString != null) && ((searchString.trim()).length() > 0)) {
      FileList dl = new FileList();
      dl.setStartAT(startATparam);
      dl.setEndAT(EndAtparam);
      dl.setSortMember(sortColumn);
      dl.setSortType('A');
      dl.setSearchString(searchString);
      dl.setListType("File");
      dl.setSystemIncludeFlag(SystemIncludeFlag);
      dl.setCurrentFolderID(folderID);
      dl.setFileTypeRequest(fileTypeRequest);

      long currentListID = this.getNextListID();
      dl.setListID(currentListID);

      displayLists.put(new Long(currentListID), dl);

      return this.getFileList(userID, folderID, dl);

    } else {
      FileList returnDL = null;
      try {
        HashMap hm = new HashMap();
        hm.put("startATparam", new Integer(startATparam));
        hm.put("EndAtparam", new Integer(EndAtparam));
        hm.put("searchString", searchString);
        hm.put("sortmem", sortColumn);
        hm.put("sortType", new Character('A'));
        hm.put("fileTypeRequest", fileTypeRequest);
        hm.put("curFolderID", new Integer(folderID));

        hm.put("SystemIncludeFlag", new Boolean(SystemIncludeFlag));

        HashMap listMap = null;

        CvFileFacade cvFFacacde = new CvFileFacade();

        try {
          returnDL = cvFFacacde.getAllFiles(userID, hm, this.dataSource);
        } catch (Exception e) {
          System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
        }

        returnDL.setFileTypeRequest(fileTypeRequest);
        returnDL.setSystemIncludeFlag(SystemIncludeFlag);
        returnDL.setListType("EmployeeHandbook");
        returnDL.setPrimaryTable("employeehandbook");
        returnDL.setTotalNoOfRecords(returnDL.size());
        returnDL.setCurrentFolderID(folderID);

        long currentListID = this.getNextListID();
        returnDL.setListID(currentListID);
        returnDL.setStartAT(startATparam);
        returnDL.setEndAT(EndAtparam);

        FileList emptyDL = createEmptyObject(returnDL);
        emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
        emptyDL.setListID(currentListID);
        emptyDL.setListType("EmployeeHandbook");
        emptyDL.setStartAT(returnDL.getStartAT());
        emptyDL.setEndAT(returnDL.getEndAT());
        emptyDL.setFileTypeRequest(fileTypeRequest);
        emptyDL.setSystemIncludeFlag(SystemIncludeFlag);
        emptyDL.setCurrentFolderID(folderID);

        displayLists.put(new Long(currentListID), emptyDL);
      } catch (Exception e) {
        // System.out.println("[Exception][MarketingListEJB] Exception thrown in
        // x: " + e);
View Full Code Here

   * @return
   */
  public FileList getEmployeeHandbookList(int userid, int folderID, DisplayList DLparam)
  {

    FileList returnDL = null;
    FileList paramDL = (FileList)DLparam;

    int listSize = paramDL.getTotalNoOfRecords();
    int startAT = paramDL.getStartAT();
    int EndAt = paramDL.getEndAT();

    String powerString = paramDL.getPowerString();
    String searchString = paramDL.getSearchString();
    String sortColumn = paramDL.getSortMember();
    String fileTypeRequest = paramDL.getFileTypeRequest();

    boolean SystemIncludeFlag = paramDL.getSystemIncludeFlag();

    int curFolderID = paramDL.getCurrentFolderID();

    HashMap hm = new HashMap();
    hm.put("startATparam", new Integer(Math.max(startAT - 100, 1)));
    hm.put("EndAtparam", new Integer(Math.min(EndAt + 100, listSize)));
    hm.put("searchString", searchString);
    hm.put("sortmem", paramDL.getSortMember());
    hm.put("sortType", new Character(paramDL.getSortType()));
    hm.put("fileTypeRequest", fileTypeRequest); // all my
    hm.put("SystemIncludeFlag", new Boolean(SystemIncludeFlag));
    hm.put("curFolderID", new Integer(curFolderID));
    try {

      CvFileFacade cvFFacacde = new CvFileFacade();

      returnDL = cvFFacacde.getAllFiles(userid, hm, this.dataSource);

    } catch (Exception e) {
      System.out.println("[Exception][MarketingListEJB] Exception thrown in x: " + e);
    }

    returnDL.setFileTypeRequest(fileTypeRequest);
    returnDL.setListType("EmployeeHandbook");
    returnDL.setPrimaryTable("employeehandbook");
    returnDL.setListID(paramDL.getListID());
    returnDL.setStartAT(paramDL.getStartAT());
    returnDL.setEndAT(paramDL.getEndAT());
    returnDL.setSortType(paramDL.getSortType());
    returnDL.setSearchString(searchString);

    returnDL.setPowerString(powerString);

    returnDL.setSystemIncludeFlag(SystemIncludeFlag);
View Full Code Here

TOP

Related Classes of com.centraview.file.FileList

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.