Ejemplo n.º 1
0
 public void loadProfile() {
   try {
     profile = sessionBean.getProfileCached().get(image.getMetadataSet().getProfile());
     if (profile == null) {
       profile =
           ObjectLoader.loadProfile(image.getMetadataSet().getProfile(), sessionBean.getUser());
     }
     if (profile == null) {
       profile = new MetadataProfile();
     }
   } catch (Exception e) {
     BeanHelper.error(
         sessionBean.getMessage("error_profile_load")
             + " "
             + image.getMetadataSet().getProfile()
             + "  "
             + sessionBean.getLabel("of")
             + " "
             + image.getId());
     profile = new MetadataProfile();
     logger.error(
         "Error load profile "
             + image.getMetadataSet().getProfile()
             + " of image "
             + image.getId(),
         e);
   }
 }
Ejemplo n.º 2
0
 public void loadCollection() {
   try {
     collection = ObjectLoader.loadCollection(getImage().getCollection(), sessionBean.getUser());
   } catch (Exception e) {
     BeanHelper.error(e.getMessage());
     e.printStackTrace();
     collection = null;
   }
 }
Ejemplo n.º 3
0
 public void loadImage() {
   try {
     image = ObjectLoader.loadImage(ObjectHelper.getURI(Image.class, id), sessionBean.getUser());
   } catch (NotFoundException e) {
     image = new Image();
     BeanHelper.error(
         sessionBean.getLabel("image") + " " + id + sessionBean.getLabel("not_found"));
   } catch (Exception e) {
     BeanHelper.error(sessionBean.getMessage("error_image_load"));
     logger.error(sessionBean.getMessage("error_image_load"), e);
   }
 }