Codota Logo
DecisionDefinitionEntity
Code IndexAdd Codota to your IDE (free)

How to use
DecisionDefinitionEntity
in
org.camunda.bpm.engine.impl.dmn.entity.repository

Best Java code snippets using org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionDefinitionEntity (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: camunda/camunda-bpm-platform

public DecisionDefinitionEntity getPreviousDefinition() {
 DecisionDefinitionEntity previousDecisionDefinition = null;
 String previousDecisionDefinitionId = getPreviousDecisionDefinitionId();
 if (previousDecisionDefinitionId != null) {
  previousDecisionDefinition = loadDecisionDefinition(previousDecisionDefinitionId);
  if (previousDecisionDefinition == null) {
   resetPreviousDecisionDefinitionId();
   previousDecisionDefinitionId = getPreviousDecisionDefinitionId();
   if (previousDecisionDefinitionId != null) {
    previousDecisionDefinition = loadDecisionDefinition(previousDecisionDefinitionId);
   }
  }
 }
 return previousDecisionDefinition;
}
origin: camunda/camunda-bpm-platform

public void checkReadDecisionDefinition(DecisionDefinitionEntity decisionDefinition) {
 if (decisionDefinition != null && !getTenantManager().isAuthenticatedTenant(decisionDefinition.getTenantId())) {
  throw LOG.exceptionCommandWithUnauthorizedTenant("get the decision definition '"+ decisionDefinition.getId() + "'");
 }
}
origin: camunda/camunda-bpm-platform

@Override
protected DmnDecisionImpl createDmnElement() {
 return new DecisionDefinitionEntity();
}
origin: camunda/camunda-bpm-platform

@Override
protected DmnDecisionImpl createFromDecision(DmnElementTransformContext context, Decision decision) {
 DecisionDefinitionEntity decisionDefinition = (DecisionDefinitionEntity) super.createFromDecision(context, decision);
 String category = context.getModelInstance().getDefinitions().getNamespace();
 decisionDefinition.setCategory(category);
 decisionDefinition.setHistoryTimeToLive(ParseUtil.parseHistoryTimeToLive(decision.getCamundaHistoryTimeToLiveString()));
 decisionDefinition.setVersionTag(decision.getVersionTag());
 return decisionDefinition;
}
origin: camunda/camunda-bpm-platform

@Override
protected List<DecisionDefinitionEntity> transformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Properties properties) {
 List<DecisionDefinitionEntity> decisions = new ArrayList<DecisionDefinitionEntity>();
 // get the decisions from the deployed drd instead of parse the DMN again
 DecisionRequirementsDefinitionEntity deployedDrd = findDeployedDrdForResource(deployment, resource.getName());
 if (deployedDrd == null) {
  throw LOG.exceptionNoDrdForResource(resource.getName());
 }
 Collection<DmnDecision> decisionsOfDrd = deployedDrd.getDecisions();
 for (DmnDecision decisionOfDrd : decisionsOfDrd) {
  DecisionDefinitionEntity decisionEntity = (DecisionDefinitionEntity) decisionOfDrd;
  if (DecisionRequirementsDefinitionDeployer.isDecisionRequirementsDefinitionPersistable(deployedDrd)) {
   decisionEntity.setDecisionRequirementsDefinitionId(deployedDrd.getId());
   decisionEntity.setDecisionRequirementsDefinitionKey(deployedDrd.getKey());
  }
  decisions.add(decisionEntity);
 }
 if (!DecisionRequirementsDefinitionDeployer.isDecisionRequirementsDefinitionPersistable(deployedDrd)) {
  deployment.removeArtifact(deployedDrd);
 }
 return decisions;
}
origin: camunda/camunda-bpm-platform

public void checkUpdateDecisionDefinition(DecisionDefinitionEntity decisionDefinition) {
 getAuthorizationManager().checkAuthorization(UPDATE, DECISION_DEFINITION, decisionDefinition.getKey());
}
origin: camunda/camunda-bpm-platform

@Test
public void getPreviousDecisionDefinitionWithTenantId() {
 testRule.deployForTenant(TENANT_ONE, DMN);
 testRule.deployForTenant(TENANT_ONE, DMN);
 testRule.deployForTenant(TENANT_ONE, DMN);
 testRule.deployForTenant(TENANT_TWO, DMN);
 testRule.deployForTenant(TENANT_TWO, DMN);
 List<DecisionDefinition> latestDefinitions = repositoryService.createDecisionDefinitionQuery()
  .latestVersion()
  .orderByTenantId()
  .asc()
  .list();
 DecisionDefinitionEntity previousDefinitionTenantOne = getPreviousDefinition((DecisionDefinitionEntity) latestDefinitions.get(0));
 DecisionDefinitionEntity previousDefinitionTenantTwo = getPreviousDefinition((DecisionDefinitionEntity) latestDefinitions.get(1));
 assertThat(previousDefinitionTenantOne.getVersion(), is(2));
 assertThat(previousDefinitionTenantOne.getTenantId(), is(TENANT_ONE));
 assertThat(previousDefinitionTenantTwo.getVersion(), is(1));
 assertThat(previousDefinitionTenantTwo.getTenantId(), is(TENANT_TWO));
}
origin: camunda/camunda-bpm-platform

