Changes for page RefactoringRESTXML
Last modified by Thomas Mortagne on 2022/08/08 11:05
From version 1.12
edited by Thomas Mortagne
on 2022/08/08 11:02
on 2022/08/08 11:02
Change comment:
There is no comment for this version
To version 1.13
edited by Thomas Mortagne
on 2022/08/08 11:04
on 2022/08/08 11:04
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,11 +1,14 @@ 1 1 {{groovy}} 2 2 import org.xwiki.model.reference.*; 3 -import javax.xml.bind.*; 4 4 5 5 // Create a request to move a page using the standard API 5 +// That's generally the only part you need to customize for your own request need 6 6 var source = new SpaceReference("xwiki", "MyParentPage", "MyPage"); 7 7 var destination = new SpaceReference("xwiki", "MyPageNewLocaltion", "MyPageNewName"); 8 8 var moveRequest = services.component.getInstance(org.xwiki.refactoring.script.RequestFactory.class).createMoveRequest(source, destination) 9 + 10 +/////////// SERIALIZATION //////////////////// 11 + 9 9 // cleanup the request from properties which make sense for a script but are pretty much useless in the case of a REST request 10 10 moveRequest.removeProperty("checkrights") 11 11 moveRequest.removeProperty("user.reference")