TextService

In order to init TextService bean need to use - Imcms.getServices().getManagedBean(TextService.class)

Use API

List<TextJPA> getByDocId(Integer docId);

Text getText(Text textRequestData);

Text getText(int docId, int index, String langCode, LoopEntryRef loopEntryRef);

List<TextJPA> getText(Integer index, String key);

Text getPublicText(int docId, int index, String langCode, LoopEntryRef loopEntryRef);

Text getLikePublishedText(int docId, int index, String langCode, LoopEntryRef loopEntryRef);

Text save(Text text);

Set<Text> getPublicTexts(int docId, Language language);

Set<Text> getLikePublishedTexts(int docId, Language language);

Text filter(Text text);

Fields TextJPA

  1. Integer id;

  2. Version version;

  3. Integer index;

  4. String text;

  5. Language language;

  6. LoopEntryRefJPA loopEntryRefJPA;

  7. boolean likePublished; - flag forced published text on document