Get the WebApp URL through Java
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 31
- Joined: Fri Jan 26, 2024 3:31 pm
Get the WebApp URL through Java
Post by vitorhugovm »
Hello!
I'm trying to extract a parameter that is presented on the browser's URL of an opened XML file in the WebApp.
Is there any function in Java that does this or at least returns the complete URL so I can manipulate the string?
I'm currently using the version 25 of the SDK.
Thanks!
Vitor
I'm trying to extract a parameter that is presented on the browser's URL of an opened XML file in the WebApp.
Is there any function in Java that does this or at least returns the complete URL so I can manipulate the string?
I'm currently using the version 25 of the SDK.
Thanks!
Vitor
-
- Site Admin
- Posts: 163
- Joined: Tue Mar 20, 2018 5:28 pm
Re: Get the WebApp URL through Java
Post by Bogdan Dumitru »
Hello Vitor,
The URL parameters are forwarded to the sync.api.Workspace.LoadingOptions. As a side-note, plugins that contribute/intercept sync.api.Workspace.LoadingOptions by listening on the sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED event. The LoadingOptions are forwarded to the server where they end up in ro.sync.ecss.extensions.api.access.EditingSessionContext. So you can access the URL parameters from EditingSessionContext. The EditingSessionContext object can be obtained like this: EditingSessionContext editingSessionContext = authorDocumentModel.getAuthorAccess().getEditorAccess().getEditingContext();
URL parameters -> LoadingOptions (client-side) -> EditingSessionContext (server-side)
The URL parameters are forwarded to the sync.api.Workspace.LoadingOptions. As a side-note, plugins that contribute/intercept sync.api.Workspace.LoadingOptions by listening on the sync.api.Workspace.EventType.BEFORE_EDITOR_LOADED event. The LoadingOptions are forwarded to the server where they end up in ro.sync.ecss.extensions.api.access.EditingSessionContext. So you can access the URL parameters from EditingSessionContext. The EditingSessionContext object can be obtained like this: EditingSessionContext editingSessionContext = authorDocumentModel.getAuthorAccess().getEditorAccess().getEditingContext();
URL parameters -> LoadingOptions (client-side) -> EditingSessionContext (server-side)
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 31
- Joined: Fri Jan 26, 2024 3:31 pm
Re: Get the WebApp URL through Java
Post by vitorhugovm »
Hello Bogdan!
I did as you said and it solved my issue.
Thank you very much!
Vitor
I did as you said and it solved my issue.
Thank you very much!
Vitor
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