@Override
public void checkUpdateDecisionDefinitionById(String decisionDefinitionId) {
 if (getTenantManager().isTenantCheckEnabled()) {
  DecisionDefinitionEntity decisionDefinition = findLatestDecisionDefinitionById(decisionDefinitionId);
  if (decisionDefinition != null && !getTenantManager().isAuthenticatedTenant(decisionDefinition.getTenantId())) {
   throw LOG.exceptionCommandWithUnauthorizedTenant("update the decision definition '"+ decisionDefinitionId + "'");
  }
 }
}
origin: camunda/camunda-bpm-platform

public String getPreviousDecisionDefinitionId() {
 ensurePreviousDecisionDefinitionIdInitialized();
 return previousDecisionDefinitionId;
}
origin: OrienteerBAP/Orienteer

@Statement
public String selectPreviousDecisionDefinitionId(OPersistenceSession session, ListQueryParameterObject parameter) {
  Map<String, String> params = (Map<String, String>) parameter.getParameter();
  String key = params.get("key");
  String tenantId = params.get("tenantId");
  String version = params.get("version");
  String query = "select distinct RES.* from " + getSchemaClass() + " where RES.key = " + key;
  query += tenantId != null ? " and tenantId = " + tenantId : " and tenantId is null";
  query += " and RES.version = (select max(version) from " + getSchemaClass() + " where key = " + key;
  query += tenantId != null ? " and tenantId = " + tenantId : " and tenantId is null";
  query += " and version < " + version + ")";
  return querySingle(session, query).getPreviousDecisionDefinitionId();
}
origin: camunda/camunda-bpm-platform

@Override
protected DmnDecisionImpl createFromDecision(DmnElementTransformContext context, Decision decision) {
 DecisionDefinitionEntity decisionDefinition = (DecisionDefinitionEntity) super.createFromDecision(context, decision);
 String category = context.getModelInstance().getDefinitions().getNamespace();
 decisionDefinition.setCategory(category);
 decisionDefinition.setHistoryTimeToLive(ParseUtil.parseHistoryTimeToLive(decision.getCamundaHistoryTimeToLiveString()));
 decisionDefinition.setVersionTag(decision.getVersionTag());
 return decisionDefinition;
}
origin: camunda/camunda-bpm-platform

@Override
protected List<DecisionDefinitionEntity> transformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Properties properties) {
 List<DecisionDefinitionEntity> decisions = new ArrayList<DecisionDefinitionEntity>();
 // get the decisions from the deployed drd instead of parse the DMN again
 DecisionRequirementsDefinitionEntity deployedDrd = findDeployedDrdForResource(deployment, resource.getName());
 if (deployedDrd == null) {
  throw LOG.exceptionNoDrdForResource(resource.getName());
 }
 Collection<DmnDecision> decisionsOfDrd = deployedDrd.getDecisions();
 for (DmnDecision decisionOfDrd : decisionsOfDrd) {
  DecisionDefinitionEntity decisionEntity = (DecisionDefinitionEntity) decisionOfDrd;
  if (DecisionRequirementsDefinitionDeployer.isDecisionRequirementsDefinitionPersistable(deployedDrd)) {
   decisionEntity.setDecisionRequirementsDefinitionId(deployedDrd.getId());
   decisionEntity.setDecisionRequirementsDefinitionKey(deployedDrd.getKey());
  }
  decisions.add(decisionEntity);
 }
 if (!DecisionRequirementsDefinitionDeployer.isDecisionRequirementsDefinitionPersistable(deployedDrd)) {
  deployment.removeArtifact(deployedDrd);
 }
 return decisions;
}
origin: camunda/camunda-bpm-platform

public void checkReadDecisionDefinition(DecisionDefinitionEntity decisionDefinition) {
 getAuthorizationManager().checkAuthorization(READ, DECISION_DEFINITION, decisionDefinition.getKey());
}
origin: org.camunda.bpm/camunda-engine

@Test
public void getPreviousDecisionDefinitionWithTenantId() {
 testRule.deployForTenant(TENANT_ONE, DMN);
 testRule.deployForTenant(TENANT_ONE, DMN);
 testRule.deployForTenant(TENANT_ONE, DMN);
 testRule.deployForTenant(TENANT_TWO, DMN);
 testRule.deployForTenant(TENANT_TWO, DMN);
 List<DecisionDefinition> latestDefinitions = repositoryService.createDecisionDefinitionQuery()
  .latestVersion()
  .orderByTenantId()
  .asc()
  .list();
 DecisionDefinitionEntity previousDefinitionTenantOne = getPreviousDefinition((DecisionDefinitionEntity) latestDefinitions.get(0));
 DecisionDefinitionEntity previousDefinitionTenantTwo = getPreviousDefinition((DecisionDefinitionEntity) latestDefinitions.get(1));
 assertThat(previousDefinitionTenantOne.getVersion(), is(2));
 assertThat(previousDefinitionTenantOne.getTenantId(), is(TENANT_ONE));
 assertThat(previousDefinitionTenantTwo.getVersion(), is(1));
 assertThat(previousDefinitionTenantTwo.getTenantId(), is(TENANT_TWO));
}
origin: camunda/camunda-bpm-platform

