Tabnine Logo
ContentService.deleteContentItem
Code IndexAdd Tabnine to your IDE (free)

How to use
deleteContentItem
method
in
org.flowable.content.api.ContentService

Best Java code snippets using org.flowable.content.api.ContentService.deleteContentItem (Showing top 2 results out of 315)

origin: org.flowable/flowable-content-rest

  @ApiOperation(value = "Delete a content item", tags = { "Content item" })
  @ApiResponses(value = {
      @ApiResponse(code = 204, message = "Indicates the content item was deleted."),
      @ApiResponse(code = 404, message = "Indicates the content item was not found.")
  })
  @DeleteMapping(value = "/content-service/content-items/{contentItemId}")
  public void deleteContentItem(@ApiParam(name = "contentItemId") @PathVariable String contentItemId, HttpServletResponse response) {
    ContentItem contentItem = getContentItemFromRequest(contentItemId);
    
    if (restApiInterceptor != null) {
      restApiInterceptor.deleteContentItem(contentItem);
    }
    
    contentService.deleteContentItem(contentItemId);
    response.setStatus(HttpStatus.NO_CONTENT.value());
  }
}
origin: org.flowable/flowable-ui-task-rest

public void deleteContent(String contentId, HttpServletResponse response) {
  ContentItem contentItem = contentService.createContentItemQuery().id(contentId).singleResult();
  if (contentItem == null) {
    throw new NotFoundException("No content found with id: " + contentId);
  }
  if (!permissionService.hasWritePermissionOnRelatedContent(SecurityUtils.getCurrentUserObject(), contentItem)) {
    throw new NotPermittedException("You are not allowed to delete the content with id: " + contentId);
  }
  if (contentItem.getField() != null) {
    // Not allowed to delete content that has been added as part of a form
    throw new NotPermittedException("You are not allowed to delete the content with id: " + contentId);
  }
  contentService.deleteContentItem(contentItem.getId());
}
org.flowable.content.apiContentServicedeleteContentItem

Popular methods of ContentService

  • createContentItemQuery
  • saveContentItem
  • getContentItemData
  • newContentItem

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now