* @param properties the predicate
*
* @return the component request object
*/
private ServiceComponentHostRequest getRequest(Map<String, Object> properties) {
ServiceComponentHostRequest serviceComponentHostRequest = new ServiceComponentHostRequest(
(String) properties.get(HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID),
(String) properties.get(HOST_COMPONENT_SERVICE_NAME_PROPERTY_ID),
(String) properties.get(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID),
(String) properties.get(HOST_COMPONENT_HOST_NAME_PROPERTY_ID),
null,
(String) properties.get(HOST_COMPONENT_STATE_PROPERTY_ID));
serviceComponentHostRequest.setDesiredStackId(
(String) properties.get(HOST_COMPONENT_STACK_ID_PROPERTY_ID));
Map<String, String> configMappings =
ConfigurationResourceProvider.getConfigPropertyValues(properties);
if (configMappings.size() > 0) {
serviceComponentHostRequest.setConfigVersions(configMappings);
}
return serviceComponentHostRequest;
}