public AppCollection getAppsForCategory(long id) { List<Application> apps = appDao.getApplicationForCategory(id); List<AppDetails> appsInfo = convertToAppDetailsList(apps); AppCollection appCol = new AppCollection(); appCol.setApps(appsInfo); return appCol; }
public AppDetails getAppDetails(long id) { logger.debug(">> getAppDetails >> id =" + id); List<Application> apps = appDao.getApplication(new Application(id)); if (apps != null && apps.size() > 0) { Application application = apps.get(0); return convertToAppDetails(application); } return null; }
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; }