Class SavedObjectService

java.lang.Object
fr.paris.lutece.plugins.kibana.service.SavedObjectService

public class SavedObjectService extends Object
  • Method Details

    • getDashboard

      public static net.sf.json.JSONObject getDashboard(String strIdDashboard)
      Get dashboard
      Parameters:
      strIdIndexPattern - The index pattern id
    • initEnvironnement

      public static void initEnvironnement()
    • createIndexPattern

      public static void createIndexPattern(String strIdIndexPattern)
      create kibana index pattern
      Parameters:
      strIdIndexPattern - The index pattern id
    • isExistSpace

      public static boolean isExistSpace(String strSpaceId)
      Is space exist
      Parameters:
      strSpaceId - The index pattern id
    • createSpace

      public static void createSpace(String strSpaceId)
      create space index pattern
      Parameters:
      strSpaceId - The index pattern id
    • createReadOnlyUser

      public static void createReadOnlyUser(String strLogin, String strPassword, List<String> listTargetIndexName)
      create read only user
      Parameters:
      strSpaceId - The index pattern id
    • doRefreshKibanaIndexPattern

      public static void doRefreshKibanaIndexPattern(String strIdIndexPattern)
      Refresh kibana index pattern
      Parameters:
      strIdIndexPattern - The index pattern id
    • create

      public static void create(net.sf.json.JSONObject object)
      create a kibana object
      Parameters:
      object - The json object
    • createFromString

      public static void createFromString(String strObject)
      create a kibana object from string
      Parameters:
      strObject - The string object
    • deleteDashboard

      public static void deleteDashboard(String strIdDashboard)
      delete a dashboard
      Parameters:
      strIdDashboard - The dashboard id
    • createDashboard

      public static void createDashboard(String strIdDashboard, String strTitleDashboard, String strIdIndexPattern, net.sf.json.JSONArray jsonArrayReference, net.sf.json.JSONArray jsonArraypanelsJSON, fr.paris.lutece.plugins.elasticdata.business.DataSource dataSource)
      Create a dashboard
      Parameters:
      strIdDashboard - the id of dashboard
      strTitleDashboard - the title of dashboard
      strIdIndexPattern - the index pattern id
      jsonArrayReference - the reference array
      jsonArraypanelsJSON - the panels array
    • createPanelJson

      public static net.sf.json.JSONObject createPanelJson(String panelId, Gird gird)
      Create a dashboard visualization panel object
      Parameters:
      strIdVisualisation - The visualization id
      gird - The gird of the visualization
      Returns:
      PanelJSON object
    • getParentList

      public static fr.paris.lutece.util.ReferenceList getParentList(String strIndexId)
      Get parent list of elk documents
      Parameters:
      strIndexId - The index id
      Returns:
      a reference list of parents
    • getFieldDistinctValues

      public static List<String> getFieldDistinctValues(String strIndexId, String strFieldName, int nMaxSize)
      Get distinct values of a field
      Parameters:
      strIndexId - The index id
      strFieldName - the field name
      nMaxSize - the max size
      Returns:
      a list of values
    • removeUnusedBackSlash

      public static String removeUnusedBackSlash(String jsString)
      Remove backslash
      Parameters:
      jsString - string to clean
      Returns:
      string without multiple backslash
    • escape

      public static String escape(String jsString)
      escape json string
      Parameters:
      jsString - string to escape
      Returns:
      string escaped
    • doPostSavedObject

      public static final void doPostSavedObject(List<net.sf.json.JSONObject> savedObjectList)
      Post a saved object
      Parameters:
      savedObject - Object to save