Package com.m4f.utils.i18n.model.impl

Examples of com.m4f.utils.i18n.model.impl.JdoI18nEntry


  }
 
  private void putSimpleField(Locale locale, I18nBehaviour obj,
      String fieldKey, Object fieldContent) throws Exception {
    String fieldValue =  fieldContent==null?"":fieldContent.toString();
    JdoI18nEntry entry = (JdoI18nEntry) this.i18nService.createTranslationUnit();
    entry.setFieldKey(fieldKey);
    entry.setFieldValue(new Text(fieldValue));
    entry.setObjectClass(obj.getClass().getName());
    entry.setContentId("" + obj.getId());
    entry.setLang(locale.getLanguage());
    this.i18nService.saveOrUpdate(entry);
  }
View Full Code Here


 
  @RequestMapping(value="/delete/{entryId}", method=RequestMethod.GET)
  public String deleteI18n(@PathVariable Long entryId, Model model,
      @RequestParam(required=false, defaultValue="en") String lang) {
    try {
      JdoI18nEntry entry = this.serviceLocator.getI18nService().getEntry(entryId);
      this.serviceLocator.getI18nService().delete(entry);
    } catch (Exception e) {
      LOGGER.severe(StackTraceUtil.getStackTrace(e));
      return "common.error";
    }
View Full Code Here

TOP

Related Classes of com.m4f.utils.i18n.model.impl.JdoI18nEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.