Exemplo n.º 1
0
 @SuppressWarnings("rawtypes")
 @Override
 public ProcessorDefinition createCamelDefinition() {
   PolicyDefinition answer = new PolicyDefinition();
   answer.setRef(toXmlPropertyValue(PROPERTY_REF, this.getRef()));
   super.savePropertiesToCamelDefinition(answer);
   return answer;
 }
Exemplo n.º 2
0
  @SuppressWarnings("rawtypes")
  @Override
  protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
    super.loadPropertiesFromCamelDefinition(processor);

    if (processor instanceof PolicyDefinition) {
      PolicyDefinition node = (PolicyDefinition) processor;
      this.setRef(node.getRef());
    } else {
      throw new IllegalArgumentException(
          "ProcessorDefinition not an instanceof PolicyDefinition. Was "
              + processor.getClass().getName());
    }
  }