SlideShare a Scribd company logo
What‘s
new
in
Apache
Lenya
1.4?

           
Andreas
Hartmann
            BeCompany
GmbH




                               1
Agenda

Modularization
UUIDs
for
internal
links
Repository
API
changes
Configurable
Meta
Data
Publication
Templating
Usecase
Framework
Notification
and
Inboxes



                           2
Modularization




                 3
Goals
of
Modularization

• Improve
Separation
of
Concerns
• Reuse
functionality
• Loose
coupling
of
functional
areas
• Better
maintainability
• Reduce
learning
curve
• Easier
extensibility




                                       4
Modularization
Module




                            Module
             Editor X                                  ...
                                     Resource Type A
         Integration Code



         Foo Service API
Module




                            Module
                                        Alternative    ...
                                         Foo Impl
         Default Foo Impl


                                     API
Core




                                     Impl



                                                             5
Module
Deployment

cocoon.xconf
modules.root.dirs=src/modules: 
                  src/webapp/lenya/pubs/default/modules: 
                  /home/john/lenya/modules

modules.copy=false




                                                             6
Directory
Structure
mymodule/
  config/                  configuration files
    module.xml             module descriptor
    cocoon-xconf/          patches for cocoon.xconf
      services.xconf
    sitemap/               patches for main Lenya sitemap
      transformers.xconf
  usecases/
    myusecase.jx           usecase view
  resources/
    images/                image files
    css/                   CSS files
    schemas/               XML schemas (RNG, XSD, ...)
    samples/               Samples (in case of resource type modules)
  java/
    src/                   Java   source files
    test/                  Java   test classes
    lib/                   Java   libraries
  xslt/                    XSLT   stylesheets
  sitemap.xmap             main   module sitemap




                                                                        7
Modularization
Descriptor
of
the
access
control
module
<module xmlns=quot;http://apache.org/lenya/module/1.0quot;>
  <id>org.apache.lenya.modules.ac</id>
  <export package=quot;org.apache.lenya.ac.filequot;/>
  <depends module=quot;org.apache.lenya.modules.cachequot;/>
  <package>org.apache.lenya.modules</package>
  <version>0.1-dev</version>
  <name>Access control</name>
  <lenya-version>@lenya.version@</lenya-version>
  <description>Access control</description>
</module>




                                                       8
Module
API
 Stable

                                   org.project.foo.*
              Foo Service API
     Module




                                   org.project.foo.impl.*
              Default Foo Impl
                                   org.project.foo.util.*
                                   org.otherproject.*
Subject
to

 Change
                 <module>
                   ...
                   <export package=quot;org.project.fooquot;/>
                   ...
                 </module>




                                                            9
Module
Dependencies
Foo   <module>
        <id>org.project.modules.foo</id>
        <export package=quot;org.project.fooquot;/>
      </module>

