java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.utils.ResourceUtils

public class ResourceUtils extends Object
  • Constructor Details

    • ResourceUtils

      public ResourceUtils()
  • Method Details

    • readJSONFromFile

      public static org.json.JSONObject readJSONFromFile(Path path, Class clazz) throws IOException
      Class argument needed for getResourceAsStream() method (this.getClass() cannot be used from static context)
      Parameters:
      path -
      clazz -
      Returns:
      Throws:
      IOException
    • readJSONFromFile

      public static org.json.JSONObject readJSONFromFile(String path, Class clazz) throws IOException
      Throws:
      IOException
    • readJSONsFromResources

      public static org.json.JSONObject[] readJSONsFromResources(org.springframework.core.io.Resource[] resources) throws IOException
      Throws:
      IOException
    • readJSONFromResource

      public static org.json.JSONObject readJSONFromResource(org.springframework.core.io.Resource resource) throws IOException
      Throws:
      IOException