Skip to content
Julius Seltenheim edited this page May 16, 2013 · 43 revisions

Table Of Content

Action Call
User Related Actions
Login User jsRoutes.controllers.User.login()
/login
Logout User jsRoutes.controllers.User.logout()
/logout
Get Maps of User on Server jsRoutes.controllers.User.mapListFromDB()
/maps
Mindmap Related Actions
Get Information
Get complete Mindmap as Json jsRoutes.controllers.MindMap.map(String mapId)
/map/:mapId/json
Get chunked Mindmap as Json jsRoutes.controllers.MindMap.map(String mapId, Integer nodeCount)
/map/:mapId/json?nodeCount
Get Node with all Children as Json jsRoutes.controllers.MindMap.getNode(String mapId, String nodeId)
/map/:mapId/node/:nodeId
Get Node with some Children as Json jsRoutes.controllers.MindMap.getNode(String mapId, String nodeId, Integer nodeCount)
/map/:mapId/node/:nodeId?nodeCount
Listen for updates on Map jsRoutes.controllers.MindMap.listenForUpdates(String mapId)
/map/:mapId/listen
Fetch Updates Since Revision jsRoutes.controllers.MindMap.fetchUpdatesSinceRevision(String mapId, Integer revision)
/map/:mapId/updates/:revision
Gaining and Releasing locks
Request Lock for a Node jsRoutes.controllers.MindMap.requestLock(String mapId)
/map/:mapId/node/requestLock
Release Lock for a Node jsRoutes.controllers.MindMap.releaseLock(String mapId)
/map/:mapId/node/releaseLock
Modifying a Mindmap
Create Node in Map jsRoutes.controllers.MindMap.createNode(String mapId)
/map/:mapId/node/create
Change Node in Map jsRoutes.controllers.MindMap.changeNode(String mapId)
/map/:mapId/node/change
Move Node in Map jsRoutes.controllers.MindMap.moveNode(String mapId)
/map/:mapId/node/move
Delete Node in Map jsRoutes.controllers.MindMap.deleteNode(String mapId)
/map/:mapId/node/delete
Change Edge in Map jsRoutes.controllers.MindMap.changeEdge(String mapId)
/map/:mapId/node/changeEdge

Detailed Informations

Login

Method POST
Action jsRoutes.controllers.User.login()
/login
Form Data
  • username: String
  • password: String
Requires Nothing
Returns 303 Redirect

Logout

Method GET
Action jsRoutes.controllers.User.logout()
/logout
Form Data ---
Requires
Returns 303 Redirect

Map Info From Database

Method GET
Action jsRoutes.controllers.User.mapListFromDB()
/maps
Form Data ---
Requires
Returns List with MindMapInfo Objects

Mindmap As Json

Method GET
Action jsRoutes.controllers.MindMap.map(String mapId)
jsRoutes.controllers.MindMap.map(String mapId, Integer nodeCount)
/map/:mapId/json
/map/:mapId/json?nodeCount
Params mapId = Id of the map (currently mmIdOnServer)
nodeCount = soft limit of maximum nodes
Form Data ---
Requires
Returns A MindMap Object

Node As Json

Method GET
Action jsRoutes.controllers.MindMap.getNode(String mapId,Strin nodeId)
jsRoutes.controllers.MindMap.getNode(String mapId,Strin nodeId, Integer nodeCount)
/map/:mapId/node/:nodeId
/map/:mapId/node/:nodeId?nodeCount
Params mapId = Id of the map (currently mmIdOnServer)
nodeId = Id of node
nodeCount = soft limit of maximum nodes
Form Data ---
Requires
Returns A DefaultNode Object

Listen for Updates on Map

Method GET
Action jsRoutes.controllers.MindMap.listenForUpdates(String mapId)
/map/:mapId/listen
Params mapId = Id of the map (currently mmIdOnServer)
Form Data ---
Requires
Returns Status 200 OK = update occured
Status 304 Not Modified = When for 30 seconds nothing have changed

Fetch Updates since Revision

Method GET
Action jsRoutes.controllers.MindMap.fetchUpdatesSinceRevision(String mapId, Integer revision)
/map/:mapId/updates/:revision
Params mapId = Id of the map (currently mmIdOnServer)
revision = last known revision, to get all updates from there
Form Data ---
Requires
Returns json with attributes:
- currentRevision
- orderedUpdates = List of MapUpdate Objects

Request Lock

Method POST
Action jsRoutes.controllers.MindMap.requestLock(String mapId)
/map/:mapId/node/requestLock
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data nodeId = Id of Node
Requires
Returns Status 200 OK = success
Status 412 Precondition Failed = failure

Release Lock

Method POST
Action jsRoutes.controllers.MindMap.releaseLock(String mapId)
/map/:mapId/node/releaseLock
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data nodeId = Id of Node
Requires
Returns Status 200 OK = success
Status 412 Precondition Failed = failure

Create Node

Method POST
Action jsRoutes.controllers.MindMap.createNode(String mapId)
/map/:mapId/node/create
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data parentNodeId = Id of parent where the new node gets attached to
Requires
Returns A AddNodeUpdate Object

Remove Node

Method DELETE
Action jsRoutes.controllers.MindMap.deleteNode(String mapId)
/map/:mapId/node/delete
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data nodeId = Id of node to delete
Requires
Returns Status 200 OK = success
Status 412 Precondition Failed = failure

Change Node

Method POST
Action jsRoutes.controllers.MindMap.changeNode(String mapId)
/map/:mapId/node/change
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data nodeId = Id of node with changes
optional
  • folded -> boolean
  • isHtml -> boolean
  • attributes -> key1%:%value1%:%key2%:%value2...
  • hGap -> integer
  • shiftY -> integer
  • note -> string
  • icons -> icon1%:%icon2...
  • image -> Not yet implemented
  • link -> string (URI)
  • nodeText -> string
Requires
Returns List of MapUpdate Objects

Move Node

Method POST
Action jsRoutes.controllers.MindMap.moveNode(String mapId)
/map/:mapId/node/move
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data newParentNodeId = Id of the new parent node
nodetoMoveId = Id of node, which is moved
newIndex = new position in child list (0 = top)
Requires
Returns Status 200 OK = success
Status 412 Precondition Failed = failure

Change Edge

Method POST
Action jsRoutes.controllers.MindMap.changeEdge(String mapId)
/map/:mapId/node/changeEdge
Params mapId = Id of the map (currently mmIdOnServer)
Query Params source = Location of the sender (which online view or desktop instance). Importend to filter events send by yourself
Form Data nodeId = Id of node with changes
Optional
  • width -> integer
  • color -> integer
  • style -> String of [EDGESTYLE_BEZIER, EDGESTYLE_HIDDEN, EDGESTYLE_HORIZONTAL, EDGESTYLE_LINEAR, EDGESTYLE_SHARP_BEZIER, EDGESTYLE_SHARP_LINEAR, EDGESTYLE_SUMMARY]
Requires
Returns Status 200 OK = success
Status 412 Precondition Failed = failure

Clone this wiki locally