Class TextService

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.i18n.text.TextService
All Implemented Interfaces:
mc.core.service.base.IService

@ApplicationScoped public class TextService extends mc.core.system.base.BaseBean implements mc.core.service.base.IService
  • Constructor Details

    • TextService

      public TextService()
  • Method Details

    • setTestmode

      public void setTestmode(Boolean testmode)
      always use shared textSets
    • isLicenced

      public boolean isLicenced()
    • setTextSet

      public TextValueTO setTextSet(IBaseEntity entity, IEntityField field, String text, Locale locale)
    • setTextSet

      public TextValueTO setTextSet(IBaseEntity entity, IEntityField field, TextValueTO textValueTO)
    • getMasterLocale

      public Locale getMasterLocale(IBaseEntity entity)
    • copyTextSet

      public TextSet copyTextSet(IBaseEntity entity, IEntityField field, TextSet textSet)
    • createTextSet

      public TextSet createTextSet(String textType, String concept)
      create a new shared textSet
      Parameters:
      textType - optional. use "content" if null
      concept - optional
      Returns:
      new persistent set
    • setTextSet

      public void setTextSet(IBaseEntity entity, IEntityField field, TextSet textSet)
    • setText

      public void setText(TextSet textSet, String text, Locale locale) throws mc.core.system.validation.ValidationException
      Throws:
      mc.core.system.validation.ValidationException
    • setText

      public void setText(TextSet textSet, TextValueTO textValueTO) throws mc.core.system.validation.ValidationException
      Throws:
      mc.core.system.validation.ValidationException
    • getRefCount

      public long getRefCount(TextSet textSet)
      count references to textSet. WARNING: this must query all entityBase tables in DB and is slow
    • getUsage

      public Map<Class,List<Long>> getUsage(TextSet textSet)
      get references to textSet. WARNING: this must query all entityBase tables in DB and is slow