]> git.argeo.org Git - gpl/argeo-suite.git/blob - publishing/org.argeo.publishing.ui/src/org/argeo/cms/text/TextInterpreterImpl.java
add style for argeo publishing
[gpl/argeo-suite.git] / publishing / org.argeo.publishing.ui / src / org / argeo / cms / text / TextInterpreterImpl.java
1 package org.argeo.cms.text;
2
3 import javax.jcr.Item;
4 import javax.jcr.RepositoryException;
5
6 /**
7 * Text interpreter that sanitise and validates before saving, and support CMS
8 * specific formatting and integration.
9 */
10 class TextInterpreterImpl extends IdentityTextInterpreter {
11 private MarkupValidatorCopy markupValidator = MarkupValidatorCopy
12 .getInstance();
13
14 @Override
15 protected void validateBeforeStoring(String raw) {
16 markupValidator.validate(raw);
17 }
18
19 @Override
20 protected String convertToStorage(Item item, String content)
21 throws RepositoryException {
22 return super.convertToStorage(item, content);
23 }
24
25 @Override
26 protected String convertFromStorage(Item item, String content)
27 throws RepositoryException {
28 return super.convertFromStorage(item, content);
29 }
30
31 }