/** Method checking the url parameters and triggering then the {@link UploadBean} methods */ public void status() { if (UrlHelper.getParameterBoolean("init")) { importImageToFile = false; uploadFileToItem = false; checkNameUnique = true; removeFiles(); loadCollection(); ((AuthorizationBean) BeanHelper.getSessionBean(AuthorizationBean.class)).init(collection); totalNum = ""; sNum = 0; fNum = 0; sFiles = new ArrayList<String>(); fFiles = new ArrayList<String>(); externalUrl = ""; } else if (UrlHelper.getParameterBoolean("start")) { try { upload(); } catch (Exception e) { logger.error("Error upload", e); } } else if (UrlHelper.getParameterBoolean("done")) { try { if (importImageToFile || uploadFileToItem) updateItemForFiles(); else createItemForFiles(); totalNum = UrlHelper.getParameterValue("totalNum"); loadCollection(); report(); } catch (Exception e) { logger.error("Error upload", e); e.printStackTrace(); } } super.setCollection(collection); }
public String getInit() { parseID(); initMenus(); if (UrlHelper.getParameterBoolean("reset")) { reset(); } if (UrlHelper.getParameterBoolean("init")) { loadtemplates(); initBeanObjects(profile); } return ""; }