public class BundleNavigationNodeController extends Object implements TreeController<TypedObject>
BundleNavigationNodeBrowserModel| Constructor and Description |
|---|
BundleNavigationNodeController() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Tree tree,
Object object,
TypedObject target)
Adds given object as a child of 'target' node (by default as last child), if null then new object is created
|
void |
add(Tree tree,
Object object,
TypedObject target,
int index)
Adds given object as a child of 'target' node, if null then new object is created
|
void |
addProductsToNode(BundleTemplateModel bundleTemplateModel,
Collection<TypedObject> typedProductsToAdd)
Adds new or existing products to the product list of a bundletemplate.
|
protected void |
appendHighlightedDialog(Event event,
OneSourceManyTargetItemSyncDialog dialog) |
void |
captureOpenedTreeitem(Treeitem treeitem) |
TypedObject |
create(Tree tree,
TypedObject target)
Creates new object as a child of 'target' node
|
TypedObject |
create(Tree tree,
TypedObject target,
int index)
Creates new object as a child of 'target' node
|
Object |
customAction(Tree tree,
Event event,
TypedObject node)
If some custom actions were added to the tree, this method will be called for each of them
|
void |
delete(Tree tree,
TypedObject node)
Deletes given node
|
protected void |
detachDialog(Window dialog) |
void |
doubleClicked(Tree tree,
TypedObject currentNode)
Called when given node was double clicked in tree
|
protected Set<TypedObject> |
extractSelectedItem(Set<Treeitem> selectedItems) |
protected List<BundleTemplateModel> |
getAllCatalogVersionsOfBundleTemplate(BundleTemplateModel templateModel) |
BundleNavigationService |
getBundleNavigationService() |
protected BundleTemplateService |
getBundleTemplateService() |
protected FlexibleSearchService |
getFlexibleSearchService() |
protected ModelService |
getModelService() |
static Window |
getMoveItemModalDialog(Tree tree,
TypedObject typedObject,
TypedObject targetNodeObj,
BundleNavigationService bundleNavigationService)
Returns window dialog with options when dropping content page.
|
String |
getNavigationNodeWizardId() |
protected List<List<Integer>> |
getOpenedNodes(Tree tree,
int depth) |
List<List<Integer>> |
getOpenedPath() |
protected List<Integer> |
getPathToRoot(Treeitem treeItem) |
String |
getRelatedResourceWizardId() |
Set<TypedObject> |
getSelected() |
protected SynchronizationService |
getSynchronizationService() |
protected List<SyncItemJobModel>[] |
getSyncJobs(ListViewAction.Context context) |
protected SystemService |
getSystemService() |
protected TypeService |
getTypeService() |
protected boolean |
isBundleTemplateDeletable(BundleTemplateModel templateModel) |
void |
move(Tree tree,
TypedObject node,
TypedObject target,
boolean addAsChild)
Moves given node in place of 'target' node.
|
void |
openCreatedNode(Tree tree,
TypedObject typedObject,
boolean addAsAChild) |
protected void |
openPath(Tree tree,
List<Integer> path)
Opens specified path
|
void |
refresh(Tree tree) |
void |
refresh(Tree tree,
List<List<Integer>> openedNodes) |
protected void |
restoreOpenedState(Tree tree,
List<List<Integer>> openedNodes)
Restores opened state
|
protected void |
restoreSelectionState(Tree tree)
Restores whatever was selected (before tree invalidation etc) Call it after tree open state is restored see
restoreOpenedState(Tree, List) because only opened nodes are search through. |
protected Treeitem |
searchForSelectedNode(List<Treeitem> treeitems,
TypedObject selectedItem) |
void |
selected(Tree tree,
Set<Treeitem> selectedTreeItems)
Called every time the tree node was selected
|
protected void |
sendUpdateEvents(Tree tree,
TypedObject node) |
void |
setBundleNavigationService(BundleNavigationService bundleNavigationService) |
void |
setBundleTemplateService(BundleTemplateService bundleTemplateService) |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setModelService(ModelService modelService) |
void |
setNavigationNodeWizardId(String navigationNodeWizardId) |
void |
setRelatedResourceWizardId(String relatedResourceWizardId) |
void |
setSynchronizationService(SynchronizationService synchronizationService) |
void |
setSystemService(SystemService systemService) |
void |
setTypeService(TypeService typeService) |
void |
showNodeActions(Tree tree,
Set<Treeitem> selectedItems)
Shows actions next to selected row and hides actions from previously selected row
|
public void selected(Tree tree, Set<Treeitem> selectedTreeItems)
SelectableComponentselected in interface SelectableComponent<Tree,Treeitem,TypedObject>tree - in case an update is neededselectedTreeItems - set of currently selected itemspublic Set<TypedObject> getSelected()
getSelected in interface SelectableComponent<Tree,Treeitem,TypedObject>public void captureOpenedTreeitem(Treeitem treeitem)
public void showNodeActions(Tree tree, Set<Treeitem> selectedItems)
public TypedObject create(Tree tree, TypedObject target)
TreeControllercreate in interface TreeController<TypedObject>tree - after successful creation, tree will be notified to update itselftarget - that will have new 'object' added.public TypedObject create(Tree tree, TypedObject target, int index)
TreeControllercreate in interface TreeController<TypedObject>tree - after successful creation, tree will be notified to update itselftarget - that will have new 'object' added.index - at which the new 'object' will be added within 'target' child setpublic void add(Tree tree, Object object, TypedObject target)
TreeControlleradd in interface TreeController<TypedObject>tree - after successful addition, tree will be notified to update itselfobject - e.g. the dragged component which contains something to add to the 'target' node, null indicates that new
object shall be created or anything elsetarget - that will have 'object' added.public void move(Tree tree, TypedObject node, TypedObject target, boolean addAsChild)
TreeControllermove in interface TreeController<TypedObject>tree - after successful movement, tree will be notified to update itselfnode - to be movedtarget - node to be shifted. In place of this 'target' node the 'node' will be moved.addAsChild - flag indicating whether node should be added as a child or not.public static Window getMoveItemModalDialog(Tree tree, TypedObject typedObject, TypedObject targetNodeObj, BundleNavigationService bundleNavigationService)
tree - to find selected nodetypedObject - to move/copytargetNodeObj - - target node over which content page is droppedbundleNavigationService - public void add(Tree tree, Object object, TypedObject target, int index)
TreeControlleradd in interface TreeController<TypedObject>tree - after successful addition, tree will be notified to update itselfobject - e.g. the dragged component which contains something to add to the 'target' node, or anything elsetarget - that will have 'object' added.index - at which the 'object' will be added within 'target' child setpublic void delete(Tree tree, TypedObject node)
TreeControllerdelete in interface TreeController<TypedObject>tree - after successful deletion, tree will be notified to update itselfnode - to deleteprotected boolean isBundleTemplateDeletable(BundleTemplateModel templateModel)
protected List<BundleTemplateModel> getAllCatalogVersionsOfBundleTemplate(BundleTemplateModel templateModel)
public void doubleClicked(Tree tree, TypedObject currentNode)
TreeControllerdoubleClicked in interface TreeController<TypedObject>tree - to play with after whatever was donecurrentNode - which was double clickedprotected Set<TypedObject> extractSelectedItem(Set<Treeitem> selectedItems)
public void openCreatedNode(Tree tree, TypedObject typedObject, boolean addAsAChild)
protected void restoreSelectionState(Tree tree)
restoreOpenedState(Tree, List) because only opened nodes are search through.protected Treeitem searchForSelectedNode(List<Treeitem> treeitems, TypedObject selectedItem)
protected void restoreOpenedState(Tree tree, List<List<Integer>> openedNodes)
public BundleNavigationService getBundleNavigationService()
public void setBundleNavigationService(BundleNavigationService bundleNavigationService)
protected List<SyncItemJobModel>[] getSyncJobs(ListViewAction.Context context)
public Object customAction(Tree tree, Event event, TypedObject node)
TreeControllercustomAction in interface TreeController<TypedObject>tree - to play with if necessaryevent - original event that was sent when custom action button was clickednode - from selected tree itemprotected void appendHighlightedDialog(Event event,
OneSourceManyTargetItemSyncDialog dialog)
protected void sendUpdateEvents(Tree tree, TypedObject node)
public void refresh(Tree tree)
protected void detachDialog(Window dialog)
protected ModelService getModelService()
protected TypeService getTypeService()
protected SystemService getSystemService()
protected SynchronizationService getSynchronizationService()
public void setTypeService(TypeService typeService)
public void setSystemService(SystemService systemService)
public void setModelService(ModelService modelService)
public String getNavigationNodeWizardId()
public void setNavigationNodeWizardId(String navigationNodeWizardId)
public void setSynchronizationService(SynchronizationService synchronizationService)
public String getRelatedResourceWizardId()
public void setRelatedResourceWizardId(String relatedResourceWizardId)
public void addProductsToNode(BundleTemplateModel bundleTemplateModel, Collection<TypedObject> typedProductsToAdd)
bundleTemplateModel - typedProductsToAdd - protected BundleTemplateService getBundleTemplateService()
public void setBundleTemplateService(BundleTemplateService bundleTemplateService)
protected FlexibleSearchService getFlexibleSearchService()
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
Copyright © 2017 SAP SE. All Rights Reserved.