Package step.plugins.organizer
Class OrganizerServices
- java.lang.Object
-
- step.framework.server.AbstractServices<step.core.access.User>
-
- step.core.deployment.AbstractStepServices
-
- step.plugins.organizer.OrganizerServices
-
@Singleton @Path("/organizer") public class OrganizerServices extends step.core.deployment.AbstractStepServices
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OrganizerServices.DirEntry
-
Constructor Summary
Constructors Constructor Description OrganizerServices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll()
void
addFile(OrganizerServices.DirEntry entry)
void
addFolder(String path, String name)
void
commit()
void
copyFile(String path, String to)
void
deleteFile(String path)
void
deleteFolder(String path)
protected File
getFileAndAssertItExists(String path)
String
getFileContent(String path)
void
init()
List<OrganizerServices.DirEntry>
list(String path, String query, String type)
void
reset()
void
saveFile(OrganizerServices.DirEntry entry)
void
saveFileContent(String path, String content)
-
Methods inherited from class step.core.deployment.AbstractStepServices
getContext, getExecutionRunnable, getObjectEnricher, getObjectFilter, getScheduler
-
-
-
-
Method Detail
-
init
@PostConstruct public void init() throws Exception
- Overrides:
init
in classstep.core.deployment.AbstractStepServices
- Throws:
Exception
-
list
@GET @Path("/browse") public List<OrganizerServices.DirEntry> list(@QueryParam("path") String path, @QueryParam("query") String query, @QueryParam("type") String type) throws Exception
- Throws:
Exception
-
getFileContent
@GET @Produces("text/plain") @Path("/file") public String getFileContent(@QueryParam("path") String path) throws Exception
- Throws:
Exception
-
saveFileContent
@POST @Path("/file/content") public void saveFileContent(@QueryParam("path") String path, String content) throws Exception
- Throws:
Exception
-
getFileAndAssertItExists
protected File getFileAndAssertItExists(String path) throws Exception
- Throws:
Exception
-
deleteFile
@DELETE @Path("/file") public void deleteFile(@QueryParam("path") String path) throws Exception
- Throws:
Exception
-
copyFile
@POST @Path("/file/copy") public void copyFile(@QueryParam("path") String path, @QueryParam("to") String to) throws Exception
- Throws:
Exception
-
addFolder
@POST @Path("/folder") public void addFolder(@QueryParam("path") String path, @QueryParam("name") String name) throws Exception
- Throws:
Exception
-
deleteFolder
@DELETE @Path("/folder") public void deleteFolder(@QueryParam("path") String path) throws Exception
- Throws:
Exception
-
addFile
@PUT @Path("/file") public void addFile(OrganizerServices.DirEntry entry) throws Exception
- Throws:
Exception
-
saveFile
@POST @Path("/file") public void saveFile(OrganizerServices.DirEntry entry) throws Exception
- Throws:
Exception
-
-