*
* @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),
(String) properties.get(HOST_COMPONENT_STATE_PROPERTY_ID));
serviceComponentHostRequest.setDesiredStackId(
(String) properties.get(HOST_COMPONENT_STACK_ID_PROPERTY_ID));
if (properties.get(HOST_COMPONENT_STALE_CONFIGS_PROPERTY_ID) != null) {
serviceComponentHostRequest.setStaleConfig(
properties.get(HOST_COMPONENT_STALE_CONFIGS_PROPERTY_ID).toString().toLowerCase());
}
if (properties.get(HOST_COMPONENT_DESIRED_ADMIN_STATE_PROPERTY_ID) != null) {
serviceComponentHostRequest.setAdminState(
properties.get(HOST_COMPONENT_DESIRED_ADMIN_STATE_PROPERTY_ID).toString());
}
Object o = properties.get(HOST_COMPONENT_MAINTENANCE_STATE_PROPERTY_ID);
if (null != o) {
serviceComponentHostRequest.setMaintenanceState (o.toString());
}
return serviceComponentHostRequest;
}