The resource Module
Introduction
The resource
module contains the "resource" resource type,
it allows to store arbitrary media documents.
Installation
-
Declare the module in the
<modules/>
section of$PUB_HOME/config/publication.xml
:<module name="resource"/>
-
Assign a workflow schema to the resource type in
$PUB_HOME/config/publication.xml
:<resource-type name="resource" workflow="fallback://config/workflow/workflow.xml"/>
-
Define the usecase policies in
$PUB_HOME/config/access-control/usecase-policies.xml
(or use the usecase administration GUI):<usecase id="resource.create"> <role id="admin"/> <role id="edit"/> </usecase> <usecase id="resource.upload"> <role id="admin"/> <role id="edit"/> </usecase>
Headless Mode
Options:
- http://www.idautomation.com/kb/xwindow-error.html
- http://www.jguru.com/faq/view.jsp?EID=222296
- try
java.awt.headless=true
in the case of Java 1.4 -
run X servere:
Virtual framebuffer X server: Installation instructions for debian apt-get install xvfb apt-get install xlibs apt-get install xfonts-base nohup Xvfb :0 -screen 0 1024x786x16 & export DISPLAY=:0
Also you might want to add export DISPLAY=:0
in lenya.sh
, such
that the DISPLAY
variable is set during startup of Jetty, e.g.
# ----- Verify and Set Required Environment Variables ------------------------- if [ "$DISPLAY" = "" ] ; then export DISPLAY=:0 fi
Resource Icons
This module provides only one complete icon (the default one) out of the box.
The default icon (default_med.gif
) is a question mark. An "empty" version of
this icon (without the question mark) can be found in the core
(webapp/lenya/resources/images/icons/empty-icon.png
).
For all file extensions with no corresponding icon, an icon is generated
dynamically by adding the first three letters of the extension as a label
to the empty icon.
If you can provide icons with a ASF style license we are happy to add them to the module.
If you want your own set of icons, then please add them
to $PUB_HOME/lenya/modules/resource/resources/icons/
.
You can download and extract e.g. the icon package from Wyona in your publication:
https://svn.wyona.com/repos/public/lenya/modules-resource-icons.tar user: anonymous pass: anonymous
Have fun!