- Target-audience: intermediate
- Target-role: Architect more
- Target-release: 1.2.2
- Doc-status: draft
What you will get from this page
A presentation of the default Lenya publication internals. This should help you to build a PublicationFromScratchHowTo.
The big picture
Here an overview of the default publication (to be found in $LENYA-HOME/pubs). The most important files and directories are set in bold. The links will bring you to the detailled description.
config; configuration files
ac; access control (identitiy, group and roles; policies)
doctypes; doctypes.xconf, samples and schemas
menus; generic.xsp and links.xsp
- publishing; publisher.xconf
- search; lucene configuration
tasks; tasks definitions in tasks.xconf and their properties in targets.xml
- workflow; workflow.xml
publication.xconf XPatch files for Cocoon.xconf (to declare input modules, etc)
content ---> your content here (XML Files)
archive; archived files
authoring; authoring files
live; live files (published)
- rcml; revision control, for managing checkin/checkout of files
rcbak; rc-backup of files. For archiving of back up files see ClearDown
- trash; where deleted files are stored
- workflow; holds a log history of the workflow
java; publication specific java classes or libs
lenya; files replacing core files
content
- authoring
- publishing
resources
xslt
logs (build) logs
resources; static ressources, like css and images
- shared
css
images
- shared
test; unittests (antteater and webtest)
tools; tools, currently there's a clone app
work; cache and working directory
xslt; XSLT stylesheets
publication.xml; meta-information about the pub. is shown when you enter the publication
publication-sitemap.xmap; main sitemap
publication-tests.xml publication tests
sitemap.xmap; only mounts publication-sitemap.xmap
The publication dissected
sitemap.xmap and publication-sitemap.xmap
Let's start with the file sitemap.xmap, which only mounts publication-sitemap.xmap. In publication-sitemap.xmap, the
There's a good explanation of this pipeline here under the header "The Lenya pipeline"
config
Where the configuration files of the publication are stored.
config/ac
stands for AccessControl also see the basic terms
config/ac/password
where the identity, groups and roles are stored
config/ac/users
Have a look at our dear Alice (alice.'''iml'''} = identity markup language).
<identity id="alice" class="org.apache.lenya.ac.file.FileUser">
<name>Alice</name>
<description></description>
<email>alice@lenya.org</email>
<password type="md5">8e07dafd13495561db9063ebe4db4b27</password>
<groups>
<group>editor</group>
<group>reviewer</group>
</groups>
</identity>Then create a new user (eg. ruppert)in the admin-area of your lenya-publication. It should then appear as ruppert.iml
config/ac/groups
groups saved as gml (group markup language)
<group class="org.apache.lenya.ac.file.FileGroup" id="reviewer"/>
to hardcode a new group, create a new .gml file (eg. designer) and replace the id with "designer". You could then add this group to Alice by editing alice.iml.
<groups>
<group>editor</group>
<group>reviewer</group>
<group>designer</group>
</groups>
config/ac/roles
finally, the roles are saved as .rml (role markup language), eg. review.rml
<role class="org.apache.lenya.ac.file.FileRole" id="review"/>
TODO: can we hardcore new roles the same way as groups ?
config/policies
- admin
- subtree-policy.acml
- users
- alice.html
- subtree-policy.acml
- anne.html
- subtree-policy.acml
- lenya.html
- subtree-policy.acml
- ludeditor.html
- subtree-policy.acml
- renaud.html
- subtree-policy.acml
- walter.html
- subtree-policy.acml
- alice.html
- archive
- subtree-policy.acml
- authoring
- subtree-policy.acml
- index.html
- url-policy.acml
- info
- subtree-policy.acml
- introduction.html
- subtree-policy.acml
- live
- subtree-policy.acml
- trash
- subtree-policy.acml
- url-policy.acml
- usecase-policies.xml
config/doctypes
- doctypes.xconf
- samples
- schema all dublincore and xhtml schemas (.rng)
config/menus
To add a new menu item like "New MyDocType" to the File menu, you add a line like to yourpub/config/menus/generic.xsp:
<xsp:logic>
{
if (Publication.ARCHIVE_AREA.equals(area) ||
Publication.TRASH_AREA.equals(area)) {
<item><i18n:text>New Document</i18n:text></item>
}
else {
<item uc:usecase="create" uc:step="showscreen"
href="?doctype=xhtml"><i18n:text>New Document</i18n:text></item>
<item uc:usecase="create" uc:step="showscreen"
href="?doctype=yourDocType"><i18n:text>New yourDocType
</i18n:text></item>
<!-- add this line, changing the parameters for your doctype -->
}
}
</xsp:logic>
config/publishing
config/search
config/tasks
- targets.xml
- tasks.xconf
see the task concept
config/workflow
- workflow.xml
config/publication.xconf
contains publication configuration, eg. language selection and proxying
content
- === content/archive ===
- sitetree.xml
- concepts
- index_de.xml
- index_en.xml
- doctypes
- index_de.xml
- xhtml-document
- index_de.xml
- index_en.xml
- features
- index_de.xml
- index_en.xml
- index
- index_de.xml
- index_en.xml
- intro
- index_en.xml
- ludicotest
- index_en.xml
- sitetree.xml
- tutorial
- index_de.xml
- index_en.xml
- new_doctype
- index_en.xml
- index
- index_en.xml
- ludicotest
- index_en.xml
- sitetree.xml
- content
- authoring
- index
- index_en.xml.bak.1114085410863
- ludicotest
- index_en.xml.bak.1113924105953
- index_en.xml.bak.1113924375441
- index_en.xml.bak.1113924386797
- index_en.xml.bak.1113992891077
- index
- authoring
- content
- authoring
- index
- index_en.xml.rcml
- intro
- index_en.xml.rcml
- ludicotest
- index_en.xml.rcml
- index
- authoring
- sitetree.xml
java
That's where you put your publication specific classes.
By default, there are 2 classes in the package org.apache.lenya.defaultpub.cms.task (publish.java and deactivate.java)
TODO: who calls thoses classes?
lenya
Files replacing core files.
- === lenya/content ===
- authoring
- create-language.xsp
- create.xsp is displayed when you create a new content.
- upload.xsp is displayed when you upload a new content.
- publishing
- publish-screen.xsp
- i18n
- cmsui.xml
- cmsui_de.xml
- cmsui_es.xml
- cmsui_fr.xml
- cmsui_it.xml
- authoring
- create-language.xsl
- create.xsl
- formeditor
- homepage.xsl
- xhtml-common.xsl
- xhtml.xsl
- navigation
- tabs.xsl
- authoring
logs
Logs. Lenya stores here the logs of the publication-build process.
ressources
test
anteater and webtest files (tests.xml) come here
tools
currently, there is a clone utility.
work
cache-directory, so nothing very interesting here.
- cache
- editor
- oneformeditor
- search
- lucene
xslt
- homepage2xhtml.xsl
- lenya-header.xsl
- links2xhtml.xsl
- page2xhtml-homepage.xsl
- page2xhtml-links.xsl
- page2xhtml-xhtml.xsl
- page2xhtml.xsl
- toDoc.xsl
- upload-generic.xsl
- upload.xsl
- xhtml2xhtml.xsl
doctypes.xmap
TODO
publication.xml
TODO
menus.xmap
TODO
parameter-doctype.xmap
TODO
publication-tests.xml
TODO
usecase-bxeng.xmap
TODO
originally contributed by RenaudRichardet