ASSERT(!path.empty());
if (path[0] == m_Key) {
- if (path.size() > 1)
- BOOST_THROW_EXCEPTION(std::invalid_argument("Specified path does not exist."));
- else
+ if (path.size() == 1) {
result->AddExpression(*this);
+
+ return;
+ }
+
+ if (!m_Value.IsObjectType<ExpressionList>())
+ BOOST_THROW_EXCEPTION(std::invalid_argument("Specified path does not exist."));
+
+ ExpressionList::Ptr exprl = m_Value;
+ std::vector<String> sub_path(path.begin() + 1, path.end());
+ exprl->Extract(sub_path, result);
} else if (m_Operator == OperatorExecute) {
ExpressionList::Ptr exprl = m_Value;
exprl->Extract(path, result);
builder->AddExpression("display_name", OperatorSet, svcname);
builder->AddExpression("short_name", OperatorSet, svcname);
- CopyServiceAttributes<false>(this, builder);
+ std::vector<String> path;
+ path.push_back("services");
+ path.push_back(svcname);
+
+ ExpressionList::Ptr exprl = boost::make_shared<ExpressionList>();
+ item->GetLinkedExpressionList()->Extract(path, exprl);
+ builder->AddExpressionList(exprl);
+
+ /*CopyServiceAttributes<false>(this, builder);
if (!svcdesc.IsObjectType<Dictionary>())
- BOOST_THROW_EXCEPTION(std::invalid_argument("Service description must be either a string or a dictionary."));
+ BOOST_THROW_EXCEPTION(std::invalid_argument("Service description must be either a string or a dictionary."));*/
Dictionary::Ptr service = svcdesc;
}
}
- CopyServiceAttributes<true>(service, builder);
+ //CopyServiceAttributes<true>(service, builder);
ConfigItem::Ptr serviceItem = builder->Compile();
DynamicObject::Ptr dobj = serviceItem->Commit();