Bar   <module>
        <id>com.company.modules.bar</id>
        <depends module=quot;org.project.modules.fooquot;/>
      </module>
                   package com.company.bar;

                   import org.project.foo.*;
                   import org.project.foo.impl.*;

                   class SomeService { ...




                                                      10
Requests
to
Module
Sitemaps


• cocoon://modules/foo/...

• http://.../index.html?lenya.module=foo

• http://.../modules/foo/...

• http://.../mypub/modules/foo/...




                                           11
Next
Steps

• Requirements
  • Easy
installation
  • Hot-deploying
modules
  • Versioning
of
modules
• Approaches
  • Maven
  • OSGi




                            12
UUIDs
for
internal
links




                           13
What
is
a
UUID?

• Universally
Unique
Identifier
• Standardized
by
the
Open
Software
Foundation
• Canonical
form:
32
hexadecimal
digits
  550e8400-e29b-41d4-a716-446655440000
• Neglectable
risk
of
duplicates:
UUID-based

  collections
can
be
combined
without
problems




                                                 14
Advantages
of
UUIDs


• Separation
of
Concerns:
No
duplication
of
URL

  information
(sitetree
and
document
path)
• No
need
to
copy/move
files
when
URLs
change
• No
need
for
link
rewriting
when
URLs
change
• Multiple
views
(URL
spaces)
for
document
space
• Document
collections
can
be
combined
(import)




                                                   15


           <<interface>> LinkResolver                            Link
MODE_DEFAULT_LANGUAGE                                  getUri() : String
MODE_FAIL                                              getPubId() : String
                                                       getArea() : String
resolve(sourceDocument, uri) : LinkTarget
                                                       getUuid() : String
getFallbackMode() : int
                                                       getLanguage() : String
setFallbackMode(int)


           <<interface>> LinkManager                         LinkTarget
getLinksFrom(sourceDocument) : Link[]             exists() : boolean
getReferencingDocuments(targetDoc) : Document[]   getDocument() : document
                                                  isRevisionSpecified() : boolean
                                                  getRevisionNumber() : int

ContentLinkManager

                                                      UuidToUrlRewriter

              <<interface>>                         OutgoingLinkRewriter
              LinkRewriter
                                                    IncomingLinkRewriter
          matches(url) : boolean
          rewrite(url) : String
                                                      UrlToUuidRewriter


                                                                                    16
Link
Transformers


• UuidToUrlTransformer
  • urls
=
absolute
|
relative
• ProxyTransformer
• IncomingProxyTransformer
• UrlToUuidTransformer




                                 17
Next
Steps



• More
efficient
LinkManager
implementations
  • Based
on
meta
data?




                                               18
Repository
API
Changes




                         19
Content
Handling
Layers
Modules
              CollectionWrapper            AddNewsMessage



Lenya Core
                             Publication


                                  Area                      SiteStructure


                             Document          Link          SiteNode



Repository
             Session              Node          History


                             MetaData



                                                                            20


   <<interface>>                          <<interface>> MetaDataOwner
      Session
commit()
rollback()
                                          <<interface>> ContentHolder
                               exists() : boolean
           *
                               getContentLength() : long
   <<interface>>               getInputStream() : InputStream
  RepositoryItem               getlastModified() : long
                               getMimeType() : String
                               getSourceURI() : String




                      <<interface>> Node
             checkin(), checkout()                                      SourceNode
             lock(), unlock()
             exists() : boolean
             delete()
             getChildren() : Collection                             JCRSourceNode
             getHistory() : History



                                                                                     21
<<interface>> SiteStructure
               <<interface>>
                                          getNodes() : SiteNode[]
                Publication
                                          getNode(path) : SiteNode
         getAreaNames() : String[]        getByUuid(uuid, language) : Link
         getArea(String) : Area           contains(path) : boolean
                                          contains(path, language) : boolean
                                          containsByUuid(uuid, language) : booelan
                       *                  add(path) : SiteNode
                                          add(path, Document) : Link
            <<interface>> Area
getDocuments() : Document[]
                                                                  *
getDocument(uuid, language) : Document              <<interface>> SiteNode
contains(uuid, language) : boolean
                                                getUuid() : String
getSite() : SiteStructure
                                                getChildren() : SiteNode[]
                                                hasLink(language) : boolean
                                                getLink(language) : Link
                       *                        isVisible() : boolean
               <<interface>>                    setVisible(boolean)
                 Document
                                                                  *
    getUUID() : String
                                                      <<interface>> Link
    getLanguages() : String[]
    getTranslation(String) : Document           getLanguage() : String
    getRepositoryNode() : Node                  getLabel() : String
                                         0..1
    getInputStream() : InputStream              setLabel(String)
    getOutputStream() : OutputStream            getDocument() : Document


                                                                                     22


                              <<interface>> Collection
                    getDocuments() : Document[]
                    add(Document)
                    remove(Document)
                    clear()
                    contains(Document) : boolean




                                  CollectionWrapper
   <<interface>>        checkin(), checkout()
     Document           lock(), unlock()
                        exists() : boolean
getInputStream()
                        delete()
                                                          <<interface>> Usecase
getOutputStream()
                        getChildren() : Collection
                        getHistory() : History           execute()



                                     NewsWrapper            AddNewsMessage
                        addNewsMessage(NewsMessage)      execute()




                                                                                  23
Next
Steps



• Queryable
meta
data
    String xPath = “*[@media:width &gt; 100]“;
    Query query = new XPathQuery(xPath);
    Document[] docs = area.getDocuments(query);




                                                  24
Code
Example
public void addNewsDocument(String newsPath, String uuid, String language) {

    Session session = RepositoryUtil.getSession(this.manager, this.request);
    DocumentFactory factory
        = DocumentUtil.getDocumentFactory(this.manager, this.request);

    String webappUrl = ServletHelper.getWebappUrl(this.request);
    URLInformation info = new URLInformation(webappUrl);
    Publication pub = factory.getPublication(info.getPublicationId());

    Area authoring = pub.getArea(„authoring“);
    Document[] docs = authoring.getDocuments();
    Document messageDoc = authoring.getDocument(uuid, language);

    SiteStructure site = authoring.getSite();
    SiteNode node = site.getNode(newsPath);
    String[] languages = node.getLanguages();
    Link link = node.getLink(language);
    Document newsDoc = link.getDocument();

    NewsWrapper newsWrapper = new NewsWrapper(newsDoc, getLogger());
    wrapper.add(0, messageDoc);
}


                                                                               25
Configurable
Meta
Data




                         26


              <<interface>>                      <<interface>> MetaDataRegistry
             MetaDataOwner
                                            getElementSet(namespaceUri) : ElementSet
getMetaData(namespaceUri) : MetaData        getNamespaceUris() : String[]
getMetaDataNamespaceUris() : String[]       register(namespaceUri, elementSet)
                                            isRegistered(namespaceUri) : boolean

                       *
                                                                   *
              <<interface>>
                                                    <<interface>> ElementSet
                MetaData
                                                getNamespaceUri() : String
getAvailableKeys()
                                                getElements() : Element[]
addValue(key, value)
                                                getElement(name) : element
setValue(key, value)
                                                containsElement(name) : boolean
getValues(key)

                                                                   *
                                                      <<interface>> Element
                                                     ONCOPY_COPY
                                                     ONCOPY_DELETE
                                                     ONCOPY_IGNORE
                                                     getName() : String
                                                     isEditable() : String
                                                     isMultiple() : String
                                                     getActionOnCopy() : int



                                                                                       27
Meta-Data
Code
Example
<meta-data>
  ...
  <component-instance
      name=quot;http://apache.org/lenya/metadata/media/1.0quot;
      class=quot;org.apache.lenya.cms.metadata.ConfigurableElementSetquot;>
    <element name=quot;filenamequot; multiple=quot;falsequot;/>
    <element name=quot;widthquot; multiple=quot;falsequot;/>
    <element name=quot;heightquot; multiple=quot;falsequot;/>
  </component-instance>
  ...
</meta-data>


String mediaNamespace = quot;http://apache.org/lenya/metadata/media/1.0quot;;
MetaData metaData = document.getMetaData(mediaNamespace);
String width = metaData.getFirstValue(quot;widthquot;);




                                                                        28
Publication
Templating




                         29
Chemistry

       Math

                 Science
      Physics


      Biology
                                          


                             University




      English


      French

     Spanish
                 Languages




      Italian
30
Overriding
Resources
                                                  @import ...

University
                XSLT A          XSLT B     main.css     head.css



 Science
                XSLT A          XSLT B'    main.css     head.css



   Physics
                XSLT A          XSLT B''   main.css     head.css



                 <xsl:import>



                                                                   31
Templating
API

          <<interface>>                                    <<interface>>
           Instantiator                             PublicationTemplateManager
instantiate(templatePub, id, name)       visit(publication, publicationVisitor)
                                         visit(publication, path, sourceVisitor)


        <<interface>>                      <<interface>>                    <<interface>>
        SourceVisitor                 VisitingSourceResolver              PublicationVisitor
visit(resolver, sourceUri)           getSource() : Source                visit(publication)


                                                                ExistingSourceResolver
AllExistingSourceResolver
getUris() : String[]                                        ExistingAncestorSourceResolver




                                                                                               32
Publication
and
Source
Visitors
• Bottom-up
traversal
of
publication
tree
• PublicationVisitor
  General
purpose
• ExistingSourceResolver
-
fallback://
  Find
first
existing
source
• ExistingAncestorSourceResolver
-
template-fallback://
  Find
second
existing
source
(works
only
for
leaf
source!)
• AllExistingSourceResolver
-
aggregate-fallback://
  Find
all
existing
sources



                                                              33
Usecase
Framework




                    34
Usecases

• User
interaction
  • Typically
form-based
  • Edit
and
manage
content
  • Interact
with
other
applications
(newsletter)
  • Functionality
for
website
visitors
(contact
form)
  • ...
• Triggered
using
a
request
parameter
(lenya.usecase)
• Full
screen
or
document-based




                                                        35

                           continuation

                               Form                   Form



                                      !                       !
                           Template                Template
     View


             Sitemap + Flowscript
Controller
                               !
             Usecase Handler

                                           vali-
                                          dation
                  Documents, ...                         Documents, ...
   Model




                                                                                 36
Declaring
a
Usecase
<component-instance name=quot;site.createquot;
    class=quot;o.a.lenya.cms.site.usecases.CreateDocumentquot;>

  <view template=quot;modules/.../usecases/site/create.jxquot;>
    <parameter name=“...“ value=“...“/>
  </view>

  <parameter name=“...“ value=“...“/>
  <parameter name=“...“ value=“...“/>

  <transaction policy=“pessimistic“/>
  <exit usecase=“...“>
    <parameter name=“...“ value=“...“/>
  </exit>

</component-instance>


                                                          37
Example
Usecase:
        <<interface>>
           Usecase

                                          Contact
Form
initParameters()
checkPreconditions()
advance()
checkExecutionConditions()
execute()
                                                <<interface>>
checkPostconditions()
                                                UserManager
                                      getUser(userId) : User
      AbstractUsecase
                                                <<interface>>
                                                   Notifier
                                      notify(recipients, sender, message)
        ContactForm




                             MailNotifier        SmsNotifier          InboxNotifier



                                                                                      38
Notification
and

    Inboxes




                    39


         <<interface>>                    <<interface>>                       RepositoryEvent
            Notifier                    RepositoryListener
                                                                         getDescriptor() : Object
       notify(message)              eventFired(RepositoryEvent)


                                                                                   Object

        AbstractNotifier               NotificationListener
notify(message)
                                                                       NotificationEventDescriptor
notify(user, translatedMessage)
translateMessage(locale, message)
                                                                       getMessage() : Message



                                                                                Message
                                                                  getSender() : Identifiable
   EmailNotifier
                                                                  getSubject() : String
                                                                  getSubjectParameters() : String[]
                   InboxNotifier
                                                                  getBody() : String
                                                                  getBodyParameters() : String[]
                                                                  getTime() : Date




                                                                                                      40
Creating
a
Message
User recipient = userManager.getUser(userId);
Identifiable[] recipients = { recipient };

String subject = quot;publish-notificationquot;;
String[] subjectParams = {};

String body = quot;document-was-publishedquot;
String[] bodyParams = {
    DublinCoreHelper.getTitle(document) };

Message message = new Message(subject,
                              subjectParams,
                              body,
                              bodyParams,
                              sender,
                              recipients);


                                                41
Sending
Notification
Messages
a)
Directly
   • Immediate
