Interface JsonData

All Known Subinterfaces:
ReadWriteJsonData
All Known Implementing Classes:
JsonDataAdapter, ObjectSelectProvider

public interface JsonData
Enables data to be loaded via JsonLoader. Models have to implement this interface, it's recommended to implement JsonDataAdapter instead.
  • Method Details

    • init

      void init(HttpServletRequest req, String params, String id, NavigationTreeNode config) throws Exception
      called once when initalizing the model
      Parameters:
      req - the current servlet-request
      params - the trailing part of the REST-URL
      id - the id when using single-object-requests
      config - configuration node holding more information
      Throws:
      Exception
    • getData

      List<Map<String,Object>> getData() throws Exception
      Two cases: id is known, return the object with this id, else return all objects.
      Returns:
      all available data
      Throws:
      Exception