Decouple ChefApiClientImpl from header creation 37/35237/2
authorMichal Kabaj <michal.kabaj@nokia.com>
Mon, 12 Mar 2018 14:04:50 +0000 (15:04 +0100)
committerTakamune Cho <tc012c@att.com>
Mon, 12 Mar 2018 18:33:57 +0000 (18:33 +0000)
commitf8f6d212382f458e1cb31081dad744e78f92e521
treed7482fc483dae47de3d77ccfcc829254157380c9
parent20eaa8a699ea41b7c40bbee7364dd3554af45606
Decouple ChefApiClientImpl from header creation

Introduce new FunctionalInterface HttpHeaderFactory to allow customization of
http header providers when creating ChefApiClientImpl using ChefApiClientFactory
This allows for better encapsulation of header specific values such as:
userId,organizations,pemPath.

Change-Id: Iec2c7cff8e664a18e15d7e973920152fdb158c98
Issue-ID: APPC-437
Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImpl.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/HttpHeaderFactory.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImplTest.java