notification
    NotificationUtil.notify(this.manager, message);



b)
Via
repository
observation
  • Notification
when
(if)
session
is
committed
    NotificationEventDescriptor descriptor
        = new NotificationEventDescriptor(message);
    RepositoryEvent event = RepositoryEventFactory
        .createEvent(this.manager, authoringDocument,
                     getLogger(), descriptor);
    getSession().enqueueEvent(event);



                                                        42
Inbox
API
        <<interface>>
        InboxManager
getInbox(User) : Inbox


        <<interface>>
            Inbox
getMessages() : InboxMessage[]
getMessage(id) : InboxMessage
add(message)
remove(message)


                 *
                                               Message
        <<interface>>
        InboxMessage             getSender() : Identifiable
                                 getSubject() : String
getId() : String
                                 getSubjectParameters() : String[]
getMessage() : Message
                                 getBody() : String
isMarkedAsRead() : boolean
                                 getBodyParameters() : String[]
markAsRead(boolean)
                                 getTime() : Date


                                                                     43
Configuring
Notification

cocoon.xconf

Lenya
Inbox:
<component logger=quot;lenya.notificationquot;
    role=quot;org.apache.lenya.notification.Notifierquot;
    class=quot;org.apache.lenya.inbox.InboxNotifierquot;/>


