Page 1 of 1

check client jar update

Posted: Mon Oct 21, 2013 5:22 pm
by idak
Hi,
We want to implement a function to check update our files and jar at startup of the author editor.
What java class can we use it?

Best Regards,
Idak

Re: check client jar update

Posted: Tue Oct 22, 2013 9:13 am
by Radu
Hi Idak,

Could you give us more details?
Do you have a plugin for Oxygen implemented?
A plugin can be bundled as an add-on which would also give update capabilities for the add-on:

http://www.oxygenxml.com/demo/AddonsSupport.html

Regards,
Radu

Re: check client jar update

Posted: Tue Oct 22, 2013 1:38 pm
by idak
Hi,
Yes we have a custom API framework and we want to check update to idak directry :
idak
- CSS
- ACTIONS
- JS
- idak.framework
- idak.jar

The XML file :
<?xml version="1.0" encoding="UTF-8"?>
<xt:extensions xmlns:xt="http://www.oxygenxml.com/ns/extension"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oxygenxml.com/ns/extension http://www.oxygenxml.com/ns/extension/extensions.xsd">
<xt:extension id="frameworks.idak">
<xt:location href="idak.zip"/>
<xt:version>1.0.11</xt:version>
<xt:oxy_version>14.0+</xt:oxy_version>
<xt:type>framework</xt:type>
<xt:author>Idak dok</xt:author>
<xt:name>Idak API</xt:name>
<xt:description xmlns="http://www.w3.org/1999/xhtml">
Test Update...
</xt:description>
<xt:license>
<![CDATA[
LICENSE !!!
]]></xt:license>
</xt:extension>
</xt:extensions>

The update it's detected in oxygen but it doesn't work.

Best Regards,
Idak

Re: check client jar update

Posted: Tue Oct 22, 2013 2:27 pm
by Radu
Hi Idak,
The update it's detected in oxygen but it doesn't work.
Could you give us more details?
So Oxygen reports that a new update is available for the framework, right?
Does Oxygen try to update the add-on and fail? Does it show an error message of some kind?

Regards,
Radu

Re: check client jar update

Posted: Tue Oct 22, 2013 2:59 pm
by idak
Hi,

I restart the Oxygen editor and i get this error :
Please pack the framework root directory not just it's contents.

Regards,
Idak

Re: check client jar update

Posted: Tue Oct 22, 2013 3:16 pm
by Radu
Hi Idak,

The archive "idak.zip" should contain a single resource in it, a folder called "idak" which in turn should contain the framework resources.

Regards,
Radu

Re: check client jar update

Posted: Tue Oct 22, 2013 3:23 pm
by idak
Hi,

My archive "idak.zip" contain a CSS folder and in this folder I have 3 css files.

Regars,
Idak

Re: check client jar update

Posted: Tue Oct 22, 2013 3:25 pm
by Radu
Hi,

Your archive should contain the entire framework, not just the changed files. The add-on update feature within Oxygen is not incremental, it re-downloads and re-installs all the framework's resources.

Regards,
Radu

Re: check client jar update

Posted: Tue Oct 22, 2013 4:05 pm
by idak
Hi,

Can you give me an example to update a DITA resources?

Regards,
Idak

Re: check client jar update

Posted: Tue Oct 22, 2013 4:37 pm
by Radu
Hi Idak,

You cannot create an add-on site which updates just a couple of resources from a framework.
Your add-on will contain the entire framework directory and all the framework resources will be updated when the add-on is updated.
For example for DITA the add-on would always contain the entire folder:

OXYGEN_INSTALL_DIR\frameworks\dita

and even if at some point you make changes to only a couple of CSS files, you will still need to pack the entire "dita" framework as the add-on.

Regards,
Radu