Package org.opennms.web.rest.v1
Class FilesystemRestService
- java.lang.Object
-
- org.opennms.web.rest.v1.FilesystemRestService
-
@Component @Path("filesystem") public class FilesystemRestService extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FilesystemRestService.CapturingErrorHandler
-
Constructor Summary
Constructors Constructor Description FilesystemRestService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
deleteFile(String fileName, javax.ws.rs.core.SecurityContext securityContext)
boolean
doesFileExistAndMatchContentsWithEtcPristine(String file)
static javax.ws.rs.core.Response
fileContents(Path path)
javax.ws.rs.core.Response
getFileContents(String fileName, javax.ws.rs.core.SecurityContext securityContext)
InputStream
getFileHelp(String fileName, javax.ws.rs.core.SecurityContext securityContext)
List<String>
getFiles(boolean changedFilesOnly, javax.ws.rs.core.SecurityContext securityContext)
List<String>
getSupportedExtensions(javax.ws.rs.core.SecurityContext securityContext)
String
uploadFile(String fileName, org.apache.cxf.jaxrs.ext.multipart.Attachment attachment, javax.ws.rs.core.SecurityContext securityContext)
-
-
-
Method Detail
-
getFiles
@GET @Path("/") @Produces("application/json") public List<String> getFiles(@QueryParam("changedFilesOnly") boolean changedFilesOnly, @Context javax.ws.rs.core.SecurityContext securityContext)
-
doesFileExistAndMatchContentsWithEtcPristine
public boolean doesFileExistAndMatchContentsWithEtcPristine(String file)
-
getFileHelp
@GET @Path("/help") @Produces("text/markdown") public InputStream getFileHelp(@QueryParam("f") String fileName, @Context javax.ws.rs.core.SecurityContext securityContext)
-
getSupportedExtensions
@GET @Path("/extensions") @Produces("application/json") public List<String> getSupportedExtensions(@Context javax.ws.rs.core.SecurityContext securityContext)
-
getFileContents
@GET @Path("/contents") public javax.ws.rs.core.Response getFileContents(@QueryParam("f") String fileName, @Context javax.ws.rs.core.SecurityContext securityContext)
-
uploadFile
@POST @Path("/contents") @Produces("text/html") @Consumes("multipart/form-data") public String uploadFile(@QueryParam("f") String fileName, org.apache.cxf.jaxrs.ext.multipart.Attachment attachment, @Context javax.ws.rs.core.SecurityContext securityContext) throws IOException
- Throws:
IOException
-
deleteFile
@DELETE @Path("/contents") @Produces("text/html") public String deleteFile(@QueryParam("f") String fileName, @Context javax.ws.rs.core.SecurityContext securityContext) throws IOException
- Throws:
IOException
-
fileContents
public static javax.ws.rs.core.Response fileContents(Path path)
-
-