api.getProperties().put(prop.getName(), prop.getValue());
}
api.setHeaderTransformation (BeanConverterUtil.<HeaderTransformation, com.alu.e3.prov.restapi.model.HeaderTransformation>toDataModels(provisionData.getHeaderTransformations()));
ApiDetail apiDetail = new ApiDetail();
api.setApiDetail (apiDetail);
apiDetail.setDisplayName (provisionData.getDisplayName());
apiDetail.setEndpoint (provisionData.getEndpoint());
apiDetail.setHttps (toDataModel(provisionData.getHttps()));
apiDetail.setType (toDataModel(provisionData.getType()));
apiDetail.setSubscriptionStep (toDataModel(provisionData.getSubscriptionStep()));
apiDetail.setNotificationFormat (toDataModel(provisionData.getNotificationFormat()));
apiDetail.setVersion (provisionData.getVersion());
if(provisionData.getIpWhiteList() != null) {
api.getWhiteListedIps().addAll(provisionData.getIpWhiteList().getIp());
}
apiDetail.getContexts().addAll (BeanConverterUtil.<APIContext, com.alu.e3.prov.restapi.model.ApiContext>toDataModels(provisionData.getContexts()));
apiDetail.setTdrEnabled (toDataModel(provisionData.getTdrEnabled()));
if (provisionData.getAuthentication() != null && provisionData.getAuthentication().getAuthKey() != null) {
apiDetail.setAuthKeyName (provisionData.getAuthentication().getAuthKey().getKeyName());
apiDetail.setAuthHeaderName (provisionData.getAuthentication().getAuthKey().getHeaderName());
}
if (provisionData.getAuthentication() != null)
apiDetail.getEnabledAuthType().addAll (BeanConverterUtil.<NBAuthType, AuthType>toDataModels(provisionData.getAuthentication().getAuths()));
apiDetail.setStatus (toDataModel(provisionData.getStatus()));
// FIXME: The current WS API model does not support notification (true|false) attributes.
apiDetail.setNotification (null);
apiDetail.setAllowedMethods(provisionData.getAllowedHttpMethodsAsString());
api.setValidation(toDataModel(provisionData.getValidation()));
api.setHeaderTransEnabled(provisionData.getHeaderTransEnabled());
api.setInternal(provisionData.getInternal());