CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post by sebastienlavandier »
Hello,
First, CMS Integration plugin documentation is really great made !
I implemented a custom ProtocolChooserExtension to select a remote CMS document.
I also implemented a custom ProtocolURLHandlerExtension to retrieve the remote content of the select CMS document (Example: http://localhost:8080/function/00001/content.dita
The CMS document content is open in a new editor tab.
But I want to set this content in a local file, and open this local file, and I don't know how/when I can do that...
Thanks in advance for your help
Sébastien.L
First, CMS Integration plugin documentation is really great made !
I implemented a custom ProtocolChooserExtension to select a remote CMS document.
I also implemented a custom ProtocolURLHandlerExtension to retrieve the remote content of the select CMS document (Example: http://localhost:8080/function/00001/content.dita
The CMS document content is open in a new editor tab.
But I want to set this content in a local file, and open this local file, and I don't know how/when I can do that...
Thanks in advance for your help
Sébastien.L
-
- Posts: 1009
- Joined: Wed Nov 16, 2005 11:11 am
Re: CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post by alex_jitianu »
Hello Sébastien,
I'll be sure to pass your kind words to our documentation department!
From a Workspace Access plugin you can contribute two actions, a Check out and a Check in action. The Check out action can present a remote resource browsing dialog. After the user selects the resource you can copy it to a local file and open the local file. Inside our SDK there is a sample plugin named oxygen-sample-plugin-workspace-access that does just that. The Check In action knows how to map the local file back to the remote one.
Is your use case different? At which time should the local copy be stored back on the server?
Best regards,
Alex
I'll be sure to pass your kind words to our documentation department!
From a Workspace Access plugin you can contribute two actions, a Check out and a Check in action. The Check out action can present a remote resource browsing dialog. After the user selects the resource you can copy it to a local file and open the local file. Inside our SDK there is a sample plugin named oxygen-sample-plugin-workspace-access that does just that. The Check In action knows how to map the local file back to the remote one.
Is your use case different? At which time should the local copy be stored back on the server?
Best regards,
Alex
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Re: CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post by sebastienlavandier »
Hello Alew,
In the same way, when a dita document is open.
I choose to add a conref in this document, to a CMS document's.
Then, when I click on this conref="cproto://1_14_5_546953_0_5.dita#topicId", my custom protocole is used, to retrieve content.
But the second document is open in a new editor tab with the web service url like this: "http://localhost:8080/cf-psa/function/1 ... ntent.dita".
In this CMS plugin integration I don't work directly with document's URL, but with web services, that send me the content of the document ID.
I don't work with relative reference, I hope it's not a problem...
I hope too that was clear enough
Thanks in advance for your help.
Sébastien.L
In the same way, when a dita document is open.
I choose to add a conref in this document, to a CMS document's.
Then, when I click on this conref="cproto://1_14_5_546953_0_5.dita#topicId", my custom protocole is used, to retrieve content.
But the second document is open in a new editor tab with the web service url like this: "http://localhost:8080/cf-psa/function/1 ... ntent.dita".
In this CMS plugin integration I don't work directly with document's URL, but with web services, that send me the content of the document ID.
I don't work with relative reference, I hope it's not a problem...
I hope too that was clear enough
Thanks in advance for your help.
Sébastien.L
-
- Posts: 1009
- Joined: Wed Nov 16, 2005 11:11 am
Re: CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post by alex_jitianu »
Hello Sébastien,
One thing I still don't understand is why do you want to work with local files. The local copies could be needed if you want to implement a CheckIn/CheckOut mechanism. The user checks out a number of resources from the server, makes changes, and it feels it has finished with them he commits them back on the server.
Best regards,
Alex
Yes, a new editor will be opened. What the custom protocol does behind scenes is transparent for the user. The user will see this file as being cproto://1_14_5_546953_0_5.dita. Is this a problem? Would you like to create a local copy of cproto://1_14_5_546953_0_5.dita and open that instead?Then, when I click on this conref="cproto://1_14_5_546953_0_5.dita#topicId", my custom protocole is used, to retrieve content.But the second document is open in a new editor tab with the web service url like this: "http://localhost:8080/cf-psa/function/1 ... ntent.dita".
One thing I still don't understand is why do you want to work with local files. The local copies could be needed if you want to implement a CheckIn/CheckOut mechanism. The user checks out a number of resources from the server, makes changes, and it feels it has finished with them he commits them back on the server.
It depends. Are these absolute references using the "cproto" protocol too? Then it shouldn't be a problem even when creating local copies. I'm just thinking on how Oxygen will be able to resolve these references.I don't work with relative reference, I hope it's not a problem...
Best regards,
Alex
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Re: CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post by sebastienlavandier »
Hello Alex,
User see only from editor tab name the end of this URL (content.dita).
I think too that is not necessary to save it in a local file, but then I want to change the editor tab's url from "http://localhost:8080/cf-psa/function/1 ... ntent.dita" to "cproto://1_14_5_546953_0_5.dita"
How/When I can do that ?
In this case, when user want to refresh this page, the custom resolver will be be called again.
Thanks in advance for your help.
Sébastien.L
Yes, when I try to open this URL : cproto://1_14_5_546953_0_5.dita, custom protocol resolve this url and open a new tab editor where the editor tab name's is the resolved URL (http://localhost:8080/cf-psa/function/1 ... ntent.dita).Yes, a new editor will be opened. What the custom protocol does behind scenes is transparent for the user. The user will see this file as being cproto://1_14_5_546953_0_5.dita. Is this a problem? Would you like to create a local copy of cproto://1_14_5_546953_0_5.dita and open that instead?
User see only from editor tab name the end of this URL (content.dita).
I think too that is not necessary to save it in a local file, but then I want to change the editor tab's url from "http://localhost:8080/cf-psa/function/1 ... ntent.dita" to "cproto://1_14_5_546953_0_5.dita"
How/When I can do that ?
In this case, when user want to refresh this page, the custom resolver will be be called again.
Thanks in advance for your help.
Sébastien.L
-
- Posts: 1009
- Joined: Wed Nov 16, 2005 11:11 am
Re: CMS Integration Plugin: Retrieve CMS document content. and sore it in a local file.
Post by alex_jitianu »
Hello Sébastien,
Best regards,
Alex
In your implementation of URLStreamHandler, on openConnection(), you are returning an URLConnection. This URLConnection is probably built over the "http" protocol and that's why is being seen as the editior location. I think you can fix this by overriding the URLConnection.getURL() and return the "cproto" URL.I think too that is not necessary to save it in a local file, but then I want to change the editor tab's url from "http://localhost:8080/cf-psa/function/1 ... ntent.dita" to "cproto://1_14_5_546953_0_5.dita"
Best regards,
Alex
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service