protected void ensureVariableShouldNotBeRemoved(String variableName) { if ((variableDeletions != null && variableDeletions.contains(variableName)) || (variableLocalDeletions != null && variableLocalDeletions.contains(variableName))) { throw new NotValidException("Cannot set and remove a variable with the same variable name: '"+variableName+"' within a command."); } }
@Override public void checkQueryOk() { super.checkQueryOk(); // latest() makes only sense when used with key() or keyLike() if (latest && ( (id != null) || (name != null) || (nameLike != null) || (version != null) || (deploymentId != null) ) ){ throw new NotValidException("Calling latest() can only be used in combination with key(String) and keyLike(String)"); } }
@Override public void checkQueryOk() { super.checkQueryOk(); // latest() makes only sense when used with key() or keyLike() if (latest && ( (id != null) || (name != null) || (nameLike != null) || (version != null) || (deploymentId != null) ) ){ throw new NotValidException("Calling latest() can only be used in combination with key(String) and keyLike(String)"); } }
@Override public void checkQueryOk() { super.checkQueryOk(); // latest() makes only sense when used with key() or keyLike() if (latest && ( (id != null) || (name != null) || (nameLike != null) || (version != null) || (deploymentId != null) ) ){ throw new NotValidException("Calling latest() can only be used in combination with key(String) and keyLike(String)"); } }
public DeploymentBuilder name(String name) { if (nameFromDeployment != null && !nameFromDeployment.isEmpty()) { String message = String.format("Cannot set the deployment name to '%s', because the property 'nameForDeployment' has been already set to '%s'.", name, nameFromDeployment); throw new NotValidException(message); } deployment.setName(name); return this; }
public DeploymentBuilder nameFromDeployment(String deploymentId) { String name = deployment.getName(); if (name != null && !name.isEmpty()) { String message = String.format("Cannot set the given deployment id '%s' to get the name from it, because the deployment name has been already set to '%s'.", deploymentId, name); throw new NotValidException(message); } nameFromDeployment = deploymentId; return this; }
protected void ensureVariableShouldNotBeSet(String variableName) { if ((variables != null && variables.keySet().contains(variableName)) || (variablesLocal != null && variablesLocal.keySet().contains(variableName))) { throw new NotValidException("Cannot set and remove a variable with the same variable name: '"+variableName+"' within a command."); } }
protected void ensureVariableShouldNotBeSet(String variableName) { if ((variables != null && variables.keySet().contains(variableName)) || (variablesLocal != null && variablesLocal.keySet().contains(variableName))) { throw new NotValidException("Cannot set and remove a variable with the same variable name: '"+variableName+"' within a command."); } }
public HistoricCaseInstanceQuery closedBefore(Date date) { if (state!= null && (!state.equals(CaseExecutionState.CLOSED.getStateCode()))) { throw new NotValidException("Already querying for case instance state '" + state + "'"); } closedBefore = date; state = CaseExecutionState.CLOSED.getStateCode(); return this; }
protected Object getCaseExecutionVariable(String caseExecutionId, String variableName, boolean isLocal) { try { return commandExecutor.execute(new GetCaseExecutionVariableCmd(caseExecutionId, variableName, isLocal)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public DecisionRequirementsDefinition getDecisionRequirementsDefinition(String decisionRequirementsDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionRequirementsDefinitionCmd(decisionRequirementsDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@SuppressWarnings("unchecked") protected <T extends TypedValue> T getCaseExecutionVariableTyped(String caseExecutionId, String variableName, boolean isLocal, boolean deserializeValue) { try { return (T) commandExecutor.execute(new GetCaseExecutionVariableTypedCmd(caseExecutionId, variableName, isLocal, deserializeValue)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected VariableMap getCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues) { try { return commandExecutor.execute(new GetCaseExecutionVariablesCmd(caseExecutionId, variableNames, isLocal, deserializeValues)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected VariableMap getCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues) { try { return commandExecutor.execute(new GetCaseExecutionVariablesCmd(caseExecutionId, variableNames, isLocal, deserializeValues)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected Object getCaseExecutionVariable(String caseExecutionId, String variableName, boolean isLocal) { try { return commandExecutor.execute(new GetCaseExecutionVariableCmd(caseExecutionId, variableName, isLocal)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public CmmnModelInstance getCmmnModelInstance(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCmmnModelInstanceCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CmmnModelInstanceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public InputStream getCaseModel(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCaseModelCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public InputStream getCaseModel(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCaseModelCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public DmnModelInstance getDmnModelInstance(String decisionDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDmnModelInstanceCmd(decisionDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DmnModelInstanceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public InputStream getDecisionRequirementsModel(String decisionRequirementsDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionRequirementsModelCmd(decisionRequirementsDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }