C# Class Umbraco.Belle.System.Trees.TreeApiController

The base controller for all tree requests
Inheritance: Umbraco.Web.WebApi.UmbracoApiController
Datei anzeigen Open project: umbraco/Belle

Public Methods

Method Description
CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, bool hasChildren ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, bool hasChildren, string icon ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action, bool hasChildren ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action, bool hasChildren, string icon ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action, string icon ) : TreeNode

Helper method to create tree nodes and automatically generate the json url

Protected Methods

Method Description
AddQueryStringsToAdditionalData ( TreeNode node, FormDataCollection queryStrings ) : void

The AdditionalData of a node is always populated with the query string data, this method performs this operation and ensures that special values are not inserted or that duplicate keys are not added.

AddRootNodeToCollection ( string id, FormDataCollection queryStrings ) : bool

Checks if the node Id is the root node and if so creates the root node and appends it to the NodeCollection based on the standard tree parameters

This method ensure that all of the correct meta data is set for the root node so that the Umbraco application works as expected. Meta data such as 'treeId' and 'searchable'

CreateRootNode ( FormDataCollection queryStrings ) : TreeNode

Helper method to create a root model for a tree

GetTreeData ( string id, FormDataCollection queryStrings ) : TreeNodeCollection

The method called to render the contents of the tree structure

We are allowing an arbitrary number of query strings to be pased in so that developers are able to persist custom data from the front-end to the back end to be used in the query for model data.

Initialize ( global controllerContext ) : void

Remove the xml formatter... only support JSON!

TreeApiController ( ) : System

Private Methods

Method Description
GetNodes ( string id, FormDataCollection queryStrings ) : TreeNodeCollection

Method Details

AddQueryStringsToAdditionalData() protected method

The AdditionalData of a node is always populated with the query string data, this method performs this operation and ensures that special values are not inserted or that duplicate keys are not added.
protected AddQueryStringsToAdditionalData ( TreeNode node, FormDataCollection queryStrings ) : void
node TreeNode
queryStrings FormDataCollection
return void

AddRootNodeToCollection() protected method

Checks if the node Id is the root node and if so creates the root node and appends it to the NodeCollection based on the standard tree parameters
This method ensure that all of the correct meta data is set for the root node so that the Umbraco application works as expected. Meta data such as 'treeId' and 'searchable'
protected AddRootNodeToCollection ( string id, FormDataCollection queryStrings ) : bool
id string
queryStrings FormDataCollection
return bool

CreateRootNode() protected method

Helper method to create a root model for a tree
protected CreateRootNode ( FormDataCollection queryStrings ) : TreeNode
queryStrings FormDataCollection
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, bool hasChildren ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
hasChildren bool
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, bool hasChildren, string icon ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
hasChildren bool
icon string
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
action string
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action, bool hasChildren ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
action string
hasChildren bool
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action, bool hasChildren, string icon ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
action string
hasChildren bool
icon string
return TreeNode

CreateTreeNode() public method

Helper method to create tree nodes and automatically generate the json url
public CreateTreeNode ( string id, FormDataCollection queryStrings, string title, string editorUrl, string action, string icon ) : TreeNode
id string
queryStrings FormDataCollection
title string
editorUrl string
action string
icon string
return TreeNode

GetTreeData() protected abstract method

The method called to render the contents of the tree structure
We are allowing an arbitrary number of query strings to be pased in so that developers are able to persist custom data from the front-end to the back end to be used in the query for model data.
protected abstract GetTreeData ( string id, FormDataCollection queryStrings ) : TreeNodeCollection
id string
queryStrings FormDataCollection /// All of the query string parameters passed from jsTree ///
return TreeNodeCollection

Initialize() protected method

Remove the xml formatter... only support JSON!
protected Initialize ( global controllerContext ) : void
controllerContext global
return void

TreeApiController() protected method

protected TreeApiController ( ) : System
return System