Codota Logo
ContentItem.setMimeType
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: org.flowable/flowable-content-rest

contentItem.setMimeType(paramMap.get(parameterName)[0]);
origin: org.flowable/flowable-ui-task-rest

protected ContentItemRepresentation uploadFile(User user, MultipartFile file, String taskId, String processInstanceId, String caseId) {
  if (file != null && file.getName() != null) {
    try {
      String contentType = file.getContentType();
      // temp additional content type check for IE9 flash uploads
      if (StringUtils.equals(file.getContentType(), "application/octet-stream")) {
        contentType = getContentTypeForFileExtension(file);
      }
      ContentItem contentItem = contentService.newContentItem();
      contentItem.setName(getFileName(file));
      contentItem.setProcessInstanceId(processInstanceId);
      contentItem.setTaskId(taskId);
      if (StringUtils.isNotEmpty(caseId)) {
        contentItem.setScopeType("cmmn");
        contentItem.setScopeId(caseId);
      }
      contentItem.setMimeType(contentType);
      contentItem.setCreatedBy(user.getId());
      contentItem.setLastModifiedBy(user.getId());
      contentService.saveContentItem(contentItem, file.getInputStream());
      return createContentItemResponse(contentItem);
    } catch (IOException e) {
      throw new BadRequestException("Error while reading file data", e);
    }
  } else {
    throw new BadRequestException("File to upload is missing");
  }
}
origin: org.flowable/flowable-content-rest

contentItem.setMimeType(request.getMimeType());
origin: org.flowable/flowable-ui-task-rest

protected ContentItemRepresentation addContentItem(ContentItemRepresentation contentItemBody, String taskId, String processInstanceId, boolean isRelatedContent) {
  if (contentItemBody.getContentStoreId() == null || contentItemBody.getContentStoreName() == null || contentItemBody.getName() == null) {
    throw new BadRequestException("Name, source and sourceId are required parameters");
  }
  User user = SecurityUtils.getCurrentUserObject();
  ContentItem contentItem = contentService.newContentItem();
  contentItem.setName(contentItemBody.getName());
  contentItem.setProcessInstanceId(processInstanceId);
  contentItem.setTaskId(taskId);
  contentItem.setContentStoreId(contentItemBody.getContentStoreId());
  contentItem.setContentStoreName(contentItemBody.getContentStoreName());
  contentItem.setMimeType(contentItemBody.getMimeType());
  contentItem.setCreatedBy(user.getId());
  contentItem.setLastModifiedBy(user.getId());
  contentService.saveContentItem(contentItem);
  return createContentItemResponse(contentItem);
}
origin: org.flowable/flowable-content-rest

protected ContentItemResponse createSimpleContentItem(ContentItemRequest contentItemRequest) {
  if (contentItemRequest.getName() == null) {
    throw new FlowableIllegalArgumentException("Content item name is required.");
  }
  ContentItem contentItem = contentService.newContentItem();
  contentItem.setName(contentItemRequest.getName());
  contentItem.setMimeType(contentItemRequest.getMimeType());
  contentItem.setTaskId(contentItemRequest.getTaskId());
  contentItem.setProcessInstanceId(contentItemRequest.getProcessInstanceId());
  contentItem.setContentStoreId(contentItemRequest.getContentStoreId());
  contentItem.setContentStoreName(contentItemRequest.getContentStoreName());
  contentItem.setField(contentItemRequest.getField());
  contentItem.setCreatedBy(contentItemRequest.getCreatedBy());
  contentItem.setLastModifiedBy(contentItemRequest.getLastModifiedBy());
  contentItem.setTenantId(contentItemRequest.getTenantId());
  
  if (restApiInterceptor != null) {
    restApiInterceptor.createNewContentItem(contentItem);
  }
  
  contentService.saveContentItem(contentItem);
  return contentRestResponseFactory.createContentItemResponse(contentItem);
}
org.flowable.content.apiContentItemsetMimeType

Popular methods of ContentItem

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • findViewById (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Reference (javax.naming)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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