[oXygen-user] scripted creation of MarkLogic data sources?

Alex Jitianu alex_jitianu at sync.ro
Fri Nov 22 08:11:46 CST 2013


Hi Jakob,

Please see my answers below.

Best regards,
Alex
-- 
Alex Jitianu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 21-Nov-13 3:34 PM, Jakob Fix wrote:
> Hi Alex,
>
> thank you for your reply. You are right, I was talking about the 
> connections, not the data sources.
> Also, I didn't think about the passwords, hmmm.
>
> I was actually thinking of generating the fragment for the options 
> file using XSLT as you suggested; using xmltask in ant we could 
> probably even insert or update it automatically. But how do I encrypt 
> the password though? It seems to be a sequence of integers, separated 
> by semicolons and dots...
We encode the password dependent on the local machine so a password 
encrypted on your machine will not be decrypted on another machine. So 
you must leave the password field empty and the user will have to edit 
them and input the password.

Another solution that comes to mind is to implement an WorkspaceAccess 
plugin extension. When the plugin starts it can overwrite the 
connections settings of the user (the Java API offers this option). With 
a little more work you could read the XML options file and merge the 
connections. For passwords you can present a dialog to the user. The 
plugin can be packed as an add-on so it will be very easy for the user 
to install it. If you want to go on this path I can offer more insight.

It might involved more work then just using XSLT but might be easier for 
the user use it. Your call...
>
> Another question would be: when updating the options file would it be 
> a good thing that Oxygen is not running, because it might be saving 
> its in-memory options on shutting down?
I think you are correct. Oxygen shouldn't be running when it's options 
are being altered.
>
>
> cheers,
> Jakob.
>
>
> On Thu, Nov 14, 2013 at 10:04 AM, Alex Jitianu <alex_jitianu at sync.ro 
> <mailto:alex_jitianu at sync.ro>> wrote:
>
>     Hi Jakob,
>
>     Are you referring to Data Sources or Connections? A data source
>     contains the jar libraries while the connection contains the data
>     needed to connect to a specific MarkLogic AppServer. Assuming that
>     you have configured the MarkLogic related options once, what you
>     can do is share the Oxygen options file with all other users that
>     want the same level of access.
>
>     The options file is named something like oxyOptionsSa15.0.xml and
>     depending on the platform the options folder is located as follows:
>     - Windows XP - [user-home-folder]\Application Data\com.oxygenxml
>     - Windows Vista/7 - [user-home-folder]\AppData\Roaming\com.oxygenxml
>     - Mac OS X - [user-home-folder]/Library/Preferences/com.oxygenxml
>     - Mac OS X - ~/Library/Preferences/com.oxygenxml
>     - Linux - [user-home-folder]/.com.oxygenxml
>
>     One thing to bear in mind is that the passwords are encrypted so
>     they are not portable. All those that import the options file must
>     manually insert the passwords in the connections.
>
>     Since the options file is an XML file you could also take a look
>     and see how a MarkLogic data source and connection are saved and
>     write an XQuery or XSLT to automatic add the connections so that
>     you skip the manual insertion entirely.
>
>     Once you have an options file you can send them to all interested
>     and they can use Options->Import Global Options... Another
>     possible approach is to give them the options file as default
>     options:
>     http://oxygenxml.com/doc/ug-editor/#topics/default-options.html
>
>     I'm also thinking about a possible Wizard that will let you select
>     the AppServers for which you want to create connections. But I
>     don't think this Wizard will be able to create Data Sources since
>     the jars are not on the server (it would involve downloading them
>     from the MarkLogic site). Do you find this kind of wizard to be
>     useful and if yes do you have any suggestions about what
>     interaction we should offer in this wizard?
>
>     Best regards,
>     Alex
>
>
>     On 13-Nov-13 4:55 PM, Jakob Fix wrote:
>>     Hi,
>>
>>     right now we're creating our MarkLogic data sources manually,
>>     using the UI. Is there a way to create them by modifying a
>>     configuration file, or an API to send setup requests to?
>>
>>     We're having a quite a lot of these data sources, but creating
>>     them by hand gets cumbersome. And we really like the possibility
>>     to inspect the database's contents via WebDAV from within OxygenXML.
>>
>>     cheers,
>>     Jakob.
>>
>>
>>     _______________________________________________
>>     oXygen-user mailing list
>>     oXygen-user at oxygenxml.com  <mailto:oXygen-user at oxygenxml.com>
>>     http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20131122/bea2d1b0/attachment.html 


More information about the oXygen-user mailing list