- 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.

  1. config; configuration files

    1. ac; access control (identitiy, group and roles; policies)

    2. doctypes; doctypes.xconf, samples and schemas

    3. menus; generic.xsp and links.xsp

    4. publishing; publisher.xconf
    5. search; lucene configuration
    6. tasks; tasks definitions in tasks.xconf and their properties in targets.xml

    7. workflow; workflow.xml
    8. publication.xconf XPatch files for Cocoon.xconf (to declare input modules, etc)

  2. content ---> your content here (XML Files)

    1. archive; archived files

    2. authoring; authoring files

    3. live; live files (published)

    4. rcml; revision control, for managing checkin/checkout of files
    5. rcbak; rc-backup of files. For archiving of back up files see ClearDown

    6. trash; where deleted files are stored
    7. workflow; holds a log history of the workflow
  3. java; publication specific java classes or libs

  4. lenya; files replacing core files

    1. content

      1. authoring
      2. publishing
    2. resources

    3. xslt

  5. logs (build) logs

  6. resources; static ressources, like css and images

    1. shared
      1. css

      2. images

  7. test; unittests (antteater and webtest)

  8. tools; tools, currently there's a clone app

  9. work; cache and working directory

  10. xslt; XSLT stylesheets


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

  1. admin
    • subtree-policy.acml
    • users
      1. alice.html
        • subtree-policy.acml
      2. anne.html
        • subtree-policy.acml
      3. lenya.html
        • subtree-policy.acml
      4. ludeditor.html
        • subtree-policy.acml
      5. renaud.html
        • subtree-policy.acml
      6. walter.html
        • subtree-policy.acml
  2. archive
    • subtree-policy.acml
  3. authoring
    • subtree-policy.acml
  4. index.html
    • url-policy.acml
  5. info
    • subtree-policy.acml
  6. introduction.html
    • subtree-policy.acml
  7. live
    • subtree-policy.acml
  8. trash
    • subtree-policy.acml
  9. url-policy.acml

config/doctypes

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

config/workflow

config/publication.xconf


content


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.


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.

  1. cache
  2. editor
  3. oneformeditor
  4. search
    1. lucene


xslt


doctypes.xmap

TODO

publication.xml

TODO

TODO

parameter-doctype.xmap

TODO

publication-tests.xml

TODO

usecase-bxeng.xmap

TODO

originally contributed by RenaudRichardet

OverviewLenyaPublication (last edited 2010-03-18 17:16:11 by DerSascha)