Examples of FileExplorerItem


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

                String previewImage = unformatString(fileExplorerItemObj.element("previewImage").getText());
                String wmlFilePath = unformatString(fileExplorerItemObj.element("wmlFilePath").getText());
                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

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

  }
 
  public void startConversion(Long fileExplorerItemId, String moviePath) {
    try {

      FileExplorerItem fileExplorerItem = this.fileExplorerItemDaoImpl.getFileExplorerItemsById(fileExplorerItemId);
     
      log.debug("fileExplorerItem " + fileExplorerItem.getFileExplorerItemId());

      // Strip Audio out of all Audio-FLVs
      this.convertToFLV(fileExplorerItem, moviePath);

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

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

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

        FileExplorerItem fileExplorerItem = FileExplorerItemDaoImpl
                .getInstance().getFileExplorerItemsById(parentFolderId);

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

        Long fileExplorerItemId = FileExplorerItemDaoImpl.getInstance().add(
View Full Code Here

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

    public void deleteFileExplorerItemByExternalIdAndType(Long externalFilesid, String externalType) {
        log.debug(".deleteFileExplorerItemByExternalIdAndType() started");

        try {

            FileExplorerItem fId = this
                    .getFileExplorerItemsByExternalIdAndType(externalFilesid, externalType);

            if (fId == null) {
              throw new Exception("externalFilesid: "+externalFilesid+" and externalType: "+externalType+" Not found");
            }
           
            fId.setDeleted("true");
            fId.setUpdated(new Date());

            Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      if (fId.getFileExplorerItemId() == 0) {
        session.persist(fId);
          } else {
            if (!session.contains(fId)) {
              session.merge(fId);
          }
View Full Code Here

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());

            Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      if (fId.getFileExplorerItemId() == 0) {
        session.persist(fId);
          } else {
            if (!session.contains(fId)) {
              session.merge(fId);
          }
View Full Code Here

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

            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());

            Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      if (fId.getFileExplorerItemId() == 0) {
        session.persist(fId);
          } else {
            if (!session.contains(fId)) {
              session.merge(fId);
          }
View Full Code Here

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

            Boolean isPresentation, String wmlFilePath,
            Boolean isStoredWmlFile, Boolean isChart,
            Long externalFileId, String externalType) {
        log.debug(".add(): adding file " + fileName);
        try {
            FileExplorerItem fileItem = new FileExplorerItem();
            fileItem.setFileName(fileName);
            fileItem.setFileHash(fileHash);
            fileItem.setDeleted("false");
            fileItem.setParentFileExplorerItemId(parentFileExplorerItemId);
            fileItem.setOwnerId(ownerId);
            fileItem.setRoom_id(room_id);
            fileItem.setInserted(new Date());
            fileItem.setInsertedBy(insertedBy);
            fileItem.setIsFolder(isFolder);
            fileItem.setIsImage(isImage);
            fileItem.setIsPresentation(isPresentation);
            fileItem.setUpdated(new Date());
            fileItem.setWmlFilePath(wmlFilePath);
            fileItem.setIsStoredWmlFile(isStoredWmlFile);
            fileItem.setIsChart(isChart);
            fileItem.setExternalFileId(externalFileId);
            fileItem.setExternalType(externalType);

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
     
      fileItem = session.merge(fileItem);
      Long fileItemId = fileItem.getFileExplorerItemId();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);

            log.debug(".add(): file " + fileName + " added as " + fileItemId);
            return fileItemId;
View Full Code Here

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

      EntityTransaction tx = session.getTransaction();
      tx.begin();
      Query query = session.createQuery(hql);
      query.setParameter("fileExplorerItemId", fileExplorerItemId);
     
      FileExplorerItem fileExplorerList = null;
      try {
        fileExplorerList = (FileExplorerItem) query.getSingleResult();
        } catch (NoResultException ex) {
        }
      tx.commit();
View Full Code Here

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

      tx.begin();
      Query query = session.createQuery(hql);
      query.setParameter("externalFileId", externalFileId);
      query.setParameter("externalType", externalType);
     
      FileExplorerItem fileExplorerList = null;
      try {
        fileExplorerList = (FileExplorerItem) query.getSingleResult();
        } catch (NoResultException ex) {
        }
      tx.commit();
View Full Code Here

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

    public void deleteFileExplorerItem(Long fileExplorerItemId) {
        log.debug(".deleteFileExplorerItem() started");

        try {

            FileExplorerItem fId = this
                    .getFileExplorerItemsById(fileExplorerItemId);

            fId.setDeleted("true");
            fId.setUpdated(new Date());

      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      if (fId.getFileExplorerItemId() == 0) {
        session.persist(fId);
          } else {
            if (!session.contains(fId)) {
              session.merge(fId);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.