@SuppressWarnings("rawtypes") @Override public ProcessorDefinition createCamelDefinition() { PolicyDefinition answer = new PolicyDefinition(); answer.setRef(toXmlPropertyValue(PROPERTY_REF, this.getRef())); super.savePropertiesToCamelDefinition(answer); return answer; }
@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()); } }