/** * @RDE_HEADER@ * Abstract class which defines selection behavior when clicking on mounting points on the map * $Id$ * $HeadURL$ * $Author$ * Created by Hannes Baeuerle, SLSE, 2017-04-05 */ #include "ism_selector.h" #include namespace InfrastructureManagement { MountingPointSelector::MountingPointSelector(const std::shared_ptr &dtc, const std::shared_ptr &ftc, const std::shared_ptr &ismDataIfc, LtsUtils::RequestHelper *requestHelper, LOGGER_T logger) : m_ismDataIfc(ismDataIfc) , m_ftc(ftc) , m_dtc(dtc) , m_requestHelper(requestHelper) , m_logger(logger) { if (!m_ftc->enableMountingPointPlanModify()) { ERROR_LOG(m_logger) << "Could not enable FT MountingPointPlanModify of ISM"; } } void MountingPointSelector::onMountingPointPlanModifyReply(const Core::FunctionReplyObject &replyObject) { m_requestHelper->requestReply(replyObject); if (replyObject.error()) ERROR_LOG(m_logger) << "MountingPointPlansRemove error: " << replyObject.str(); else DEBUG_LOG(m_logger) << "MountingPointPlansRemove success"; } void MountingPointSelector::startModifyRequest(const std::vector &data) { if (data.empty()) return; MountingPointPlanModifyRequest req(m_ismDataIfc->scheduleId(), data); m_requestHelper->startSingleRequest([req, this]() { return m_ftc->mountingPointPlanModifyRequest(req, this); }); } }