public class DefaultPrintcockpitService extends Object implements PrintcockpitService
| Constructor and Description |
|---|
DefaultPrintcockpitService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToClipboardCollection(ObjectCollection collection,
List<TypedObject> elements,
boolean isCut)
Adds given elements to specified collection
|
void |
clearClipboardCollection(ObjectCollection collection)
Clears given collection from existing elements
|
Set<String> |
getAllIDs(PublicationModel pub) |
List<ChapterModel> |
getAllSuperChapters(ChapterModel chapter) |
GridElementModel |
getElement(GridModel gridModel,
int gridElementID) |
List<Integer> |
getGridIds(GridModel gridModel) |
ModelHelper |
getModelHelper() |
ModelService |
getModelService() |
Component |
getNavigablePath(TypedObject typedObject,
String attribConstant,
String nodeStyleClass,
Component separator,
EventListener pathClickListener,
boolean useButton) |
ObjectCollection |
getPrintcockpitClipboardCollection(UserModel user)
Returns user's clipboard collection
|
List<ItemModel> |
getRecentlyEditedPublicationElements(int count)
Returns list of recently edited publication elements
|
PublicationComponentModel |
getRegisteredElement(PublicationModel pub,
String pk) |
boolean |
isDoublePage(TypedObject typedPage) |
boolean |
isFixedMode(TypedObject page) |
void |
removePlacement(PlacementModel placementToRemove)
Removes placement (deletes also the page2placement relation)
|
void |
removePublicationElementRecursively(TypedObject publicationElement)
Removes given publication element and all children recursively
|
void |
saveChapter(ChapterModel superChapter,
ChapterModel chapter,
int _position)
Saves given chapter in given super chapter at given position, if given super chapter contains this chapter, it's moved from
it's old position to new position.
|
void |
savePage(PageModel page,
ChapterModel chapter,
int _position)
Saves given page in given chapter at given position, if given chapter contains this page, it's moved from it's old position
to new position, if no chapter is given then page is simply saved without assigning it to any particular chapter
|
void |
savePlacement(PlacementModel placement,
PageModel page,
int _position)
Saves given placement in given page at given position, if given page contains this placement, it's moved from it's old
position to new position, if no page is given then placement is simply saved without assigning it to any particular page
|
void |
setModelHelper(ModelHelper modelHelper) |
void |
setModelService(ModelService modelService) |
void |
setObjectCollectionService(ObjectCollectionService objectCollectionService) |
void |
setTypeService(TypeService typeService) |
public Set<String> getAllIDs(PublicationModel pub)
getAllIDs in interface PrintcockpitServicepublic GridElementModel getElement(GridModel gridModel, int gridElementID)
getElement in interface PrintcockpitServicepublic List<Integer> getGridIds(GridModel gridModel)
getGridIds in interface PrintcockpitServicepublic ModelService getModelService()
public ModelHelper getModelHelper()
public List<ItemModel> getRecentlyEditedPublicationElements(int count)
PrintcockpitServicegetRecentlyEditedPublicationElements in interface PrintcockpitServicepublic PublicationComponentModel getRegisteredElement(PublicationModel pub, String pk)
getRegisteredElement in interface PrintcockpitServicepublic boolean isFixedMode(TypedObject page)
isFixedMode in interface PrintcockpitServicepublic void removePlacement(PlacementModel placementToRemove)
PrintcockpitServiceremovePlacement in interface PrintcockpitServicepublic void saveChapter(ChapterModel superChapter, ChapterModel chapter, int _position)
PrintcockpitServicesaveChapter in interface PrintcockpitService_position - give -1 if you wish chapter to be stored at the endpublic void savePage(PageModel page, ChapterModel chapter, int _position)
PrintcockpitServicesavePage in interface PrintcockpitService_position - give -1 if you wish page to be stored at the endpublic void savePlacement(PlacementModel placement, PageModel page, int _position)
PrintcockpitServicesavePlacement in interface PrintcockpitServiceplacement - to save_position - give -1 if you wish placement to be stored at the endpublic void setModelService(ModelService modelService)
public void setModelHelper(ModelHelper modelHelper)
public void removePublicationElementRecursively(TypedObject publicationElement) throws SecurityException
PrintcockpitServiceremovePublicationElementRecursively in interface PrintcockpitServiceSecurityException - when user has no privileges to remove any of subelementspublic Component getNavigablePath(TypedObject typedObject, String attribConstant, String nodeStyleClass, Component separator, EventListener pathClickListener, boolean useButton)
getNavigablePath in interface PrintcockpitServicetypedObject - to which path should be generated (expected: publication,chapter or page)attribConstant - under this constant typedObject of particular node will be storednodeStyleClass - style class of every node (button or link)separator - for nodes, default is label: " / "pathClickListener - listener to handle clicks on path nodesuseButton - if true button is used as path node, link otherwisepublic List<ChapterModel> getAllSuperChapters(ChapterModel chapter)
getAllSuperChapters in interface PrintcockpitServicechapter - for which all super chapters are returnedpublic void setTypeService(TypeService typeService)
typeService - the cockpit typeService to setpublic void setObjectCollectionService(ObjectCollectionService objectCollectionService)
objectCollectionService - the objectCollectionService to setpublic ObjectCollection getPrintcockpitClipboardCollection(UserModel user)
PrintcockpitServicegetPrintcockpitClipboardCollection in interface PrintcockpitServicepublic void addToClipboardCollection(ObjectCollection collection, List<TypedObject> elements, boolean isCut)
PrintcockpitServiceaddToClipboardCollection in interface PrintcockpitServicecollection - where elements will be addedelements - to be addedisCut - - if false elements will be cloned when pasted, instead of movedpublic void clearClipboardCollection(ObjectCollection collection)
PrintcockpitServiceclearClipboardCollection in interface PrintcockpitServicepublic boolean isDoublePage(TypedObject typedPage)
isDoublePage in interface PrintcockpitServicePageType of given page is Double, false if SINGLECopyright © 2017 SAP SE. All Rights Reserved.