Interface ChannelSourceProvider
- All Superinterfaces:
Comparable<StoreElement>,HistoryProvider,IDProvider,StoreElement,Workflowable
- All Known Subinterfaces:
FormatTemplate,LinkTemplate,MasterTemplate,PageTemplate,Script,SectionTemplate,StyleTemplate,TableTemplate,Template,TemplateContentProvider
This interface provides comprehensive methods for all elements which provides
channel specific (belonging to a
template set) source content.
Example usage:
final TemplateStoreRoot templatestore = (TemplateStoreRoot) userService.getStore(Store.Type.TEMPLATESTORE, false);
ChannelSourceProvider csp = templatestore.getPageTemplates().getTemplate("standard");
csp.setLock(true, false);
// e.g. use default (first) template set
final TemplateSet templateSet = userService.getProject().getTemplateSets().get(0);
try {
final String source = csp.getChannelSource(templateSet);
csp.setChannelSource(templateSet, "$-- (c) e-Spirit AG 2007 --$\n" + source);
csp.save("channel source set via API", false);
} finally {
csp.setLock(false, false);
}
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProviderNested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.IDProvider
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType -
Field Summary
Fields inherited from interface de.espirit.firstspirit.storage.HistoryProvider
ALL_REVISIONS, EVER_SINCE, UNTIL_NOWFields inherited from interface de.espirit.firstspirit.access.store.IDProvider
CHANGED, NEVER_RELEASED, RELEASED -
Method Summary
Modifier and TypeMethodDescriptiongetChannelSource(@NotNull TemplateSet templateSet) Get the source for the channel specified by the given templateset.voidsetChannelSource(@NotNull TemplateSet templateSet, String source) Sets the given source for the template channel specified by the given template setMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistoryMethods inherited from interface de.espirit.firstspirit.access.store.IDProvider
contrastWith, getDisplayName, getId, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseRevision, getReleaseStatus, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isInReleaseStore, isReachableInReleaseStore, isReleased, isReleased, isReleaseSupported, moveChild, moveChild, release, release, release, release, revert, setDisplayName, setMeta, setMetaFormData, setUidMethods inherited from interface de.espirit.firstspirit.access.store.StoreElement
appendChild, appendChildBefore, delete, exportStoreElement, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getEditor, getElementType, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getName, getNextSibling, getOutgoingReferences, getPermission, getPermission, getPermission, getPreviousSibling, getProject, getReferenceName, getReferences, getReferences, getStore, getTreePermission, getWorkflowPermission, getWorkflowPermissions, getWriteLock, hasIncomingReferences, hasPermissions, importStoreElement, importStoreElements, inheritWorkflowPermission, isDeleted, isExportSupported, isFolder, isImportSupported, isLocked, isLockedOnServer, isLockSupported, isPermissionSupported, isWorkflowAllowed, isWorkflowSupported, refresh, removeAllWorkflowPermissions, removeChild, removePermission, removePermission, removePermission, removeWorkflowPermission, replaceChild, save, save, save, setInheritWorkflowPermission, setLock, setLock, setPermission, setPermission, setPermission, setWorkflowPermission, setWorkflowPermissions, setWriteLock, toXml, toXml, toXmlMethods inherited from interface de.espirit.firstspirit.access.Workflowable
getColor, getTask, hasTask, removeTask, setColor, setTask
-
Method Details
-
getChannelSource
Get the source for the channel specified by the given templateset.- Parameters:
templateSet- the templateset to specify the channel to look up.- Returns:
- The source for the channel belonging to given templateset.
- Since:
- 4.0
- See Also:
-
setChannelSource
Sets the given source for the template channel specified by the given template set- Parameters:
templateSet- the templateset which specifies the channel the given source should be set forsource- the channel source to be set- Since:
- 4.0.120
- See Also:
-