E-Mail:
<component logger=quot;lenya.notificationquot;
    role=quot;org.apache.lenya.notification.Notifierquot;
    class=quot;org.apache.lenya.notification.EmailNotifierquot;>
  <smtp host=quot;localhostquot; username=quot;johnquot; password=quot;...quot;/>
</component>




                                                            44
Questions
and

 Discussion




                 45

More Related Content

What's hot

Symfony without the framework
Symfony without the frameworkSymfony without the framework
Symfony without the framework
GOG.com dev team
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Alexander Klimetschek
 
Making Things Work Together
Making Things Work TogetherMaking Things Work Together
Making Things Work Together
Subbu Allamaraju
 
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Jagadish Prasath
 
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
IndicThreads
 
Jsf
JsfJsf
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
tutorialsruby
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shintd_mxc_rubyrails_shin
td_mxc_rubyrails_shin
tutorialsruby
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
Siarzh Miadzvedzeu
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
Oscar Merida
 
Ant_quick_guide
Ant_quick_guideAnt_quick_guide
Ant_quick_guide
ducquoc_vn
 
Security and performance designs for client-server communications
Security and performance designs for client-server communicationsSecurity and performance designs for client-server communications
Security and performance designs for client-server communications
WO Community
 
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A TourREST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A Tour
Carl Brown
 
GR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM OptimizationGR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM Optimization
GR8Conf
 
Jsp Notes
Jsp NotesJsp Notes
Jsp Notes
Rajiv Gupta
 
Jython: Python para la plataforma Java (EL2009)
Jython: Python para la plataforma Java (EL2009)Jython: Python para la plataforma Java (EL2009)
Jython: Python para la plataforma Java (EL2009)
Leonardo Soto
 
Rapid prototyping search applications with solr
Rapid prototyping search applications with solrRapid prototyping search applications with solr
Rapid prototyping search applications with solr
Lucidworks (Archived)
 
Aimaf
AimafAimaf
Aimaf
Saad RGUIG
 
Jython: Python para la plataforma Java (JRSL 09)
Jython: Python para la plataforma Java (JRSL 09)Jython: Python para la plataforma Java (JRSL 09)
Jython: Python para la plataforma Java (JRSL 09)
Leonardo Soto
 

What's hot (20)

Symfony without the framework
Symfony without the frameworkSymfony without the framework
Symfony without the framework
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
 
Making Things Work Together
Making Things Work TogetherMaking Things Work Together
Making Things Work Together
 
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
Java EE 6 - Deep Dive - Indic Threads, Pune - 2010
 
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
 
Jsf
JsfJsf
Jsf
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shintd_mxc_rubyrails_shin
td_mxc_rubyrails_shin
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Ant_quick_guide
Ant_quick_guideAnt_quick_guide
Ant_quick_guide
 
Security and performance designs for client-server communications
Security and performance designs for client-server communicationsSecurity and performance designs for client-server communications
Security and performance designs for client-server communications
 
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A TourREST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A Tour
 
GR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM OptimizationGR8Conf 2011: GORM Optimization
GR8Conf 2011: GORM Optimization
 
