示例#1
0
  public Application storeFile(
      String fileName, InputStream uploadedInputStream, Application application)
      throws InvalidAttribute {

    Category category = categoryDao.getCategory(application.getAppCategId());
    // save to file system
    Application app = uploadFile(fileName, uploadedInputStream, category, application);

    // save to database
    logger.debug("Inserting new app's details to database: " + app);
    appDao.createApplication(app);

    return app;
  }
示例#2
0
 private AppDetails convertToAppDetails(Application application) {
   AppDetails appDetails = new AppDetails();
   logger.debug("Convert Application: " + application + " to AppDetails");
   Category category = categoryDao.getCategory(application.getAppCategId());
   logger.debug("Category :" + category);
   appDetails.setId(application.getAppId());
   appDetails.setCategoryName(category.getCategType());
   appDetails.setDescription(application.getDescription());
   appDetails.setName(application.getAppName());
   appDetails.setUrl(application.getUrl());
   appDetails.setIconUrl(application.getIconUrl());
   appDetails.setDeveloper(application.getDeveloprName());
   appDetails.setSize(application.getAppSize());
   logger.debug("AppDetails : " + appDetails);
   return appDetails;
 }