use of javax.ws.rs.DELETE in project quickstart by wildfly.
the class ProductResourceRESTService method deleteAllProducts.
@DELETE
public Response deleteAllProducts() {
DeleteTask dt = deleteTaskInstance.get();
// Delete all Products on a separated Thread
log.info("Will delete all Products on other Thread");
managedExecutorService.execute(dt);
log.info("Returning response");
return Response.ok().build();
}
use of javax.ws.rs.DELETE in project kylo by Teradata.
the class DebugController method deleteJcrTree.
/**
* Delete the JCR tree specified by the absolute path following ".../jcr/".
*
* @param abspath the path with JCR to delete
* @return a confirmation message that the path was deleted
*/
@DELETE
@Path("jcr/{abspath: .*}")
@Produces(MediaType.TEXT_PLAIN)
public String deleteJcrTree(@PathParam("abspath") final String abspath) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
try {
metadata.commit(() -> {
this.accessController.checkPermission(AccessController.SERVICES, MetadataAccessControl.ADMIN_METADATA);
Session session = JcrMetadataAccess.getActiveSession();
session.removeItem("/" + abspath);
pw.print("DELETED " + abspath);
});
} catch (Exception e) {
e.printStackTrace(pw);
throw new RuntimeException(e);
}
pw.flush();
return sw.toString();
}
use of javax.ws.rs.DELETE in project fabric8 by jboss-fuse.
the class ContainerResource method stop.
/**
* Stops the container
*/
@DELETE
@Path("start")
public void stop() {
FabricService fabricService = getFabricService();
Objects.notNull(fabricService, "fabricService");
fabricService.stopContainer(container);
}
use of javax.ws.rs.DELETE in project fabric8 by jboss-fuse.
the class ContainerResource method delete.
/**
* Deletes this container
*/
@DELETE
public void delete() {
FabricService fabricService = getFabricService();
Objects.notNull(fabricService, "fabricService");
fabricService.destroyContainer(container);
}
use of javax.ws.rs.DELETE in project fabric8 by jboss-fuse.
the class ProfileResource method deleteProfile.
@DELETE
public void deleteProfile() {
FabricService fabricService = getFabricService();
Objects.notNull(fabricService, "fabricService");
ProfileService profileService = getProfileService();
Objects.notNull(profileService, "profileService");
profileService.deleteProfile(fabricService, profile.getVersion(), profile.getId(), true);
}
Aggregations