Jsp Notes
Jsp NotesJsp Notes
Jsp Notes
 
Jython: Python para la plataforma Java (EL2009)
Jython: Python para la plataforma Java (EL2009)Jython: Python para la plataforma Java (EL2009)
Jython: Python para la plataforma Java (EL2009)
 
Rapid prototyping search applications with solr
Rapid prototyping search applications with solrRapid prototyping search applications with solr
Rapid prototyping search applications with solr
 
Aimaf
AimafAimaf
Aimaf
 
Jython: Python para la plataforma Java (JRSL 09)
Jython: Python para la plataforma Java (JRSL 09)Jython: Python para la plataforma Java (JRSL 09)
Jython: Python para la plataforma Java (JRSL 09)
 

Viewers also liked

Mercedes Benz
Mercedes BenzMercedes Benz
Mercedes Benzpluszowyy
 
Ww2 tanks
Ww2 tanksWw2 tanks
Ww2 tanks
sgtjoe
 
Pr Meets The Blogs
Pr Meets The BlogsPr Meets The Blogs
Pr Meets The Blogs
Cristian Manafu
 
Building An Open Progressive Community
Building An Open Progressive CommunityBuilding An Open Progressive Community
Building An Open Progressive Community
Foot Print Strategies Inc.
 
Dansedu Handen
Dansedu HandenDansedu Handen
Dansedu Handenfilipb
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push Notifications
Mike Willbanks
 
Augmented Reality with Open Source Software
Augmented Reality with Open Source SoftwareAugmented Reality with Open Source Software
Augmented Reality with Open Source Software
nobby
 
RabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = AwesomeRabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = Awesome
Lenz Gschwendtner
 
Aula 01 IntroduçãO E MéTodos
Aula 01   IntroduçãO E MéTodosAula 01   IntroduçãO E MéTodos
Aula 01 IntroduçãO E MéTodos
ProfGilson Malta
 
Why databases suck for messaging
Why databases suck for messagingWhy databases suck for messaging
Why databases suck for messaging
Rabbit MQ
 
Notification Framework
Notification FrameworkNotification Framework
Notification Framework
Sokna Ly
 
Weather British Weather And Climate
Weather   British Weather And ClimateWeather   British Weather And Climate
Weather British Weather And Climate
john.payne
 
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
将之 小野
 
Microservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web ServicesMicroservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web Services
Amazon Web Services
 

Viewers also liked (14)

Mercedes Benz
Mercedes BenzMercedes Benz
Mercedes Benz
 
Ww2 tanks
Ww2 tanksWw2 tanks
Ww2 tanks
 
Pr Meets The Blogs
Pr Meets The BlogsPr Meets The Blogs
Pr Meets The Blogs
 
Building An Open Progressive Community
Building An Open Progressive CommunityBuilding An Open Progressive Community
Building An Open Progressive Community
 
Dansedu Handen
Dansedu HandenDansedu Handen
Dansedu Handen
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push Notifications
 
Augmented Reality with Open Source Software
Augmented Reality with Open Source SoftwareAugmented Reality with Open Source Software
Augmented Reality with Open Source Software
 
RabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = AwesomeRabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = Awesome
 
Aula 01 IntroduçãO E MéTodos
Aula 01   IntroduçãO E MéTodosAula 01   IntroduçãO E MéTodos
Aula 01 IntroduçãO E MéTodos
 
Why databases suck for messaging
Why databases suck for messagingWhy databases suck for messaging
Why databases suck for messaging
 
Notification Framework
Notification FrameworkNotification Framework
Notification Framework
 
Weather British Weather And Climate
Weather   British Weather And ClimateWeather   British Weather And Climate
Weather British Weather And Climate
 
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
What's New in User Notifications Framework - WWDC16. Meetup @Wantedly with 日本...
 
Microservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web ServicesMicroservices Architectures on Amazon Web Services
Microservices Architectures on Amazon Web Services
 

Similar to What's New In Apache Lenya 1.4

symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
patter
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
Plain Black Corporation
 
Headless Drupal en pratique
Headless Drupal en pratiqueHeadless Drupal en pratique
Headless Drupal en pratique
Simon Morvan
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSF
Jiayun Zhou
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
Arun Gupta
 
Creating your own framework on top of Symfony2 Components
Creating your own framework on top of Symfony2 ComponentsCreating your own framework on top of Symfony2 Components
Creating your own framework on top of Symfony2 Components
Deepak Chandani
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Knolx session
Knolx sessionKnolx session
Knolx session
Knoldus Inc.
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
Chalermpon Areepong
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault Injection
Cloudera, Inc.
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
mirrec
 
Java Future S Ritter
Java Future S RitterJava Future S Ritter
Java Future S Ritter
catherinewall
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For Managers
AgileThought
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
Mark A
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)
Eugenio Minardi
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
Hugo Hamon
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
Sivakumar Thyagarajan
 
