protected String doHandlePost(UserSession us, Map args) { PhotoFilter filter = us.getPhotoFilter(); String un = us.getAsString(args, PhotoFilter.USER_NAME); if (StringUtil.isLegalUserName(un)) { filter.setUserName(un); } String tags = us.getAsString(args, PhotoFilter.TAGS); if (StringUtil.isLegalTagsString(tags)) { filter.setTags(new Tags(tags)); } log.info( LogBuilder.createUserMessage() .addAction("Filter Photos") .addParameter("Tags", filter.getTags().asString()) .toString()); return PartUtil.SHOW_PHOTO_PAGE_NAME; }
protected String doHandlePost(UserSession us, Map args) { String id = us.getAndSaveAsString(args, "photoId"); Photo photo = PhotoManager.getInstance().getPhoto(id); String tags = us.getAndSaveAsString(args, Photo.TAGS); photo.setTags(new Tags(tags)); String status = us.getAndSaveAsString(args, Photo.STATUS); photo.setStatus(PhotoStatus.getFromString(status)); AsyncTaskExecutor.savePhotoAsync(id); log.info( LogBuilder.createUserMessage() .addAction("AdminUserPhoto") .addParameter("Photo", photo.getId().asString()) .toString()); us.setMessage(us.getClient().getLanguageConfiguration().getPhotoUpdateSucceeded()); return PartUtil.SHOW_ADMIN_PAGE_NAME; }