Package org.mycore.wcms2.resources
Class MCRWCMSFileBrowserResource
java.lang.Object
org.mycore.wcms2.resources.MCRWCMSFileBrowserResource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
protected static boolean
jakarta.ws.rs.core.Response
deleteFile
(String path) jakarta.ws.rs.core.Response
deleteFolder
(String path) protected void
getallowedPaths
(Element element) protected com.google.gson.JsonObject
jakarta.ws.rs.core.Response
getResources
(String filename) getUpload
(InputStream inputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition header, int funcNum, String href, String type, String basehref) jakarta.ws.rs.core.Response
getUpload
(InputStream inputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition header, String path) protected String
saveFile
(InputStream inputStream, String path) protected String
testIfFileExists
(String path)
-
Constructor Details
-
MCRWCMSFileBrowserResource
public MCRWCMSFileBrowserResource()
-
-
Method Details
-
getFileBrowser
- 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 -
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
- Throws:
IOException
-
testIfFileExists
-
getallowedPaths
-
getFolder
-
delete
-