Implementing a build manager in Ada
Implementing a build manager in AdaImplementing a build manager in Ada
Implementing a build manager in Ada
Stephane Carrez
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
Sadayuki Furuhashi
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
Arun Gupta
 

Similar to What's New In Apache Lenya 1.4 (20)

symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
 
Headless Drupal en pratique
Headless Drupal en pratiqueHeadless Drupal en pratique
Headless Drupal en pratique
 
Java EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSFJava EE 6 CDI Integrates with Spring & JSF
Java EE 6 CDI Integrates with Spring & JSF
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Creating your own framework on top of Symfony2 Components
Creating your own framework on top of Symfony2 ComponentsCreating your own framework on top of Symfony2 Components
Creating your own framework on top of Symfony2 Components
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault Injection
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
Java Future S Ritter
Java Future S RitterJava Future S Ritter
Java Future S Ritter
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For Managers
 
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
BizSpark SF Lightning Talk: "Automated Testing (Unit, Integration and Systems...
 
Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)Web automation with #d8rules (European Drupal Days 2015)
Web automation with #d8rules (European Drupal Days 2015)
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
 
Implementing a build manager in Ada
Implementing a build manager in AdaImplementing a build manager in Ada
Implementing a build manager in Ada
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
Pixlogix Infotech
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website20 Comprehensive Checklist of Designing and Developing a Website
20 Comprehensive Checklist of Designing and Developing a Website
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

What's New In Apache Lenya 1.4

  • 1. What‘s
new
in Apache
Lenya
1.4? 
Andreas
Hartmann BeCompany
GmbH 1
  • 4. Goals
of
Modularization • Improve
Separation
of
Concerns • Reuse
functionality • Loose
coupling
of
functional
areas • Better
maintainability • Reduce
learning
curve • Easier
extensibility 4
  • 5. Modularization Module Module Editor X ... Resource Type A Integration Code Foo Service API Module Module Alternative ... Foo Impl Default Foo Impl API Core Impl 5
  • 6. Module
Deployment cocoon.xconf modules.root.dirs=src/modules: src/webapp/lenya/pubs/default/modules: /home/john/lenya/modules modules.copy=false 6
  • 7. Directory
Structure mymodule/ config/ configuration files module.xml module descriptor cocoon-xconf/ patches for cocoon.xconf services.xconf sitemap/ patches for main Lenya sitemap transformers.xconf usecases/ myusecase.jx usecase view resources/ images/ image files css/ CSS files schemas/ XML schemas (RNG, XSD, ...) samples/ Samples (in case of resource type modules) java/ src/ Java source files test/ Java test classes lib/ Java libraries xslt/ XSLT stylesheets sitemap.xmap main module sitemap 7
  • 8. Modularization Descriptor
of
the
access
control
module <module xmlns=quot;http://apache.org/lenya/module/1.0quot;> <id>org.apache.lenya.modules.ac</id> <export package=quot;org.apache.lenya.ac.filequot;/> <depends module=quot;org.apache.lenya.modules.cachequot;/> <package>org.apache.lenya.modules</package> <version>0.1-dev</version> <name>Access control</name> <lenya-version>@lenya.version@</lenya-version> <description>Access control</description> </module> 8
  • 9. Module
API Stable org.project.foo.* Foo Service API Module org.project.foo.impl.* Default Foo Impl org.project.foo.util.* org.otherproject.* Subject
to
 Change <module> ... <export package=quot;org.project.fooquot;/> ... </module> 9
  • 10. Module
