+
+ public ComponentPreset asComponentPreset(List<MaterialDTO> materials) throws InvalidComponentPresetException {
+ return asComponentPreset(ComponentPreset.Type.CENTERING_RING, materials);
+ }
+
+ public ComponentPreset asComponentPreset(ComponentPreset.Type type, List<MaterialDTO> materials) throws InvalidComponentPresetException {
+ TypedPropertyMap props = new TypedPropertyMap();
+ addProps(props, materials);
+ props.put(ComponentPreset.INNER_DIAMETER, this.getInsideDiameter());
+ props.put(ComponentPreset.OUTER_DIAMETER, this.getOutsideDiameter());
+ props.put(ComponentPreset.LENGTH, this.getLength());
+ props.put(ComponentPreset.TYPE, type);
+
+ return ComponentPresetFactory.create(props);
+ }