public interface ContentVariation extends Versionable
Implementations of this interface allow to access a variation of a content element through a stable API, agnostic to the underlying content structure.
Variations can be synchronized with some other element. If the implementation does not provide enhances synchronization capabilities (which it is free to do), it should synchronize with the element content.
The synchronization works by using the synchronization source, taking their content, optionally applying some rules and then updating the variation with that content.
How the synchronization source is defined and how the source content is processed is implementation specific. This API only provides means to manage the synchronization state and triggering the synchronization.
The synchronization state is represented by the SyncStatus enumeration.
Transactional behavior: The caller is responsible for committing the respective
ResourceResolver after calling one or more
methods that change a content fragment unless specified otherwise.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContent()
Gets the content of the variation.
|
java.lang.String |
getContentType()
Gets the MIME type of the variation.
|
java.lang.String |
getDescription()
Gets a description for the variation.
|
java.lang.String |
getName()
Gets the (technical) name of the variation.
|
SyncStatus |
getSyncStatus()
Gets the synchronization status of the variation.
|
java.lang.String |
getTitle()
Gets the (human-readable) title of the variation.
|
void |
setContent(java.lang.String content,
java.lang.String contentType)
Sets the content of the variation.
|
void |
synchronize()
Synchronizes the variation.
|
createVersion, getVersionedContent, listVersionsjava.lang.String getName()
java.lang.String getTitle()
java.lang.String getDescription()
java.lang.String getContentType()
java.lang.String getContent()
void setContent(java.lang.String content,
java.lang.String contentType)
throws ContentFragmentException
The specified content & its MIME type must be textual. What MIME types are eventually supported is left to the implementation.
content - The contentcontentType - The MIME type of the contentContentFragmentException - if the content could not be writtenjava.lang.IllegalArgumentException - if the specified MIME type is not supported or not
a textual MIME typeSyncStatus getSyncStatus()
void synchronize()
throws ContentFragmentException
Synchronizes the variation.
ContentFragmentException - if the synchronization failed"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"