Dependencies Foo <module> <id>org.project.modules.foo</id> <export package=quot;org.project.fooquot;/> </module> Bar <module> <id>com.company.modules.bar</id> <depends module=quot;org.project.modules.fooquot;/> </module> package com.company.bar; import org.project.foo.*; import org.project.foo.impl.*; class SomeService { ... 10
  • 12. Next
Steps • Requirements • Easy
installation • Hot-deploying
modules • Versioning
of
modules • Approaches • Maven • OSGi 12
  • 14. What
is
a
UUID? • Universally
Unique
Identifier • Standardized
by
the
Open
Software
Foundation • Canonical
form:
32
hexadecimal
digits 550e8400-e29b-41d4-a716-446655440000 • Neglectable
risk
of
duplicates:
UUID-based
 collections
can
be
combined
without
problems 14
  • 15. Advantages
of
UUIDs
 • Separation
of
Concerns:
No
duplication
of
URL
 information
(sitetree
and
document
path) • No
need
to
copy/move
files
when
URLs
change • No
need
for
link
rewriting
when
URLs
change • Multiple
views
(URL
spaces)
for
document
space • Document
collections
can
be
combined
(import) 15
  • 16. <<interface>> LinkResolver Link MODE_DEFAULT_LANGUAGE getUri() : String MODE_FAIL getPubId() : String getArea() : String resolve(sourceDocument, uri) : LinkTarget getUuid() : String getFallbackMode() : int getLanguage() : String setFallbackMode(int) <<interface>> LinkManager LinkTarget getLinksFrom(sourceDocument) : Link[] exists() : boolean getReferencingDocuments(targetDoc) : Document[] getDocument() : document isRevisionSpecified() : boolean getRevisionNumber() : int ContentLinkManager UuidToUrlRewriter <<interface>> OutgoingLinkRewriter LinkRewriter IncomingLinkRewriter matches(url) : boolean rewrite(url) : String UrlToUuidRewriter 16
  • 17. Link
Transformers • UuidToUrlTransformer • urls
=
absolute
|
relative • ProxyTransformer • IncomingProxyTransformer • UrlToUuidTransformer 17
  • 20. Content
Handling
Layers Modules CollectionWrapper AddNewsMessage Lenya Core Publication Area SiteStructure Document Link SiteNode Repository Session Node History MetaData 20
  • 21. <<interface>> <<interface>> MetaDataOwner Session commit() rollback() <<interface>> ContentHolder exists() : boolean * getContentLength() : long <<interface>> getInputStream() : InputStream RepositoryItem getlastModified() : long getMimeType() : String getSourceURI() : String <<interface>> Node checkin(), checkout() SourceNode lock(), unlock() exists() : boolean delete() getChildren() : Collection JCRSourceNode getHistory() : History 21
  • 22. <<interface>> SiteStructure <<interface>> getNodes() : SiteNode[] Publication getNode(path) : SiteNode getAreaNames() : String[] getByUuid(uuid, language) : Link getArea(String) : Area contains(path) : boolean contains(path, language) : boolean containsByUuid(uuid, language) : booelan * add(path) : SiteNode add(path, Document) : Link <<interface>> Area getDocuments() : Document[] * getDocument(uuid, language) : Document <<interface>> SiteNode contains(uuid, language) : boolean getUuid() : String getSite() : SiteStructure getChildren() : SiteNode[] hasLink(language) : boolean getLink(language) : Link * isVisible() : boolean <<interface>> setVisible(boolean) Document * getUUID() : String <<interface>> Link getLanguages() : String[] getTranslation(String) : Document getLanguage() : String getRepositoryNode() : Node getLabel() : String 0..1 getInputStream() : InputStream setLabel(String) getOutputStream() : OutputStream getDocument() : Document 22
  • 23. <<interface>> Collection getDocuments() : Document[] add(Document) remove(Document) clear() contains(Document) : boolean CollectionWrapper <<interface>> checkin(), checkout() Document lock(), unlock() exists() : boolean getInputStream() delete() <<interface>> Usecase getOutputStream() getChildren() : Collection getHistory() : History execute() NewsWrapper AddNewsMessage addNewsMessage(NewsMessage) execute() 23
  • 24. Next
Steps • Queryable
meta
data String xPath = “*[@media:width &gt; 100]“; Query query = new XPathQuery(xPath); Document[] docs = area.getDocuments(query); 24
  • 25. Code
Example public void addNewsDocument(String newsPath, String uuid, String language) { Session session = RepositoryUtil.getSession(this.manager, this.request); DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, this.request); String webappUrl = ServletHelper.getWebappUrl(this.request); URLInformation info = new URLInformation(webappUrl); Publication pub = factory.getPublication(info.getPublicationId()); Area authoring = pub.getArea(„authoring“); Document[] docs = authoring.getDocuments(); Document messageDoc = authoring.getDocument(uuid, language); SiteStructure site = authoring.getSite(); SiteNode node = site.getNode(newsPath); String[] languages = node.getLanguages(); Link link = node.getLink(language); Document newsDoc = link.getDocument(); NewsWrapper newsWrapper = new NewsWrapper(newsDoc, getLogger()); wrapper.add(0, messageDoc); } 25
  • 27. <<interface>> <<interface>> MetaDataRegistry MetaDataOwner getElementSet(namespaceUri) : ElementSet getMetaData(namespaceUri) : MetaData getNamespaceUris() : String[] getMetaDataNamespaceUris() : String[] register(namespaceUri, elementSet) isRegistered(namespaceUri) : boolean * * <<interface>> <<interface>> ElementSet MetaData getNamespaceUri() : String getAvailableKeys() getElements() : Element[] addValue(key, value) getElement(name) : element setValue(key, value) containsElement(name) : boolean getValues(key) * <<interface>> Element ONCOPY_COPY ONCOPY_DELETE ONCOPY_IGNORE getName() : String isEditable() : String isMultiple() : String getActionOnCopy() : int 27
  • 28. Meta-Data
Code
Example <meta-data> ... <component-instance name=quot;http://apache.org/lenya/metadata/media/1.0quot; class=quot;org.apache.lenya.cms.metadata.ConfigurableElementSetquot;> <element name=quot;filenamequot; multiple=quot;falsequot;/> <element name=quot;widthquot; multiple=quot;falsequot;/> <element name=quot;heightquot; multiple=quot;falsequot;/> </component-instance> ... </meta-data> String mediaNamespace = quot;http://apache.org/lenya/metadata/media/1.0quot;; MetaData metaData = document.getMetaData(mediaNamespace); String width = metaData.getFirstValue(quot;widthquot;); 28
  • 30. Chemistry Math Science Physics Biology 

 University English French Spanish Languages Italian 30
  • 31. Overriding
