Commit 88bbed94 authored by Christos Tranoris's avatar Christos Tranoris
Browse files

fix for #107

parent 9f821018
Loading
Loading
Loading
Loading
Loading
+17
Changes for src/main/java/org/etsi/osl/tmf/so641/reposervices/ServiceOrderRepoService.java: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -896,6 +896,23 @@ public class ServiceOrderRepoService {
						}
					} else if ( ( originChar != null ) && ( originChar.getValue() == null )  && ( updChar.getValue() != null ) ) {
							originChar.setValue( new Any( updChar.getValue() ) );						
					} else if ( originChar == null ) {
						/**
						 * A characteristic the item does not carry yet: add it, rather than dropping it
						 * silently. A client amending an order frequently needs to set a characteristic
						 * the ordered service was never given a value for, and ignoring it would leave
						 * the order asking for something other than what was requested — with nothing in
						 * the response to say so.
						 */
						Characteristic newChar = new Characteristic();
						newChar.setName( charname );
						newChar.setValueType( updChar.getValueType() );
						if ( updChar.getValue() != null ) {
							newChar.setValue( new Any( updChar.getValue() ) );
						}
						soiOrigin.getService().addServiceCharacteristicItem( newChar );
						logger.info("Order item " + soiOrigin.getUuid() + ": characteristic " + charname
								+ " added by update");
					}					
				}