public List<StaticContent> getStaticContents(String type) {
   Location location = Location.valueOf(type.toUpperCase(Locale.ENGLISH));
   switch (location) {
     case HOMEPAGE:
       return staticContentsHomepage;
     case LEFT:
       return staticContentsLeft;
     case RIGHT:
       return staticContentsRight;
     case BANNER:
       return staticContentBanner;
     case FOOTER:
       return staticContentFooter;
     default:
       throw new UnsupportedOperationException();
   }
 }
 /**
  * update operation
  *
  * @param type
  * @param staticContent
  */
 public void save(String type, StaticContent staticContent) {
   staticContent.setLocation(Location.valueOf(type.toUpperCase(Locale.ENGLISH)));
   staticContentService.save(staticContent);
 }