Resources @import ... University XSLT A XSLT B main.css head.css Science XSLT A XSLT B' main.css head.css Physics XSLT A XSLT B'' main.css head.css <xsl:import> 31
  • 32. Templating
API <<interface>> <<interface>> Instantiator PublicationTemplateManager instantiate(templatePub, id, name) visit(publication, publicationVisitor) visit(publication, path, sourceVisitor) <<interface>> <<interface>> <<interface>> SourceVisitor VisitingSourceResolver PublicationVisitor visit(resolver, sourceUri) getSource() : Source visit(publication) ExistingSourceResolver AllExistingSourceResolver getUris() : String[] ExistingAncestorSourceResolver 32
  • 33. Publication
and
Source
Visitors • Bottom-up
traversal
of
publication
tree • PublicationVisitor General
purpose • ExistingSourceResolver
-
fallback:// Find
first
existing
source • ExistingAncestorSourceResolver
-
template-fallback:// Find
second
existing
source
(works
only
for
leaf
source!) • AllExistingSourceResolver
-
aggregate-fallback:// Find
all
existing
sources 33
  • 35. Usecases • User
interaction • Typically
form-based • Edit
and
manage
content • Interact
with
other
applications
(newsletter) • Functionality
for
website
visitors
(contact
form) • ... • Triggered
using
a
request
parameter
(lenya.usecase) • Full
screen
or
document-based 35
  • 36. continuation Form Form ! ! Template Template View Sitemap + Flowscript Controller ! Usecase Handler vali- dation Documents, ... Documents, ... Model 36
  • 37. Declaring
a
Usecase <component-instance name=quot;site.createquot; class=quot;o.a.lenya.cms.site.usecases.CreateDocumentquot;> <view template=quot;modules/.../usecases/site/create.jxquot;> <parameter name=“...“ value=“...“/> </view> <parameter name=“...“ value=“...“/> <parameter name=“...“ value=“...“/> <transaction policy=“pessimistic“/> <exit usecase=“...“> <parameter name=“...“ value=“...“/> </exit> </component-instance> 37
  • 38. Example
Usecase: <<interface>> Usecase Contact
Form initParameters() checkPreconditions() advance() checkExecutionConditions() execute() <<interface>> checkPostconditions() UserManager getUser(userId) : User AbstractUsecase <<interface>> Notifier notify(recipients, sender, message) ContactForm MailNotifier SmsNotifier InboxNotifier 38
  • 40. <<interface>> <<interface>> RepositoryEvent Notifier RepositoryListener getDescriptor() : Object notify(message) eventFired(RepositoryEvent) Object AbstractNotifier NotificationListener notify(message) NotificationEventDescriptor notify(user, translatedMessage) translateMessage(locale, message) getMessage() : Message Message getSender() : Identifiable EmailNotifier getSubject() : String getSubjectParameters() : String[] InboxNotifier getBody() : String getBodyParameters() : String[] getTime() : Date 40
  • 41. Creating
a
Message User recipient = userManager.getUser(userId); Identifiable[] recipients = { recipient }; String subject = quot;publish-notificationquot;; String[] subjectParams = {}; String body = quot;document-was-publishedquot; String[] bodyParams = { DublinCoreHelper.getTitle(document) }; Message message = new Message(subject, subjectParams, body, bodyParams, sender, recipients); 41
  • 42. Sending
Notification
Messages a)
Directly • Immediate
notification NotificationUtil.notify(this.manager, message); b)
Via
repository
observation • Notification
when
(if)
session
is
committed NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message); RepositoryEvent event = RepositoryEventFactory .createEvent(this.manager, authoringDocument, getLogger(), descriptor); getSession().enqueueEvent(event); 42
  • 43. Inbox
API <<interface>> InboxManager getInbox(User) : Inbox <<interface>> Inbox getMessages() : InboxMessage[] getMessage(id) : InboxMessage add(message) remove(message) * Message <<interface>> InboxMessage getSender() : Identifiable getSubject() : String getId() : String getSubjectParameters() : String[] getMessage() : Message getBody() : String isMarkedAsRead() : boolean getBodyParameters() : String[] markAsRead(boolean) getTime() : Date 43
  • 44. Configuring
Notification cocoon.xconf Lenya
Inbox: <component logger=quot;lenya.notificationquot; role=quot;org.apache.lenya.notification.Notifierquot; class=quot;org.apache.lenya.inbox.InboxNotifierquot;/> E-Mail: <component logger=quot;lenya.notificationquot; role=quot;org.apache.lenya.notification.Notifierquot; class=quot;org.apache.lenya.notification.EmailNotifierquot;> <smtp host=quot;localhostquot; username=quot;johnquot; password=quot;...quot;/> </component> 44