Thanks a lot Mauris.
In our current implementation, we consume virtual wikis only through REST
api and we have extended it to add few functionalities as we needed.
As per your comment, I'm thinking to export existing class definition to
xar / xml and import it to other virtual wiki. Can I copy/create class
definition programatically to other virtual wiki. Pointer to XWiki API /
plugin / class reference will be helpful.
Thanks again.
Regards,
Aslam Sayyed
On Mon, Apr 9, 2012 at 10:17 PM, Aslam Sayyed <aslam.sayyed(a)gmail.com>wrote;wrote:
Hi All,
I'm using RESTful API, I'm trying to create Xwiki Object and attach to
existing document using
/wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects POST method
Object customObject = new Object();
customObject.setClassName("XWiki.MyCustomClass");
Property property = new Property();
property.setType("com.xpn.xwiki.objects.classes.StringClass");
property.setName("RefTags");
property.setValue("Food");
customObject.withProperties(property);
ClientResponse response =
resource.accept("application/xml").post(ClientResponse.class, customObject);
int httpResponseCode = response.getStatus();
Object resObj = response.getEntity(Object.class);
Problem is Class's Object gets attached to document but properties aren't.
I even tried url encode format found property#name=value
Please help / suggest solution.
Thanks in advance,
Aslam Sayyed