Configuration Examples
Here are a few example enrichment service configurations:
-
Check that a content item has at least three tags before it is saved:
- name: check-minimum-tag href: http://host:port/checkMinimumTag title: Minimum Tags triggers: - name: before-save
-
Check that a content item has no unpublished relations before it is published:
- name: check-unpublished-related-content href: http://host:port/checkUnpublishedContent title: Unpublished Related Content triggers: - name: before-save-state-published
-
Check a content item's spelling at regular intervals:
- name: check-spelling href: http://host:port/spellChecker title: Spell Checker triggers: - name: editor-recurring properties: interval: 20
-
Print a content item:
- name: print-article href: http://host:port/printArticle title: Print Article triggers: - name: on-click
In order for this configuration to work there must not only be an enrichment service to print the content item at
http://
host:
port/printArticle
, the content item being edited must also contain a Print button for the user to click. Such buttons must be defined in content type definitions in the publication content-type resource. An enrichment service trigger button is defined by a content itemfield
element with aui:editor
child element. Theui:editor
child element must have atype
attribute with the valueenrichment-service
and a name attribute that matches the name of the CUE enrichment service. For example:<field name="enrichmentbutton" type="basic" mime-type="text/plain"> <ui:label>Print</ui:label> <ui:editor type="enrichment-service" name="print-article"/> </field>