Examples of Ftp


Examples of com.datasift.client.push.connectors.FTP

    public static ElasticSearch elasticSearch() {
        return new ElasticSearch();
    }

    public static FTP ftp() {
        return new FTP();
    }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

    String hql = "from Ftp bean";
    return find(hql);
  }

  public Ftp findById(Integer id) {
    Ftp entity = get(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

    getSession().save(bean);
    return bean;
  }

  public Ftp deleteById(Integer id) {
    Ftp entity = super.get(id);
    if (entity != null) {
      getSession().delete(entity);
    }
    return entity;
  }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

    return dao.getList();
  }

  @Transactional(readOnly = true)
  public Ftp findById(Integer id) {
    Ftp entity = dao.findById(id);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

    return bean;
  }

  public Ftp update(Ftp bean) {
    Updater<Ftp> updater = new Updater<Ftp>(bean);
    Ftp entity = dao.updateByUpdater(updater);
    return entity;
  }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

    Ftp entity = dao.updateByUpdater(updater);
    return entity;
  }

  public Ftp deleteById(Integer id) {
    Ftp bean = dao.deleteById(id);
    return bean;
  }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

        }
        // 加上访问地址
        String dbFilePath = site.getConfig().getDbFileUri();
        fileUrl = request.getContextPath() + dbFilePath + fileUrl;
      } else if (site.getUploadFtp() != null) {
        Ftp ftp = site.getUploadFtp();
        if (mark && isImg) {
          File tempFile = mark(uplFile, conf);
          fileUrl = ftp.storeByExt(site.getUploadPath(), ext,
              new FileInputStream(tempFile));
          tempFile.delete();
        } else {
          fileUrl = ftp.storeByExt(site.getUploadPath(), ext, uplFile
              .getInputStream());
        }
        // 加上url前缀
        fileUrl = ftp.getUrl() + fileUrl;
      } else {
        if (mark && isImg) {
          File tempFile = mark(uplFile, conf);
          fileUrl = fileRepository.storeByExt(site.getUploadPath(),
              ext, tempFile);
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

          }
          // 加上访问地址
          fileUrl = request.getContextPath() + dbFilePath + fileUrl;
        }
      } else if (site.getUploadFtp() != null) {
        Ftp ftp = site.getUploadFtp();
        String ftpUrl = ftp.getUrl();
        if (!StringUtils.isBlank(filename)) {
          filename = filename.substring(ftpUrl.length());
          if (mark) {
            File tempFile = mark(file, conf);
            fileUrl = ftp.storeByFilename(filename,
                new FileInputStream(tempFile));
            tempFile.delete();
          } else {
            fileUrl = ftp.storeByFilename(filename, file
                .getInputStream());
          }
        } else {
          if (mark) {
            File tempFile = mark(file, conf);
            fileUrl = ftp.storeByExt(site.getUploadPath(), ext,
                new FileInputStream(tempFile));
            tempFile.delete();
          } else {
            fileUrl = ftp.storeByExt(site.getUploadPath(), ext,
                file.getInputStream());
          }
          // 加上url前缀
          fileUrl = ftpUrl + fileUrl;
        }
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

              getLen(imgTop, imgScale),
              getLen(imgLeft, imgScale), getLen(imgWidth,
                  imgScale), getLen(imgHeight, imgScale));
          dbFileMng.restore(imgSrcPath, file);
        } else if (site.getUploadFtp() != null) {
          Ftp ftp = site.getUploadFtp();
          String ftpUrl = ftp.getUrl();
          imgSrcPath = imgSrcPath.substring(ftpUrl.length());
          File file = ftp.retrieve(imgSrcPath);
          imageScale.resizeFix(file, file, reMinWidth, reMinHeight,
              getLen(imgTop, imgScale),
              getLen(imgLeft, imgScale), getLen(imgWidth,
                  imgScale), getLen(imgHeight, imgScale));
          ftp.restore(imgSrcPath, file);
        } else {
          String ctx = request.getContextPath();
          imgSrcPath = imgSrcPath.substring(ctx.length());
          File file = fileRepository.retrieve(imgSrcPath);
          imageScale.resizeFix(file, file, reMinWidth, reMinHeight,
              getLen(imgTop, imgScale),
              getLen(imgLeft, imgScale), getLen(imgWidth,
                  imgScale), getLen(imgHeight, imgScale));
        }
      } else {
        if (site.getConfig().getUploadToDb()) {
          String dbFilePath = site.getConfig().getDbFileUri();
          imgSrcPath = imgSrcPath.substring(dbFilePath.length());
          File file = dbFileMng.retrieve(imgSrcPath);
          imageScale.resizeFix(file, file, reMinWidth, reMinHeight);
          dbFileMng.restore(imgSrcPath, file);
        } else if (site.getUploadFtp() != null) {
          Ftp ftp = site.getUploadFtp();
          String ftpUrl = ftp.getUrl();
          imgSrcPath = imgSrcPath.substring(ftpUrl.length());
          File file = ftp.retrieve(imgSrcPath);
          imageScale.resizeFix(file, file, reMinWidth, reMinHeight);
          ftp.restore(imgSrcPath, file);
        } else {
          String ctx = request.getContextPath();
          imgSrcPath = imgSrcPath.substring(ctx.length());
          File file = fileRepository.retrieve(imgSrcPath);
          imageScale.resizeFix(file, file, reMinWidth, reMinHeight);
View Full Code Here

Examples of com.jeecms.core.entity.Ftp

        fileUrl = dbFileMng.storeByExt(site.getUploadPath(), ext, file
            .getInputStream());
        // 加上访问地址
        fileUrl = request.getContextPath() + dbFilePath + fileUrl;
      } else if (site.getUploadFtp() != null) {
        Ftp ftp = site.getUploadFtp();
        String ftpUrl = ftp.getUrl();
        fileUrl = ftp.storeByExt(site.getUploadPath(), ext, file
            .getInputStream());
        // 加上url前缀
        fileUrl = ftpUrl + fileUrl;
      } else {
        String ctx = request.getContextPath();
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.