@PostConstruct public void loadAll() { staticContentsHomepage = staticContentService.findByLocation(Location.HOMEPAGE); staticContentsLeft = staticContentService.findByLocation(Location.LEFT); staticContentsRight = staticContentService.findByLocation(Location.RIGHT); staticContentBanner = staticContentService.findByLocation(Location.BANNER); staticContentFooter = staticContentService.findByLocation(Location.FOOTER); }
public void delete(StaticContent staticContent) { staticContentService.delete(staticContent); loadAll(); }
/** * update operation * * @param type * @param staticContent */ public void save(String type, StaticContent staticContent) { staticContent.setLocation(Location.valueOf(type.toUpperCase(Locale.ENGLISH))); staticContentService.save(staticContent); }