Tabnine Logo
ContentItem.isContentAvailable
Code IndexAdd Tabnine to your IDE (free)

How to use
isContentAvailable
method
in
org.flowable.content.api.ContentItem

Best Java code snippets using org.flowable.content.api.ContentItem.isContentAvailable (Showing top 3 results out of 315)

origin: org.flowable/flowable-content-rest

if (!contentItem.isContentAvailable()) {
  throw new FlowableException("No data available for content item " + contentItemId);
origin: org.flowable/flowable-ui-task-rest

public void getRawContent(String contentId, HttpServletResponse response) {
  ContentItem contentItem = contentService.createContentItemQuery().id(contentId).singleResult();
  if (contentItem == null) {
    throw new NotFoundException("No content found with id: " + contentId);
  }
  if (!contentItem.isContentAvailable()) {
    throw new NotFoundException("Raw content not yet available for id: " + contentId);
  }
  if (!permissionService.canDownloadContent(SecurityUtils.getCurrentUserObject(), contentItem)) {
    throw new NotPermittedException("You are not allowed to read the content with id: " + contentId);
  }
  // Set correct mine-type
  if (contentItem.getMimeType() != null) {
    response.setContentType(contentItem.getMimeType());
  }
  // Write content response
  try (InputStream inputstream = contentService.getContentItemData(contentId)) {
    IOUtils.copy(inputstream, response.getOutputStream());
  } catch (IOException e) {
    throw new InternalServerErrorException("Error while writing raw content data for content: " + contentId, e);
  }
}
origin: org.flowable/flowable-content-rest

public ContentItemResponse(ContentItem contentItem, String url) {
  setId(contentItem.getId());
  setName(contentItem.getName());
  setMimeType(contentItem.getMimeType());
  setTaskId(contentItem.getTaskId());
  setProcessInstanceId(contentItem.getProcessInstanceId());
  setContentStoreId(contentItem.getContentStoreId());
  setContentStoreName(contentItem.getContentStoreName());
  setContentAvailable(contentItem.isContentAvailable());
  setTenantId(contentItem.getTenantId());
  setCreated(contentItem.getCreated());
  setCreatedBy(contentItem.getCreatedBy());
  setLastModified(contentItem.getLastModified());
  setLastModifiedBy(contentItem.getLastModifiedBy());
  setUrl(url);
}
org.flowable.content.apiContentItemisContentAvailable

Popular methods of ContentItem

  • setProcessInstanceId
  • setTaskId
  • getId
    unique identifier
  • setField
  • setScopeId
  • setScopeType
  • setTenantId
  • getContentStoreId
  • getMimeType
  • getProcessInstanceId
  • getTaskId
  • setContentStoreId
  • getTaskId,
  • setContentStoreId,
  • setContentStoreName,
  • setCreatedBy,
  • setLastModifiedBy,
  • setMimeType,
  • setName,
  • getContentStoreName,
  • getCreated

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Kernel (java.awt.image)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Notification (javax.management)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
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