org.apache.cocoon.portal.impl
Class PortalServiceImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.impl.PortalServiceImpl
All Implemented Interfaces:
Disposable, Component, Configurable, Contextualizable, LogEnabled, Serviceable, ThreadSafe, PortalService

public class PortalServiceImpl
extends AbstractLogEnabled
implements Serviceable, ThreadSafe, PortalService, Contextualizable, Disposable, Configurable

Default implementation of a portal service using a session to store custom information.

Version:
CVS $Id: PortalServiceImpl.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt

Field Summary
protected  Context context
           
protected static String KEY
           
protected  ServiceManager manager
           
protected  Map portalComponentManagers
           
protected  Map portalConfigurations
           
protected  Map skins
           
 
Fields inherited from interface org.apache.cocoon.portal.PortalService
ROLE
 
Constructor Summary
PortalServiceImpl()
           
 
Method Summary
 void configure(Configuration config)
           
 void contextualize(Context context)
           
 void dispose()
           
 Object getAttribute(String key)
          Return the value of an attribute
 Iterator getAttributeNames()
          Return the names of all attributes
 PortalComponentManager getComponentManager()
          Return the component manager for the current portal
 String getDefaultLayoutKey()
          Get the default layout key
 Layout getEntryLayout(String layoutKey)
           
protected  PortalServiceInfo getInfo()
           
 Map getObjectModel()
          Return the current object model.
 String getPortalName()
          The name of the portal - as defined in the portal configuration.
 List getSkinDescriptions()
          Return all skins
 Object getTemporaryAttribute(String key)
          Return the value of a temporary attribute
 Iterator getTemporaryAttributeNames()
          Return the names of all temporary attributes
 Boolean isRenderable()
          Returns true if all aspects should render, false if only "static" aspects should render.
 void removeAttribute(String key)
          Remove an attribute
 void removeTemporaryAttribute(String key)
          Remove a temporary attribute
 void service(ServiceManager serviceManager)
           
 void setAttribute(String key, Object value)
          Set an attribute
 void setDefaultLayoutKey(String layoutKey)
          Change the default layout key for most functions
 void setEntryLayout(String layoutKey, Layout object)
          FIXME this is for the full-screen function
 void setPortalName(String value)
           
 void setRenderable(Boolean renderable)
          Indicates whether aspects which are sensitive to rendering state should render
 void setTemporaryAttribute(String key, Object value)
          Set a temporary attribute
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected Context context

manager

protected ServiceManager manager

portalComponentManagers

protected Map portalComponentManagers

portalConfigurations

protected Map portalConfigurations

skins

protected Map skins

KEY

protected static final String KEY
Constructor Detail

PortalServiceImpl

public PortalServiceImpl()
Method Detail

service

