Package org.openmeetings.app.persistence.beans.files

Examples of org.openmeetings.app.persistence.beans.files.FileExplorerItem


    public void updateFileOrFolderName(Long fileExplorerItemId, String fileName) {
        log.debug(".updateFileOrFolderName() started");

        try {

            FileExplorerItem fId = this
                    .getFileExplorerItemsById(fileExplorerItemId);

            fId.setFileName(fileName);
            fId.setUpdated(new Date());

      if (fId.getFileExplorerItemId() == 0) {
        em.persist(fId);
        } else {
          if (!em.contains(fId)) {
            em.merge(fId);
          }
View Full Code Here


            Long parentFileExplorerItemId, Long room_id, Boolean isOwner,
            Long ownerId) {
        log.debug(".moveFile() started");
        try {

            FileExplorerItem fId = this
                    .getFileExplorerItemsById(fileExplorerItemId);

            fId.setParentFileExplorerItemId(parentFileExplorerItemId);

            if (parentFileExplorerItemId == 0) {
                if (isOwner) {
                    // move to personal Folder
                    fId.setOwnerId(ownerId);
                } else {
                    // move to public room folder
                    fId.setOwnerId(null);
                    fId.setRoom_id(room_id);
                }
            } else {
                fId.setOwnerId(null);
            }

            fId.setUpdated(new Date());

      if (fId.getFileExplorerItemId() == 0) {
        em.persist(fId);
        } else {
          if (!em.contains(fId)) {
            em.merge(fId);
          }
View Full Code Here

        }
        if (isVideo) {
            fileHashName = newFileSystemName + ".flv";
        }

        FileExplorerItem fileExplorerItem = fileExplorerItemDao.getFileExplorerItemsById(parentFolderId);

        if (fileExplorerItem != null) {
            if (fileExplorerItem.getIsFolder() == null
                    || !fileExplorerItem.getIsFolder()) {
                parentFolderId = 0L;
            }
        }

        Long fileExplorerItemId = fileExplorerItemDao.add(
View Full Code Here

        fileExplorerItemDao
            .moveFile(fileExplorerItemId,
                newParentFileExplorerItemId, room_id, isOwner,
                owner_id);

        FileExplorerItem fileExplorerItem = fileExplorerItemDao
            .getFileExplorerItemsById(fileExplorerItemId);

        if (moveToHome) {
          // set this file and all subfiles and folders the ownerId
          fileUtils.setFileToOwnerOrRoomByParent(fileExplorerItem,
View Full Code Here

        fileExplorerItemDao
            .moveFile(fileExplorerItemId,
                newParentFileExplorerItemId, room_id, isOwner,
                users_id);

        FileExplorerItem fileExplorerItem = fileExplorerItemDao
            .getFileExplorerItemsById(fileExplorerItemId);

        if (moveToHome) {
          // set this file and all subfiles and folders the ownerId
          fileUtils.setFileToOwnerOrRoomByParent(fileExplorerItem,
View Full Code Here

  public List<HashMap<String, String>> startConversion(Long fileExplorerItemId, String moviePath) {
    List<HashMap<String, String>> returnLog = new LinkedList<HashMap<String, String>>();
    try {

      FileExplorerItem fileExplorerItem = this.fileExplorerItemDaoImpl
          .getFileExplorerItemsById(fileExplorerItemId);

      log.debug("fileExplorerItem "
          + fileExplorerItem.getFileExplorerItemId());

      //  Convert to FLV
      return this.convertToFLV(fileExplorerItem, moviePath);

      // Add empty pieces at the beginning and end of the wav
View Full Code Here

        String current_dir = ScopeApplicationAdapter.webAppPath
            + File.separatorChar + OpenmeetingsVariables.UPLOAD_DIR + File.separatorChar;
        log.debug("### this is my working directory: " + current_dir);

        FileExplorerItem fileExplorerItem = fileExplorerItemDao
            .getFileExplorerItemsById(fileExplorerItemId);

        ArrayList roomItems = libraryWmlLoader.loadWmlFile(current_dir,
            fileExplorerItem.getWmlFilePath());

        Map whiteboardObjClear = new HashMap();
        whiteboardObjClear.put(2, "clear");
        whiteboardObjClear.put(3, null);
View Full Code Here

            Boolean isStoredWmlFile = importBooleanType(unformatString(fileExplorerItemObj
                .element("isStoredWmlFile").getText()));
            Boolean isChart = importBooleanType(unformatString(fileExplorerItemObj
                .element("isChart").getText()));

            FileExplorerItem fileExplorerItem = new FileExplorerItem();
            fileExplorerItem
                .setFileExplorerItemId(fileExplorerItemId);
            fileExplorerItem.setFileName(fileName);
            fileExplorerItem.setFileHash(fileHash);
            fileExplorerItem
                .setParentFileExplorerItemId(parentFileExplorerItemId);
            fileExplorerItem.setRoom_id(room_id);
            fileExplorerItem.setOwnerId(ownerId);
            fileExplorerItem.setIsFolder(isFolder);
            fileExplorerItem.setIsImage(isImage);
            fileExplorerItem.setIsPresentation(isPresentation);
            fileExplorerItem.setIsVideo(isVideo);
            fileExplorerItem.setInsertedBy(insertedBy);
            fileExplorerItem.setInserted(inserted);
            fileExplorerItem.setUpdated(updated);
            fileExplorerItem.setDeleted(deleted);
            fileExplorerItem.setFileSize(fileSize);
            fileExplorerItem.setFlvWidth(flvWidth);
            fileExplorerItem.setFlvHeight(flvHeight);
            fileExplorerItem.setPreviewImage(previewImage);
            fileExplorerItem.setWmlFilePath(wmlFilePath);
            fileExplorerItem.setIsStoredWmlFile(isStoredWmlFile);
            fileExplorerItem.setIsChart(isChart);

            fileExplorerItemsList.add(fileExplorerItem);

          }
View Full Code Here

            httpServletResponse
                .setContentType("APPLICATION/OCTET-STREAM");
           
            String fileNameResult = requestedFile;
            if (fileExplorerItemId != null && fileExplorerItemId > 0) {
              FileExplorerItem fileExplorerItem = getFileExplorerItemDaoImpl().getFileExplorerItemsById(fileExplorerItemId);
              if (fileExplorerItem != null) {
               
                fileNameResult = fileExplorerItem.getFileName().substring(0, fileExplorerItem.getFileName().length()-4)
                          + fileNameResult.substring(fileNameResult.length()-4, fileNameResult.length());
               
              }
            }
           
View Full Code Here

    Element fileExplorerItemsElement = root.addElement("fileExplorerItems");

    for (Iterator<FileExplorerItem> it = fileExplorerItems.iterator(); it
        .hasNext();) {
      FileExplorerItem fileExplorerItem = it.next();

      Element fileExplorerItemElement = fileExplorerItemsElement
          .addElement("fileExplorerItem");

      fileExplorerItemElement
          .addElement("fileExplorerItemId")
          .addCDATA(
              formatString(""
                  + fileExplorerItem.getFileExplorerItemId()));
      fileExplorerItemElement.addElement("fileName").addCDATA(
          formatString("" + fileExplorerItem.getFileName()));
      fileExplorerItemElement.addElement("fileHash").addCDATA(
          formatString("" + fileExplorerItem.getFileHash()));
      fileExplorerItemElement.addElement("parentFileExplorerItemId")
          .addCDATA(
              formatString(""
                  + fileExplorerItem
                      .getParentFileExplorerItemId()));
      fileExplorerItemElement.addElement("room_id").addCDATA(
          formatString("" + fileExplorerItem.getRoom_id()));
      fileExplorerItemElement.addElement("ownerId").addCDATA(
          formatString("" + fileExplorerItem.getOwnerId()));
      fileExplorerItemElement.addElement("isFolder").addCDATA(
          formatString("" + fileExplorerItem.getIsFolder()));
      fileExplorerItemElement.addElement("isImage").addCDATA(
          formatString("" + fileExplorerItem.getIsImage()));
      fileExplorerItemElement.addElement("isPresentation").addCDATA(
          formatString("" + fileExplorerItem.getIsPresentation()));
      fileExplorerItemElement.addElement("isVideo").addCDATA(
          formatString("" + fileExplorerItem.getIsVideo()));
      fileExplorerItemElement.addElement("insertedBy").addCDATA(
          formatString("" + fileExplorerItem.getInsertedBy()));
      fileExplorerItemElement.addElement("inserted").addCDATA(
          formatString(""
              + CalendarPatterns.getExportDate(fileExplorerItem
                  .getInserted())));
      fileExplorerItemElement.addElement("updated").addCDATA(
          formatString(""
              + CalendarPatterns.getExportDate(fileExplorerItem
                  .getUpdated())));
      fileExplorerItemElement.addElement("deleted").addCDATA(
          formatString("" + fileExplorerItem.getDeleted()));
      fileExplorerItemElement.addElement("fileSize").addCDATA(
          formatString("" + fileExplorerItem.getFileSize()));
      fileExplorerItemElement.addElement("flvWidth").addCDATA(
          formatString("" + fileExplorerItem.getFlvWidth()));
      fileExplorerItemElement.addElement("flvHeight").addCDATA(
          formatString("" + fileExplorerItem.getFlvHeight()));
      fileExplorerItemElement.addElement("previewImage").addCDATA(
          formatString("" + fileExplorerItem.getPreviewImage()));
      fileExplorerItemElement.addElement("wmlFilePath").addCDATA(
          formatString("" + fileExplorerItem.getWmlFilePath()));
      fileExplorerItemElement.addElement("isStoredWmlFile").addCDATA(
          formatString("" + fileExplorerItem.getIsStoredWmlFile()));
      fileExplorerItemElement.addElement("isChart").addCDATA(
          formatString("" + fileExplorerItem.getIsChart()));

    }

    return document;
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.files.FileExplorerItem

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.