You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Apache Wiki <wi...@apache.org> on 2005/04/25 23:04:57 UTC

[Lenya Wiki] Update of "InsideLenyaPublication" by RenaudRichardet

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change notification.

The following page has been changed by RenaudRichardet:
http://wiki.apache.org/lenya/InsideLenyaPublication

New page:
## InsideLenyaPublication

- Target-audience: '''intermediate''' [[BR]]
- Target-role: '''Architect''' [wiki:ArchitectDesignerEditor more] [[BR]]
- Target-release: 1.2.2[[BR]]
- Doc-status: '''draft''' [[BR]]

===== 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 config]''';		configuration files
     1. '''ac''';	 				access control (identitiy, group and roles; policies)
     1. '''doctypes''';				doctypes.xconf, samples and schemas
     1. '''menus''';       			generic.xsp and links.xsp
     1. publishing;					publisher.xconf
     1. search;						lucene configuration
     1. '''tasks''';						tasks definitions in tasks.xconf and their properties in targets.xml
     1. workflow;					workflow.xml
     * '''publication.xconf'''		XPatch files for Cocoon.xconf (to declare input modules, etc)

   1. '''[#content content] '''--->	'''your content here (XML Files)'''
     1. '''archive''';				archived files
     1. '''authoring''';			authoring files
     1. '''live''';					live files (published)
     1. rcml;						revision control, for managing checkin/checkout of files
     1. rcbak;						rc-backup of files
     1. trash;						where deleted files are stored
     1. workflow;					holds a log history of the workflow

   1. '''[#java java]''';			publication specific java classes or libs

   1. '''[#lenya lenya]''';			files replacing core files
     1. '''content'''
       1. authoring
       1. publishing
     1. '''resources'''
     1. '''xslt'''

   1. [#logs logs]					(build) logs

   1. '''[#resources resources]''';	static ressources, like css and images
     1. shared
       1. '''css'''
       1. '''images'''

   1. [#test test];					unittests (antteater and webtest)

   1. [#tools tools];				tools, currently there's a clone app

   1. [#work work];					cache and working directory

   1. '''[#xslt xslt]'''; 			XSLT stylesheets

 [[BR]]

 * '''[#doctypes doctypes.xmap]'''
 * '''[#menus menus.xmap]'''
 * '''[#parameterdoctype parameter-doctype.xmap]''';		??
 * '''[#publication publication.xml]''';					meta-information about the pub. is shown when you enter the publication
 * '''[#publicationsitemap publication-sitemap.xmap]''';	main sitemap
 * [#publicationtests publication-tests.xml]				publication tests
 * [#publicationsitemap sitemap.xmap];					only mounts publication-sitemap.xmap

----



= The publication dissected =

[[Anchor(publicationsitemap)]]
== 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 [http://redarrow.textdrive.com/article/7/part-3-anatomy-of-the-pipeline here] under the header "The Lenya pipeline"

[[Anchor(config)]]
== config ==

Where the configuration files of the publication are stored.


=== config/ac ===

stands for AccessControl also see the [http://lenya.apache.org/docs/components/accesscontrol/terms.html 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
           1. users
             1. alice.html
               * subtree-policy.acml
             1. anne.html
               * subtree-policy.acml
             1. lenya.html
               * subtree-policy.acml
             1. ludeditor.html
               * subtree-policy.acml
             1. renaud.html
               * subtree-policy.acml
             1. walter.html
               * subtree-policy.acml
         1. archive
           * subtree-policy.acml
         1. authoring
           * subtree-policy.acml
         1. index.html
           * url-policy.acml
         1. info
           * subtree-policy.acml
         1. introduction.html
           * subtree-policy.acml
         1. live
           * subtree-policy.acml
         1. 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 [http://lenya.apache.org/1_2_x/components/tasks/concept.html the task concept]

=== config/workflow ===

 * workflow.xml

 see [http://lenya.apache.org/1_2_x/components/workflow/configuration.html the workflow configuration]

=== config/publication.xconf ===

 contains publication configuration, eg. [http://lenya.apache.org/1_2_x/components/multilingual/multilingual.html#publication.xconf language selection] and [http://lenya.apache.org/1_2_x/components/deployment/proxying.html#Configuration+in+publication.xconf proxying]

----

[[Anchor(content)]]
== content ==

 === content/archive ===

   * sitetree.xml

 === content/authoring ===

   1. concepts
	 * index_de.xml
	 * index_en.xml
   1. doctypes
	 * index_de.xml
	 1. xhtml-document
	   * index_de.xml
	   * index_en.xml
   1. features
	 * index_de.xml
	 * index_en.xml
   1. index
	 * index_de.xml
	 * index_en.xml
   1. intro
	 * index_en.xml
   1. ludicotest
	 * index_en.xml
   * sitetree.xml
   1. tutorial
	 * index_de.xml
	 * index_en.xml
	 1. new_doctype
	   * index_en.xml

 === content/live ===
   1. index
	 * index_en.xml
   1. ludicotest
	 * index_en.xml
   * sitetree.xml

 === content/rcbak ===

   1. content
	 1. authoring
	   1. index
		 * index_en.xml.bak.1114085410863
	   1. ludicotest
		 * index_en.xml.bak.1113924105953
		 * index_en.xml.bak.1113924375441
		 * index_en.xml.bak.1113924386797
		 * index_en.xml.bak.1113992891077

 === content/rcml ===

   1. content
	 1. authoring
	   1. index
		 * index_en.xml.rcml
	   1. intro
		 * index_en.xml.rcml
	   1. ludicotest
		 * index_en.xml.rcml

 === content/trash ===

   * sitetree.xml

 === content/workflow ===

 === content/doctypes.xmap ===

----

[[Anchor(java)]]
== 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?

----

[[Anchor(lenya)]]
== lenya ==

Files replacing core files.

 === lenya/content ===

     1. authoring
       * create-language.xsp
       * create.xsp				is displayed when you create a new content.
       * upload.xsp				is displayed when you upload a new content.
     1. publishing
       * publish-screen.xsp

 === lenya/resources ===

     1. i18n
       * cmsui.xml
       * cmsui_de.xml
       * cmsui_es.xml
       * cmsui_fr.xml
       * cmsui_it.xml

 === lenya/xslt ===

     1. authoring
       * create-language.xsl
       * create.xsl
     1. formeditor
       * homepage.xsl
       * xhtml-common.xsl
       * xhtml.xsl
     1. navigation
       * tabs.xsl

----

[[Anchor(logs)]]
== logs ==

Logs. Lenya stores here the logs of the publication-build process.

----

[[Anchor(ressources)]]
== ressources ==

----

[[Anchor(test )]]
== test ==

anteater and webtest files (tests.xml) come here

----

[[Anchor(tools)]]
== tools ==

currently, there is a clone utility.

----

[[Anchor(work)]]
== work ==

cache-directory, so nothing very interesting here.

 1. cache
 1. editor
 1. oneformeditor
 1. search
   1. lucene

----

[[Anchor(xslt)]]
== 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

----

[[Anchor(doctypes)]]
==  doctypes.xmap ==

TODO

[[Anchor(publication)]]
== publication.xml ==

TODO

[[Anchor(menus)]]
==  menus.xmap ==

TODO

[[Anchor(parameterdoctype)]]
== parameter-doctype.xmap ==

TODO

[[Anchor(publicationtests)]]
== publication-tests.xml ==

TODO

[[Anchor(usecasebxeng)]]
== usecase-bxeng.xmap ==

TODO



''originally contributed by RenaudRichardet''

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org