Tabnine Logo
Model.setVersion
Code IndexAdd Tabnine to your IDE (free)

How to use
setVersion
method
in
org.activiti.engine.repository.Model

Best Java code snippets using org.activiti.engine.repository.Model.setVersion (Showing top 3 results out of 315)

origin: zhijund/jund-workflow

public static Model getModelVariables(ObjectNode nodesVariables, Model model) throws Exception {
  if (StringUtils.isEmpty(nodesVariables) || StringUtils.isEmpty(nodesVariables.get(TAG_EX_MODEL))) {
    throw new Exception("");
  }
  JsonNode modelNode = nodesVariables.get(TAG_EX_MODEL);
  model.setName(NodeVariableUtil.hasVariableEmpty(modelNode.get(ModelDataJsonConstants.MODEL_NAME)));
  model.setMetaInfo(NodeVariableUtil.hasVariableEmpty(modelNode.get(TAG_EX_METAINFO)));
  model.setTenantId("userId");
  model.setVersion(Constants.DEFAULT_VERSION);
  if (!StringUtils.isEmpty(modelNode.get(ModelDataJsonConstants.MODEL_REVISION))) {
    model.setVersion(Integer.parseInt(modelNode.get(ModelDataJsonConstants.MODEL_REVISION).textValue()));
  }
  return model;
}
origin: org.activiti/activiti-rest

 @ApiOperation(value = "Create a model", tags = {"Models"}, notes = "All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only setting the name of the model, leaving all other fields null.")
 @ApiResponses(value = {
   @ApiResponse(code = 200, message = "Indicates the model was created.")
 })
 @RequestMapping(value = "/repository/models", method = RequestMethod.POST, produces = "application/json")
 public ModelResponse createModel(@RequestBody ModelRequest modelRequest, HttpServletRequest request, HttpServletResponse response) {
  Model model = repositoryService.newModel();
  model.setCategory(modelRequest.getCategory());
  model.setDeploymentId(modelRequest.getDeploymentId());
  model.setKey(modelRequest.getKey());
  model.setMetaInfo(modelRequest.getMetaInfo());
  model.setName(modelRequest.getName());
  model.setVersion(modelRequest.getVersion());
  model.setTenantId(modelRequest.getTenantId());

  repositoryService.saveModel(model);
  response.setStatus(HttpStatus.CREATED.value());
  return restResponseFactory.createModelResponse(model);
 }
}
origin: org.activiti/activiti-rest

model.setVersion(modelRequest.getVersion());
org.activiti.engine.repositoryModelsetVersion

Popular methods of Model

  • setMetaInfo
  • setName
  • getId
  • getName
  • setKey
  • getMetaInfo
  • getCategory
  • setDeploymentId
  • getKey
  • setCategory
  • getTenantId
  • getVersion
  • getTenantId,
  • getVersion,
  • setTenantId,
  • getCreateTime,
  • getDeploymentId,
  • getLastUpdateTime,
  • hasEditorSource,
  • hasEditorSourceExtra

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JFrame (javax.swing)
  • JPanel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim 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