| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.PublicationFactory
public final class PublicationFactory
Factory for creating publication objects.
| Method Summary | |
|---|---|
static boolean | 
existsPublication(java.lang.String id,
                  java.lang.String servletContextPath)
Checks if a publication with a certain ID exists in a certain context.  | 
protected static java.lang.String | 
generateKey(java.lang.String publicationId,
            java.lang.String servletContextPath)
Generates a key to cache a publication.  | 
static Publication | 
getPublication(java.util.Map objectModel)
Creates a new publication.  | 
static Publication | 
getPublication(org.apache.cocoon.environment.Request request,
               org.apache.cocoon.environment.Context context)
Creates a new publication based on a request and a context.  | 
static Publication | 
getPublication(org.apache.excalibur.source.SourceResolver resolver,
               org.apache.cocoon.environment.Request request)
Creates a publication using a source resolver and a request.  | 
static Publication | 
getPublication(java.lang.String webappUrl,
               java.io.File servletContext)
Creates a publication from a webapp URL and a servlet context directory.  | 
static Publication | 
getPublication(java.lang.String id,
               java.lang.String servletContextPath)
Create a new publication with the given publication-id and servlet context path.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static Publication getPublication(java.util.Map objectModel)
                                  throws PublicationException
objectModel - The object model of the Cocoon component.
Publication
PublicationException - if there was a problem creating the publication.
public static Publication getPublication(java.lang.String id,
                                         java.lang.String servletContextPath)
                                  throws PublicationException
id - the publication idservletContextPath - the servlet context path of the publication
Publication
PublicationException - if there was a problem creating the publication.
protected static java.lang.String generateKey(java.lang.String publicationId,
                                              java.lang.String servletContextPath)
                                       throws PublicationException
publicationId - The publication ID.servletContextPath - The servlet context path.
PublicationException - when the servlet context does not exist.
public static Publication getPublication(org.apache.cocoon.environment.Request request,
                                         org.apache.cocoon.environment.Context context)
                                  throws PublicationException
request - A request.context - A context.
PublicationException - if there was a problem creating the publication.
public static Publication getPublication(java.lang.String webappUrl,
                                         java.io.File servletContext)
                                  throws PublicationException
webappUrl - The URL within the web application (without context prefix)servletContext - The Lenya servlet context directory
PublicationException - when something went wrong
public static boolean existsPublication(java.lang.String id,
                                        java.lang.String servletContextPath)
id - The publication ID.servletContextPath - The webapp context path.
true if the publication exists, false otherwise.
public static Publication getPublication(org.apache.excalibur.source.SourceResolver resolver,
                                         org.apache.cocoon.environment.Request request)
                                  throws PublicationException
resolver - The source resolver.request - The request.
PublicationException - when something went wrong.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||