[jboss-as7-dev] Read sub-model operation question
Kabir Khan
kabir.khan at jboss.com
Tue Jan 11 08:36:03 EST 2011
I have the following model:
Model {"profile" => {
"profileA" => {
"name" => "Profile A",
"content" => [
1,
2
]
},
"profileC" => {"name" => "Profile C"}
}}
This is the operation descriptor:
{
"operation-name" => "read-sub-model",
"description" => "Reads a model node's sub values",
"request-properties" => {"recursive" => {
"type" => BOOLEAN,
"description" => "Whether to get the children recursively. If absent, false is the default",
"required" => false,
"nillable" => true
}}
}
I call it with:
{
"operation-name" => "read-sub-model",
"address" => [
"profile",
"profileA"
],
"request-properties" => {"recursive" => true}
}
In my operation handler I see:
{
"name" => "Profile A",
"content" => [
1,
2
]
}
The question is when calling resultHandler.handleResultFragment() what do I pass in for the location parameter?
If I use '{"profile", "profileA"}' I get this returned to the client:
{"profile" => {"profileA" => {
"name" => "Profile A",
"content" => [
1,
2
]
}}}
If I use {} I get this returned:
{
"name" => "Profile A",
"content" => [
1,
2
]
}
Also, I am not clear on what to return if recursive == false?
More information about the jboss-as7-dev
mailing list