Interface MCRWCMSNavigationProvider

All Superinterfaces:
MCRWCMSJSONProvider<MCRNavigation,com.google.gson.JsonObject>
All Known Implementing Classes:
MCRWCMSDefaultNavigationProvider

public interface MCRWCMSNavigationProvider extends MCRWCMSJSONProvider<MCRNavigation,com.google.gson.JsonObject>
Connection between the Navigation Datamodel and the WCMS.
Author:
Matthias Eichner
  • Field Details

  • Method Details

    • toJSON

      com.google.gson.JsonObject toJSON(MCRNavigation navigation)

      Converts a Navigation object to a json one. The structure of the json is:

       {
         hierarchy: [
           {"wcmsId":0,"children":[
             {"wcmsId":1,"children":[
               {"wcmsId":2}
             ]}
           ]}
         }
         items: [
           {"wcmsId" : "0", "wcmsType" : "root", "mainTitle" : "My Main Title", "dir" : "/content" ...},
           {"wcmsId" : "1", "wcmsType" : "menu", "id" : "main", "labelMap":{"de":"Hauptmenü","en":"Main menu"} ... }
           {"wcmsId" : "2", "wcmsType" : "item", "type" : "intern", "style" : "bold" ...}
           ...
         ]
       }
       
      Specified by:
      toJSON in interface MCRWCMSJSONProvider<MCRNavigation,com.google.gson.JsonObject>
      Returns:
      the generated json
    • fromJSON

      MCRNavigation fromJSON(com.google.gson.JsonObject jsonNavigation)
      Converts an WCMS JSON Object to an Navigation object. TODO: json data structure
      Specified by:
      fromJSON in interface MCRWCMSJSONProvider<MCRNavigation,com.google.gson.JsonObject>