org.apache.lenya.cms.repository
Class RepositoryUtil

java.lang.Object
  extended by org.apache.lenya.cms.repository.RepositoryUtil

public class RepositoryUtil
extends java.lang.Object

Repository utility class.


Constructor Summary
RepositoryUtil()
           
 
Method Summary
static Session createSession(org.apache.avalon.framework.service.ServiceManager manager, Identity identity, boolean modifiable)
          Creates a session.
protected static Identity getIdentity(org.apache.cocoon.environment.Request request)
           
static Session getSession(org.apache.avalon.framework.service.ServiceManager manager, org.apache.cocoon.environment.Request request)
          Returns the session attached to the request or creates a session.
static void removeSession(org.apache.avalon.framework.service.ServiceManager manager, org.apache.cocoon.environment.Request request)
          Removes the repository session from the servlet session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryUtil

public RepositoryUtil()
Method Detail

getSession

public static Session getSession(org.apache.avalon.framework.service.ServiceManager manager,
                                 org.apache.cocoon.environment.Request request)
                          throws RepositoryException
Returns the session attached to the request or creates a session.

Parameters:
manager - The service manager.
request - The request.
Returns:
A session.
Throws:
RepositoryException - if an error occurs.

getIdentity

protected static Identity getIdentity(org.apache.cocoon.environment.Request request)

createSession

public static Session createSession(org.apache.avalon.framework.service.ServiceManager manager,
                                    Identity identity,
                                    boolean modifiable)
                             throws RepositoryException
Creates a session.

Parameters:
manager - The service manager.
identity - The identity.
modifiable - Determines if the repository items in this session should be modifiable.
Returns:
a session.
Throws:
RepositoryException - if an error occurs.

removeSession

public static void removeSession(org.apache.avalon.framework.service.ServiceManager manager,
                                 org.apache.cocoon.environment.Request request)
Removes the repository session from the servlet session.

Parameters:
manager - The service manager.
request - The current request.


Copyright 1999-2006 Apache Software Foundation. All Rights Reserved.