Ejemplo n.º 1
0
  @Override
  public void onSaveScript() {
    VariableDuplicationHelper variableDuplicationHelper = new VariableDuplicationHelper(variable);
    VariableDto newVariable = variableDuplicationHelper.getDerivedVariable();
    VariableDtos.setScript(newVariable, scriptEditorPresenter.getScript());
    newVariable.setValueType(scriptEditorPresenter.getValueEntityType().getLabel());
    newVariable.setIsRepeatable(scriptEditorPresenter.isRepeatable());

    compileScript(newVariable);
  }
Ejemplo n.º 2
0
 @Override
 public VariableDto getVariableDto(String script) {
   VariableDto variableDto = VariableDto.create();
   variableDto.setName(variableName.getValue());
   variableDto.setIsRepeatable(repeatableCheckbox.getValue());
   if (repeatableCheckbox.getValue()) variableDto.setOccurrenceGroup(occurrenceGroup.getValue());
   variableDto.setValueType(valueType.getValue(valueType.getSelectedIndex()));
   variableDto.setEntityType(entityType);
   variableDto.setMimeType(mimeType.getValue());
   variableDto.setUnit(unit.getValue());
   VariableDtos.setScript(variableDto, script);
   return variableDto;
 }