@Role
@Unstable
public interface URLNormalizationManager
Modifier and Type | Field and Description |
---|---|
static String |
SAVE_COMMENT_KEY
The save comment used when saving a document after normalization.
|
Modifier and Type | Method and Description |
---|---|
boolean |
normalize(org.xwiki.model.reference.DocumentReference documentReference)
Normalize the given
DocumentReference and save it. |
boolean |
normalize(org.xwiki.model.reference.DocumentReference documentReference,
List<String> normalizers)
Normalize the given
DocumentReference and save it. |
boolean |
normalize(org.xwiki.model.reference.DocumentReference documentReference,
List<String> normalizers,
boolean createNewVersion)
Normalize the given
DocumentReference . |
boolean |
normalize(com.xpn.xwiki.doc.XWikiDocument document)
Normalize the given
XWikiDocument , do not save the document after the normalization. |
boolean |
normalize(com.xpn.xwiki.doc.XWikiDocument document,
List<String> normalizers)
Normalize the given
XWikiDocument using the given normalizers. |
static final String SAVE_COMMENT_KEY
boolean normalize(com.xpn.xwiki.doc.XWikiDocument document) throws NormalizationException
XWikiDocument
, do not save the document after the normalization. The document will
not be saved after normalization.document
- the document to normalizeNormalizationException
- if an error happensboolean normalize(com.xpn.xwiki.doc.XWikiDocument document, List<String> normalizers) throws NormalizationException
XWikiDocument
using the given normalizers. The document will not be saved after
normalziation.document
- the document to normalizenormalizers
- a list of hints for DocumentNormalizer
components to be used on the document. If
the list is empty, the normalizers to be used will be chosen by the implementation of this component.NormalizationException
- if an error happensboolean normalize(org.xwiki.model.reference.DocumentReference documentReference) throws NormalizationException
DocumentReference
and save it. The save comment should be the value of the
translation key SAVE_COMMENT_KEY
.documentReference
- the document to normalizeNormalizationException
- if an error happensboolean normalize(org.xwiki.model.reference.DocumentReference documentReference, List<String> normalizers) throws NormalizationException
DocumentReference
and save it. The save comment should be the value of the
translation key SAVE_COMMENT_KEY
.documentReference
- the document to normalizenormalizers
- a list of hints for DocumentNormalizer
components to be used on the document. See
normalize(XWikiDocument, List)
.NormalizationException
- if an error happensboolean normalize(org.xwiki.model.reference.DocumentReference documentReference, List<String> normalizers, boolean createNewVersion) throws NormalizationException
DocumentReference
. See normalize(DocumentReference, List, boolean)
.documentReference
- the document to normalizenormalizers
- a list of hints for DocumentNormalizer
components to be used on the document. See
normalize(DocumentReference, List)
.createNewVersion
- defines whether a new document version should be created if the document is saved.NormalizationException
- if an error happensCopyright © 2004–2021 XWiki Contrib. All rights reserved.