Hi All, I think copying the entire list (map or any collection) is the correct strategy. Comparing with default value in the bean may not be optimal solution.
Pros: 1. Thinking the list as single value avoids complexities in end user perspective 2. Allows changing order (if applicable) 3. Allows changing individual value in the list 4. Allows deletion Cons: 1. End user has to copy entire list Hence the negative side is minimal compared to positive side. Cheers, Ruwan On Tue, Mar 14, 2017 at 6:44 PM, Danesh Kuruppu <[email protected]> wrote: > > Currently we have to copy the entire list to deployment.yaml to >> add/modify/remove an item in a list, if you are getting the configuration >> object from config provider. We cannot edit bean variable value partially >> from the deployment.yaml. >> > > In this case, rather getting configuration bean object from the config >> provider, we can get only the configurations defined in the deployment.yaml >> from the method[1] and do the add/modify/delete logic at the component >> level. >> > >> Danesh, we can handle adding an item to a list with this method. But I >> don't think we can do modifications or deletions since there is no way to >> identify the existing item to modify. I don't see an immediate way to fix >> this via deployment.yaml either!! One alternative is to identify this type >> of configuration files, and keep them as it is >> >> Modification can be done by comparing values in the deployment.yaml with > the default values in the bean class. but item deletion cannot achieve in > this way. We have to copy entire list to deployment.yaml or keep it as > separate file. > > Thanks > -- > > *Danesh Kuruppu* > Senior Software Engineer | WSO2 > > Email: [email protected] > Mobile: +94 (77) 1690552 <+94%2077%20169%200552> > Web: WSO2 Inc <https://wso2.com/signature> > > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > > -- *Ruwan Abeykoon* *Associate Director/Architect**,* *WSO2, Inc. http://wso2.com <https://wso2.com/signature> * *lean.enterprise.middleware.*
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
