Class MCRWCMSFileBrowserResource

java.lang.Object
org.mycore.wcms2.resources.MCRWCMSFileBrowserResource

@Path("wcms2/filebrowser") public class MCRWCMSFileBrowserResource extends Object
  • Constructor Details

    • MCRWCMSFileBrowserResource

      public MCRWCMSFileBrowserResource()
  • Method Details

    • getFileBrowser

      @GET public InputStream getFileBrowser() throws Exception
      Throws:
      Exception
    • getResources

      @GET @Path("gui/{filename:.*}") public jakarta.ws.rs.core.Response getResources(@PathParam("filename") String filename)
    • getFolders

      @GET @Path("/folder") public String getFolders() throws IOException, ParserConfigurationException, SAXException
      Throws:
      IOException
      ParserConfigurationException
      SAXException
    • addFolder

      @POST @Path("/folder") public jakarta.ws.rs.core.Response addFolder(@QueryParam("path") String path) throws IOException
      Throws:
      IOException
    • deleteFolder

      @DELETE @Path("/folder") public jakarta.ws.rs.core.Response deleteFolder(@QueryParam("path") String path) throws IOException
      Throws:
      IOException
    • getFiles

      @GET @Path("/files") public String getFiles(@QueryParam("path") String path, @QueryParam("type") String type) throws IOException
      Throws:
      IOException
    • getUpload

      @POST @Consumes("multipart/form-data") public jakarta.ws.rs.core.Response getUpload(InputStream inputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition header, String path)
    • deleteFile

      @DELETE public jakarta.ws.rs.core.Response deleteFile(@QueryParam("path") String path) throws IOException
      Throws:
      IOException
    • getUpload

      @POST @Path("/upload") @Consumes("multipart/form-data") public String getUpload(InputStream inputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition header, @QueryParam("CKEditorFuncNum") int funcNum, @QueryParam("href") String href, @QueryParam("type") String type, @QueryParam("basehref") String basehref)
    • saveFile

      protected String saveFile(InputStream inputStream, String path) throws IOException
      Throws:
      IOException
    • testIfFileExists

      protected String testIfFileExists(String path)
    • getallowedPaths

      protected void getallowedPaths(Element element)
    • getFolder

      protected com.google.gson.JsonObject getFolder(File node, boolean folderallowed)
    • delete

      protected static boolean delete(File file)