public void service(ServiceManager serviceManager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

getInfo

protected PortalServiceInfo getInfo()

getPortalName

public String getPortalName()
Description copied from interface: PortalService
The name of the portal - as defined in the portal configuration.

Specified by:
getPortalName in interface PortalService
See Also:
PortalService.getPortalName()

setPortalName

public void setPortalName(String value)
Specified by:
setPortalName in interface PortalService
See Also:
PortalService.setPortalName(java.lang.String)

getAttribute

public Object getAttribute(String key)
Description copied from interface: PortalService
Return the value of an attribute

Specified by:
getAttribute in interface PortalService
Parameters:
key - The key of the attribute
Returns:
The value of the attribute or null.
See Also:
PortalService.getAttribute(java.lang.String)

setAttribute

public void setAttribute(String key,
                         Object value)
Description copied from interface: PortalService
Set an attribute

Specified by:
setAttribute in interface PortalService
Parameters:
key - The key of the attribute
value - The new value
See Also:
PortalService.setAttribute(java.lang.String, java.lang.Object)

removeAttribute

public void removeAttribute(String key)
Description copied from interface: PortalService
Remove an attribute

Specified by:
removeAttribute in interface PortalService
Parameters:
key - The key of the attribute
See Also:
PortalService.removeAttribute(java.lang.String)

getAttributeNames

public Iterator getAttributeNames()
Description copied from interface: PortalService
Return the names of all attributes

Specified by:
getAttributeNames in interface PortalService
See Also:
PortalService.getAttributeNames()

getTemporaryAttribute

public Object getTemporaryAttribute(String key)
Description copied from interface: PortalService
Return the value of a temporary attribute

Specified by:
getTemporaryAttribute in interface PortalService
Parameters:
key - The key of the attribute
Returns:
The value of the attribute or null.
See Also:
PortalService.getTemporaryAttribute(java.lang.String)

setTemporaryAttribute

public void setTemporaryAttribute(String key,
                                  Object value)
Description copied from interface: PortalService
Set a temporary attribute

Specified by:
setTemporaryAttribute in interface PortalService
Parameters:
key - The key of the attribute
value - The new value
See Also:
PortalService.setTemporaryAttribute(java.lang.String, java.lang.Object)

removeTemporaryAttribute

public void removeTemporaryAttribute(String key)
Description copied from interface: PortalService
Remove a temporary attribute

Specified by:
removeTemporaryAttribute in interface PortalService
Parameters:
key - The key of the attribute
See Also:
PortalService.removeTemporaryAttribute(java.lang.String)

getTemporaryAttributeNames

public Iterator getTemporaryAttributeNames()
Description copied from interface: PortalService
Return the names of all temporary attributes

Specified by:
getTemporaryAttributeNames in interface PortalService
See Also:
PortalService.getTemporaryAttributeNames()

getComponentManager

public PortalComponentManager getComponentManager()
Description copied from interface: PortalService
Return the component manager for the current portal

Specified by:
getComponentManager in interface PortalService
See Also:
PortalService.getComponentManager()

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

configure

public void configure(Configuration config)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

setEntryLayout

public void setEntryLayout(String layoutKey,
                           Layout object)
Description copied from interface: PortalService
FIXME this is for the full-screen function

Specified by:
setEntryLayout in interface PortalService
Parameters:
layoutKey - TODO
See Also:
PortalService.setEntryLayout(java.lang.String, org.apache.cocoon.portal.layout.Layout)

getEntryLayout

public Layout getEntryLayout(String layoutKey)
Specified by:
getEntryLayout in interface PortalService
See Also:
PortalService.getEntryLayout(java.lang.String)

setDefaultLayoutKey

public void setDefaultLayoutKey(String layoutKey)
Description copied from interface: PortalService
Change the default layout key for most functions

Specified by:
setDefaultLayoutKey in interface PortalService
See Also:
PortalService.setDefaultLayoutKey(java.lang.String)

setRenderable

public void setRenderable(Boolean renderable)
Description copied from interface: PortalService
Indicates whether aspects which are sensitive to rendering state should render

Specified by:
setRenderable in interface PortalService
Parameters:
renderable - true if all aspects should render

isRenderable

public Boolean isRenderable()
Description copied from interface: PortalService
Returns true if all aspects should render, false if only "static" aspects should render.

Specified by:
isRenderable in interface PortalService

getDefaultLayoutKey

public String getDefaultLayoutKey()
Description copied from interface: PortalService
Get the default layout key

Specified by:
getDefaultLayoutKey in interface PortalService
See Also:
PortalService.getDefaultLayoutKey()

getSkinDescriptions

public List getSkinDescriptions()
Description copied from interface: PortalService
Return all skins

Specified by:
getSkinDescriptions in interface PortalService
See Also:
PortalService.getSkinDescriptions()

getObjectModel

public Map getObjectModel()
Description copied from interface: PortalService
Return the current object model.

Specified by:
getObjectModel in interface PortalService
See Also:
PortalService.getObjectModel()


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.