Re: [greenstone-devel] GLI

From John M Thompson
DateTue, 26 Aug 2003 15:54:36 +1200
Subject Re: [greenstone-devel] GLI
In-Reply-To (1061865242-4805-28-camel-orlynscabinet-asti-dost-gov-ph)
Hello Orlyn,

There are two main things you have to keep in mind when creating a GLI
applet.

The first is the target Java Virtual Machine required. Since GLI makes
heavy use of jdk1.4 libraries, your browser must be able to handle the
1.4 Java Runtime Environment. We've already had some experience with
people trying to run our applets on Netscape, and getting stuck with
this problem.

The second thing is security. GLI copies files to and from quite
regularily, and so must be granted security permissions to do so. Jar
signing is definately the way to go, as I believe certification is quite
a long process (and can cost a lot too). Unfortunately I don't know much
about jar signing. There is someone in the group who has had a lot
experience (and some success) in giving applets security permissions,
but he is out of the country and out of touch at the moment. As soon as
he gets back I'll get him to contact you.

Until then an interim solution may be to specify permissions by hand. To
do this you create a .java.policy file in the applet folder (or possibly
in the jar, I'm not sure about that though). An example policy file,
used in another piece of Greenstone Software, has this content:

grant {
permission java.io.FilePermission "<<ALL FILES>>", "read, write";
permission javax.sound.sampled.AudioPermission "record";
permission java.util.PropertyPermission "user.dir", "read";
permission java.util.PropertyPermission "user.home", "read";
permission java.lang.RuntimePermission "modifyThread";
}

Of course GLI won't need the sound permission, but may instead require
permission for other packages to be set (hopefully which ones are
apparent from the security exceptions). Be aware that this change allows
-any- applet to read and write files, including possible malicious ones,
so don't leave it lying around permanently.

Browsing and Mirroring are not actually ready for beta release yet (I'm
rewritting the Mirror pages layout even as we speak), but you can enable
it if you wish. If the GLI folder there is a file called config.xml (you
have to run GLI at least once for it to be generate). If you open it in
an editor and scroll down to around line 100, you should see a block of
argument properties all starting with "workflow". Currently Browse,
Mirror and Export will have a value of "false". Change the value to
"true" for Browse and Mirror, then save and exit. Now run GLI. If no
collection was previously open the tabs should be immediately available.
If there was a previous collection then the tabs might be disabled. If
this is the case go to File->Preferences->Workflows to enable the tabs.

GLI doesn't control document sections directly. Instead a user can, for
example, double-click on a Word Document, then add section markers as
described in the Greenstone Developers Guide.

Cheers,

John Thompson

Greenstone Digital Library, University of Waikato
New Zealand

orlyn wrote:

>Good day! I have some inquires about GLI. As know we have tried
>converting GLI to become web accessible via applet. Though suggested
>that the package distributed right now would not be suited for
>deliverance as it not been modularized yet, we have somehow come up an
>idea just for experiment by inserting an applet class in Gatherer.jar
>that will just call and pass an required argument to the main method.
>The mechanism tends to be working when we emulated in a small
>application but not on GLI. It splats an security exception.
>
>Is this the part where jarsigning and certification comes?
>Any alternative methods? Further information about GLI applet would be
>appreciated.
>
>Also I'm having trouble in enabling the mirror feature. need help in
>complete command!
>
>For the last part. Is the subsectioning of documents available in GLI?
>
>
>thanks!
>Orlyn
>
>
>
>_______________________________________________
>greenstone-devel mailing list
>greenstone-devel@list.scms.waikato.ac.nz
>https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel
>
>