@Override
public void checkUpdateDecisionDefinitionById(String decisionDefinitionId) {
 if (getTenantManager().isTenantCheckEnabled()) {
  DecisionDefinitionEntity decisionDefinition = findLatestDecisionDefinitionById(decisionDefinitionId);
  if (decisionDefinition != null && !getTenantManager().isAuthenticatedTenant(decisionDefinition.getTenantId())) {
   throw LOG.exceptionCommandWithUnauthorizedTenant("update the decision definition '"+ decisionDefinitionId + "'");
  }
 }
}
origin: camunda/camunda-bpm-platform

public String getPreviousDecisionDefinitionId() {
 ensurePreviousDecisionDefinitionIdInitialized();
 return previousDecisionDefinitionId;
}
origin: camunda/camunda-bpm-platform

public DecisionDefinitionEntity getPreviousDefinition() {
 DecisionDefinitionEntity previousDecisionDefinition = null;
 String previousDecisionDefinitionId = getPreviousDecisionDefinitionId();
 if (previousDecisionDefinitionId != null) {
  previousDecisionDefinition = loadDecisionDefinition(previousDecisionDefinitionId);
  if (previousDecisionDefinition == null) {
   resetPreviousDecisionDefinitionId();
   previousDecisionDefinitionId = getPreviousDecisionDefinitionId();
   if (previousDecisionDefinitionId != null) {
    previousDecisionDefinition = loadDecisionDefinition(previousDecisionDefinitionId);
   }
  }
 }
 return previousDecisionDefinition;
}
origin: org.camunda.bpm/camunda-engine

@Override
protected DmnDecisionImpl createFromDecision(DmnElementTransformContext context, Decision decision) {
 DecisionDefinitionEntity decisionDefinition = (DecisionDefinitionEntity) super.createFromDecision(context, decision);
 String category = context.getModelInstance().getDefinitions().getNamespace();
 decisionDefinition.setCategory(category);
 decisionDefinition.setHistoryTimeToLive(ParseUtil.parseHistoryTimeToLive(decision.getCamundaHistoryTimeToLiveString()));
 decisionDefinition.setVersionTag(decision.getVersionTag());
 return decisionDefinition;
}
origin: camunda/camunda-bpm-platform

public void checkReadDecisionDefinition(DecisionDefinitionEntity decisionDefinition) {
 if (decisionDefinition != null && !getTenantManager().isAuthenticatedTenant(decisionDefinition.getTenantId())) {
  throw LOG.exceptionCommandWithUnauthorizedTenant("get the decision definition '"+ decisionDefinition.getId() + "'");
 }
}
origin: org.camunda.bpm/camunda-engine

@Override
protected List<DecisionDefinitionEntity> transformDefinitions(DeploymentEntity deployment, ResourceEntity resource, Properties properties) {
 List<DecisionDefinitionEntity> decisions = new ArrayList<DecisionDefinitionEntity>();
 // get the decisions from the deployed drd instead of parse the DMN again
 DecisionRequirementsDefinitionEntity deployedDrd = findDeployedDrdForResource(deployment, resource.getName());
 if (deployedDrd == null) {
  throw LOG.exceptionNoDrdForResource(resource.getName());
 }
 Collection<DmnDecision> decisionsOfDrd = deployedDrd.getDecisions();
 for (DmnDecision decisionOfDrd : decisionsOfDrd) {
  DecisionDefinitionEntity decisionEntity = (DecisionDefinitionEntity) decisionOfDrd;
  if (DecisionRequirementsDefinitionDeployer.isDecisionRequirementsDefinitionPersistable(deployedDrd)) {
   decisionEntity.setDecisionRequirementsDefinitionId(deployedDrd.getId());
   decisionEntity.setDecisionRequirementsDefinitionKey(deployedDrd.getKey());
  }
  decisions.add(decisionEntity);
 }
 if (!DecisionRequirementsDefinitionDeployer.isDecisionRequirementsDefinitionPersistable(deployedDrd)) {
  deployment.removeArtifact(deployedDrd);
 }
 return decisions;
}
org.camunda.bpm.engine.impl.dmn.entity.repositoryDecisionDefinitionEntity

Most used methods

  • getPreviousDecisionDefinitionId
  • getTenantId
  • <init>
  • ensurePreviousDecisionDefinitionIdInitialized
  • getId
  • getKey
  • loadDecisionDefinition
    Returns the cached version if exists; does not update the entity from the database in that case
  • resetPreviousDecisionDefinitionId
  • setCategory
  • setDecisionRequirementsDefinitionId
  • setDecisionRequirementsDefinitionKey
  • setHistoryTimeToLive
  • setDecisionRequirementsDefinitionKey,
  • setHistoryTimeToLive,
  • setVersionTag,
  • getVersion

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • startActivity (Activity)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • 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