How to store user's informations
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
How to store user's informations
Post by sebastienlavandier »
Hello,
I develop a plugin for the author, and I want to store different informations like server url, user name, password, ...
I found a method "StandalonePluginWorkspace.getOptionsStorage()" in the Author API. But could you say me where are store the informations, only in memory, or in a file also ?
Else how can I do that ? Maybe by using the other method "standalonePluginWorkspace.getPreferencesDirectory()" ?
Thanks in advance for you answer.
Seb.
I develop a plugin for the author, and I want to store different informations like server url, user name, password, ...
I found a method "StandalonePluginWorkspace.getOptionsStorage()" in the Author API. But could you say me where are store the informations, only in memory, or in a file also ?
Else how can I do that ? Maybe by using the other method "standalonePluginWorkspace.getPreferencesDirectory()" ?
Thanks in advance for you answer.
Seb.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to store user's informations
Hello Sebastien,
So this would be the API that you need.
By the way, if you are saving passwords you can also use our API:
and
to encrypt the password before storing it and to decrypt it when retrieving it from the options storage.
Regards,
Radu
The settings which you save are persistent, they are saved on disk when Oxygen is closed together with Oxygen's own internal preferences.I found a method "StandalonePluginWorkspace.getOptionsStorage()" in the Author API. But could you say me where are store the informations, only in memory, or in a file also ?
So this would be the API that you need.
You can use this method if you want to take full control over the format which is used to save the preferences, if you want to create your own preferences file and save it to Oxygen's preferences directory located in the user home. Probably not necessary in your case.Else how can I do that ? Maybe by using the other method "standalonePluginWorkspace.getPreferencesDirectory()"
By the way, if you are saving passwords you can also use our API:
Code: Select all
ro.sync.exml.workspace.api.util.UtilAccess.encrypt(String)
Code: Select all
ro.sync.exml.workspace.api.util.UtilAccess.decrypt(String)
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Re: How to store user's informations
Post by sebastienlavandier »
Thanks Radu,
But if I want to store a user account, could I used the method :
standalonePluginWorkspace.getOptionsStorage().setOption() ?
and where data are stored ?
Thanks in advance for your answer.
Seb
But if I want to store a user account, could I used the method :
standalonePluginWorkspace.getOptionsStorage().setOption() ?
and where data are stored ?
Thanks in advance for your answer.
Seb
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to store user's informations
Hi Sebastien,
Yes, you can use the options storage API to store simple key=>value pairs.
Oxygen has a preferences folder, depending on the operating system it is located in different places.
In this topic you can see at step (3) the locations on the preferences folder:
http://www.oxygenxml.com/doc/ug-oxygen/ ... alone.html
In that preferences folder there is an XML file which is used to store the Oxygen options along with the user-defined options.
The XML file is called something like:
oxyAuthorOptionsSa14.0.xml
or
oxyOptionsSa14.0.xml
depending on the installed kit (XML Author or XML Editor) and on the installed version.
Regards,
Radu
Yes, you can use the options storage API to store simple key=>value pairs.
Oxygen has a preferences folder, depending on the operating system it is located in different places.
In this topic you can see at step (3) the locations on the preferences folder:
http://www.oxygenxml.com/doc/ug-oxygen/ ... alone.html
In that preferences folder there is an XML file which is used to store the Oxygen options along with the user-defined options.
The XML file is called something like:
oxyAuthorOptionsSa14.0.xml
or
oxyOptionsSa14.0.xml
depending on the installed kit (XML Author or XML Editor) and on the installed version.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
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