public interface PublicationService
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_RECENTLY |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecentlyOpened(PublicationModel pub)
add a publication to the list of recently opened publications
|
void |
autoAssignPlacements(PageModel page) |
String |
autoCreateCodeString(Class itemclass,
String localized_code,
PublicationModel publication)
Automatically creates a string for the code of the element according to the number of already created items
|
boolean |
checkAccessPermission(ItemModel item,
String userright,
boolean recursive)
Check if the current user has the specified access right for an item
|
ChapterModel |
cloneChapter(PublicationModel _publication,
ChapterModel superChapter,
ChapterModel originalChapter)
Creates a copy of a chapter
|
PageModel |
clonePage(PublicationModel _publication,
ChapterModel _chapter,
PageModel originalPage)
Clones given page, if publication and/or chapter are provided then new (cloned) page will have them assigned.
|
PlacementModel |
clonePlacement(PublicationModel _publication,
PageModel _page,
PlacementModel originalPlacement)
Clones given placement, if publication and/or page are provided then new (cloned) placement will have them assigned.
|
ListSearchResult |
convertSearchResult(ListSearchResult result,
PublicationModel pub)
Convert a search result that contains PK-Strings into one with PublicationElementsModel
|
ChapterModel |
createChapter(PublicationModel publication)
Creates a new chapter
|
PageModel |
createPage(PublicationModel publication,
ChapterModel chapter)
Creates a new page
|
ItemPlacementModel |
createPlacement(PageModel pageModel,
ItemModel item)
Creates a new placement
|
PublicationModel |
createPublication()
Creates a new publication
|
PublicationModel |
createPublication(int initialRootChapters,
int pagesPerRootChapter,
Map<String,Object> ctx)
Creates a new publication with an initial chapter/pages structure
|
PublicationModel |
createPublication(PublicationModel templatePublication)
Creates a new publication as a copy of an existing one
|
void |
deleteElements(List<Object> elements)
Called to delete a specified set of loaded elements e.g.
|
void |
deletePublication(PublicationModel publication)
Completely deletes a publication from database
|
Collection<PageModel> |
getAllPages(Collection<ChapterModel> chapters) |
Collection<PlacementModel> |
getAllPlacements(Collection<PageModel> pages) |
List<Object> |
getAllRegisteredElements(PublicationModel publicationModel) |
List<HybrisEnumValue> |
getAvailableChapterStates() |
List<HybrisEnumValue> |
getAvailableFileHandlingModes()
Returns all enums to be used as filehandling modes.
|
List<HybrisEnumValue> |
getAvailablePageStates() |
List<String> |
getAvailablePlaceholderTemplates()
get all available placeholder templates
|
List<HybrisEnumValue> |
getAvailablePlacementStates() |
List<HybrisEnumValue> |
getAvailablePublicationStates()
Returns all enums to be used as publication element status.
|
Collection<ItemModel> |
getChildren(Object object) |
CometConfigurationModel |
getDefaultCometConfiguration()
get the default comet configuration
|
void |
getDefaultPageAttributeValuesMap(Map<String,Object> attr) |
List<PublicationModel> |
getExistingPublications(boolean onlyActive)
Returns a list of existing publications.
|
ItemModel |
getParent(Object object) |
<T extends ItemModel,C extends Collection<T>> |
getReadableElements(C publications)
Returns filtered publication elements
|
List<PublicationModel> |
getRecentlyOpened()
get a list of recently opened publications
|
boolean |
isCodeInUse(PublicationModel publication,
String code) |
boolean |
isReadable(ItemModel item,
Principal principal)
Deprecated.
|
boolean |
isSubelement(TypedObject parent,
TypedObject elementToCheck)
Checks if the given element is placed somewhere in the node as subelement of the given parent
|
boolean |
isWritable(ItemModel item)
Deprecated.
|
boolean |
isWritable(ItemModel item,
boolean recursive)
Checks if current user has permission to write/change/delete specified publication node
|
PublicationModel |
loadPublication(PublicationModel selected)
Called to load a selected publication into print cockpit.
|
PublicationModel |
loadPublicationForChooser(PK selected)
Called to load a selected publication into print cockpit.
|
PlaceholderTemplateModel |
loadTemplate(String code)
get the placeholder template with the given code
|
boolean |
mustFixPlacements(PageModel page,
GridModel grid,
HybrisEnumValue gridMode)
check if all placements have valid gridelement ids for specified grid and gridmode
|
static final int MAX_RECENTLY
List<PublicationModel> getExistingPublications(boolean onlyActive)
These objects are not fully loaded publications but stripped down versions of them to be used for selection e.g. for loading or cloning them.
onlyActive - set to true if only active publications should be returned, set to false if all publication should be
returnedPublicationModel loadPublication(PublicationModel selected)
selected - the publication to loadPublicationModel loadPublicationForChooser(PK selected)
selected - PK of the publication to loadvoid deletePublication(PublicationModel publication)
publication - the publication to deletevoid deleteElements(List<Object> elements)
elements - List<HybrisEnumValue> getAvailablePublicationStates()
List<HybrisEnumValue> getAvailableChapterStates()
List<HybrisEnumValue> getAvailablePageStates()
List<HybrisEnumValue> getAvailablePlacementStates()
List<HybrisEnumValue> getAvailableFileHandlingModes()
ItemPlacementModel createPlacement(PageModel pageModel, ItemModel item)
pageModel - the page in which the placement shall resideitem - item to be set inside created placementPublicationModel createPublication()
PublicationModel createPublication(PublicationModel templatePublication)
templatePublication - the existing publication to be clonedPublicationModel createPublication(int initialRootChapters, int pagesPerRootChapter, Map<String,Object> ctx)
initialRootChapters - the number of initial rootchapterspagesPerRootChapter - the number of pages per rootchapterctx - additional parametersChapterModel createChapter(PublicationModel publication)
publication - the publication the new chapter belongs toPageModel createPage(PublicationModel publication, ChapterModel chapter)
publication - the publication the new page belongs toPlacementModel clonePlacement(PublicationModel _publication, PageModel _page, PlacementModel originalPlacement)
_publication - _page - originalPlacement - ChapterModel cloneChapter(PublicationModel _publication, ChapterModel superChapter, ChapterModel originalChapter)
_publication - the publication the new chapter belongs tosuperChapter - originalChapter - the chapter to clonePageModel clonePage(PublicationModel _publication, ChapterModel _chapter, PageModel originalPage)
_publication - _chapter - originalPage - ListSearchResult convertSearchResult(ListSearchResult result, PublicationModel pub)
result - the original search resultString autoCreateCodeString(Class itemclass, String localized_code, PublicationModel publication)
itemclass - the elementpublication - the selected publicationList<String> getAvailablePlaceholderTemplates()
PlaceholderTemplateModel loadTemplate(String code)
code - the codeList<PublicationModel> getRecentlyOpened()
void addRecentlyOpened(PublicationModel pub)
pub - the publication to addCometConfigurationModel getDefaultCometConfiguration()
boolean checkAccessPermission(ItemModel item, String userright, boolean recursive)
item - the itemuserright - the userright@Deprecated boolean isWritable(ItemModel item)
PrintcockpitUIAccessRightService.canWrite(de.hybris.platform.core.model.user.UserModel, ItemModel)
instead. item - boolean isWritable(ItemModel item, boolean recursive)
item - recursive - - if true all subelements will be checked as well@Deprecated boolean isReadable(ItemModel item, Principal principal)
PrintcockpitUIAccessRightService.canRead(de.hybris.platform.core.model.user.UserModel, ItemModel)
Checks if current user has permission to read specified publication nodeitem - <T extends ItemModel,C extends Collection<T>> C getReadableElements(C publications)
publications - boolean isCodeInUse(PublicationModel publication, String code)
boolean mustFixPlacements(PageModel page, GridModel grid, HybrisEnumValue gridMode)
grid - the gridgridMode - the gridmodevoid autoAssignPlacements(PageModel page)
List<Object> getAllRegisteredElements(PublicationModel publicationModel)
Collection<PageModel> getAllPages(Collection<ChapterModel> chapters)
chapters - Collection<PlacementModel> getAllPlacements(Collection<PageModel> pages)
pages - ItemModel getParent(Object object)
object - ItemModel or TypedObject of kind: Publication, Chapter, Page, Placement etc.Collection<ItemModel> getChildren(Object object)
object - ItemModel or TypedObject of the kind: Publication, Chapter, Pageboolean isSubelement(TypedObject parent, TypedObject elementToCheck)
parent - elementToCheck - Copyright © 2017 SAP SE. All Rights Reserved.