56 lines
2.2 KiB
Plaintext
56 lines
2.2 KiB
Plaintext
|
!c !3 Unmodified Pages are not imported.
|
||
|
|
||
|
Create a page tree to be imported.
|
||
|
!|Page creator. |
|
||
|
|Page name. |Page contents.|valid?|
|
||
|
|ImportedRoot |!contents |true |
|
||
|
|ImportedRoot.PageOne |page one |true |
|
||
|
|ImportedRoot.PageOne.ChildOne|child one |true |
|
||
|
|ImportedRoot.PageTwo |page two |true |
|
||
|
|
||
|
Create an importing page.
|
||
|
!|Page creator. |
|
||
|
|Page name. |Page contents.|valid?|
|
||
|
|ImportingPage|!contents |true |
|
||
|
|
||
|
This !-ImportingPage-! will now import the !-ImportingRoot-! page created above.
|
||
|
!|Response Requester. |
|
||
|
|uri |valid?|
|
||
|
|ImportingPage?responder=import&remoteUrl=http://localhost:${INTERNAL_PORT}/ImportedRoot&nochunk=true|true |
|
||
|
|
||
|
We see all 3 pages imported.
|
||
|
!|Response Examiner |
|
||
|
|type |pattern |matches?|
|
||
|
|contents|3 pages were imported|true |
|
||
|
|
||
|
Sleep a bit so that the last modification time actually changes.
|
||
|
|Sleep|1000|
|
||
|
|
||
|
Importing again will show that no pages were imported since none had changed.
|
||
|
!|Response Requester. |
|
||
|
|uri |valid?|
|
||
|
|ImportingPage?responder=import&nochunk=true|true |
|
||
|
|
||
|
!|Response Examiner |
|
||
|
|type |pattern |matches?|wrapped html?|
|
||
|
|contents|0 pages were imported |true | |
|
||
|
|contents|3 pages were unmodified|true | |
|
||
|
|
||
|
Now we'll update one of the imported pages...
|
||
|
!|Save Page Requester |
|
||
|
|uri |save contents|status!|
|
||
|
|ImportedRoot.PageOne?edit|3.141592 |303 |
|
||
|
|
||
|
Importing again will shows only 1 page imported, 2 unchanged.
|
||
|
!|Response Requester. |
|
||
|
|uri |valid?|
|
||
|
|ImportingPage?responder=import&nochunk=true|true |
|
||
|
|
||
|
!|Response Examiner |
|
||
|
|type |pattern |matches?|
|
||
|
|contents|1 page was imported |true |
|
||
|
|contents|PageOne |true |
|
||
|
|contents|2 pages were unmodified|true |
|
||
|
|
||
|
|