Codota Logo
ContentService.deleteContentItem
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
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

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • getContentResolver (Context)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now