示例#1
0
 public ImageBean() throws Exception {
   image = new Image();
   sessionBean = (SessionBean) BeanHelper.getSessionBean(SessionBean.class);
   navigation = (Navigation) BeanHelper.getApplicationBean(Navigation.class);
   prettyLink = "pretty:editImage";
   labels = (MetadataLabels) BeanHelper.getSessionBean(MetadataLabels.class);
 }
示例#2
0
 public ImageBean(Image img) throws Exception {
   image = img;
   sessionBean = (SessionBean) BeanHelper.getSessionBean(SessionBean.class);
   navigation = (Navigation) BeanHelper.getApplicationBean(Navigation.class);
   prettyLink = "pretty:editImage";
   labels = (MetadataLabels) BeanHelper.getSessionBean(MetadataLabels.class);
   if (sessionBean.getSelected().contains(image.getId())) {
     setSelected(true);
   }
   loadProfile();
   removeDeadMetadata();
   sortMetadataAccordingtoProfile();
 }
示例#3
0
  private String getEmailMessage(
      String password, String email, String username, String message_bundle) {
    Navigation navigation = (Navigation) BeanHelper.getApplicationBean(Navigation.class);
    SessionBean session = (SessionBean) BeanHelper.getSessionBean(SessionBean.class);
    String userPage = navigation.getApplicationUrl() + "user?id=" + email;

    String emailMessage = session.getMessage(message_bundle);

    if ("email_new_user".equals(message_bundle)) {
      emailMessage =
          emailMessage.replace("XXX_LINK_TO_APPLICATION_XXX", navigation.getApplicationUrl());
    }

    emailMessage =
        emailMessage
            .replace("XXX_USER_NAME_XXX,", username)
            .replace("XXX_LOGIN_XXX", email)
            .replace("XXX_PASSWORD_XXX", password)
            .replace("XXX_LINK_TO_USER_PAGE_XXX", userPage);

    return emailMessage;
  }