public class NavigationNodeController extends java.lang.Object implements PositionAwareTreeController<TypedObject>
NavigationNodeBrowserModel| Constructor and Description |
|---|
NavigationNodeController() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Tree tree,
java.lang.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,
java.lang.Object object,
TypedObject target,
int index)
Adds given object as a child of 'target' node, if null then new object is created
|
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
|
java.lang.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 java.util.Set<TypedObject> |
extractSelectedItem(java.util.Set<Treeitem> selectedItems) |
CMSNavigationService |
getCmsNavigationService() |
protected ModelService |
getModelService() |
static Window |
getMoveItemModalDialog(Tree tree,
TypedObject typedObject,
TypedObject targetNodeObj,
CMSNavigationService cmsNavigationService)
Returns window dialog with options when dropping content page.
|
java.lang.String |
getNavigationNodeWizardId() |
protected java.util.List<java.util.List<java.lang.Integer>> |
getOpenedNodes(Tree tree,
int depth) |
protected java.util.List<java.lang.Integer> |
getPathToRoot(Treeitem treeItem) |
java.lang.String |
getRelatedResourceWizardId() |
java.util.Set<TypedObject> |
getSelected() |
protected SynchronizationService |
getSynchronizationService() |
protected java.util.List<SyncItemJobModel>[] |
getSyncJobs(ListViewAction.Context context) |
protected SystemService |
getSystemService() |
protected TypeService |
getTypeService() |
void |
move(Tree tree,
TypedObject node,
TypedObject target,
boolean addAsChild)
Moves given node in place of 'target' node.
|
void |
move(Tree tree,
TypedObject node,
TypedObject target,
boolean addAsChild,
boolean append)
Moves given node in place of 'target' node.
|
void |
openCreatedNode(Tree tree,
TypedObject typedObject,
boolean addAsAChild) |
protected void |
openPath(Tree tree,
java.util.List<java.lang.Integer> path)
Opens specified path
|
void |
refresh(Tree tree) |
protected void |
restoreOpenedState(Tree tree,
java.util.List<java.util.List<java.lang.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(java.util.List<Treeitem> treeitems,
TypedObject selectedItem) |
void |
selected(Tree tree,
java.util.Set<Treeitem> selectedTreeItems)
Called every time the tree node was selected
|
protected void |
sendUpdateEvents(Tree tree,
TypedObject node) |
void |
setCmsNavigationService(CMSNavigationService navigationNodeService) |
void |
setModelService(ModelService modelService) |
void |
setNavigationNodeWizardId(java.lang.String navigationNodeWizardId) |
void |
setRelatedResourceWizardId(java.lang.String relatedResourceWizardId) |
void |
setSynchronizationService(SynchronizationService synchronizationService) |
void |
setSystemService(SystemService systemService) |
void |
setTypeService(TypeService typeService) |
protected void |
showNodeActions(Tree tree,
java.util.Set<Treeitem> selectedItems)
Shows actions next to selected row and hides actions from previously selected row
|
public void selected(Tree tree, java.util.Set<Treeitem> selectedTreeItems)
SelectableComponentselected in interface SelectableComponent<Tree,Treeitem,TypedObject>tree - in case an update is neededselectedTreeItems - set of currently selected itemspublic java.util.Set<TypedObject> getSelected()
getSelected in interface SelectableComponent<Tree,Treeitem,TypedObject>protected void showNodeActions(Tree tree, java.util.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, java.lang.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 void move(Tree tree, TypedObject node, TypedObject target, boolean addAsChild, boolean append)
PositionAwareTreeControllermove in interface PositionAwareTreeController<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.append - if true the element will be placed after (addAsChild false) or in the very end (addAsChild true)public static Window getMoveItemModalDialog(Tree tree, TypedObject typedObject, TypedObject targetNodeObj, CMSNavigationService cmsNavigationService)
tree - to find selected nodetypedObject - to move/copytargetNodeObj - - target node over which content page is droppedcmsNavigationService - public void add(Tree tree, java.lang.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 deletepublic void doubleClicked(Tree tree, TypedObject currentNode)
TreeControllerdoubleClicked in interface TreeController<TypedObject>tree - to play with after whatever was donecurrentNode - which was double clickedprotected java.util.Set<TypedObject> extractSelectedItem(java.util.Set<Treeitem> selectedItems)
protected java.util.List<java.util.List<java.lang.Integer>> getOpenedNodes(Tree tree, int depth)
public void openCreatedNode(Tree tree, TypedObject typedObject, boolean addAsAChild)
protected java.util.List<java.lang.Integer> getPathToRoot(Treeitem treeItem)
protected void restoreSelectionState(Tree tree)
restoreOpenedState(Tree, List) because only opened nodes are search through.protected Treeitem searchForSelectedNode(java.util.List<Treeitem> treeitems,
TypedObject selectedItem)
protected void restoreOpenedState(Tree tree, java.util.List<java.util.List<java.lang.Integer>> openedNodes)
protected void openPath(Tree tree, java.util.List<java.lang.Integer> path)
public CMSNavigationService getCmsNavigationService()
public void setCmsNavigationService(CMSNavigationService navigationNodeService)
protected java.util.List<SyncItemJobModel>[] getSyncJobs(ListViewAction.Context context)
public java.lang.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 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 java.lang.String getNavigationNodeWizardId()
public void setNavigationNodeWizardId(java.lang.String navigationNodeWizardId)
public void setSynchronizationService(SynchronizationService synchronizationService)
public java.lang.String getRelatedResourceWizardId()
public void setRelatedResourceWizardId(java.lang.String relatedResourceWizardId)
Copyright © 2018 SAP SE. All Rights Reserved.