XWiki Development Zone » Draft Documents » XWiki Components Directory

XWiki Components Directory

Last modified by LuisArias on 2008/09/30 17:05

XWiki Components Directory

This document provides a list of the components that are available in the XWiki Platform. Component implementations are grouped by interface in alphabetical order.

Table of Contents

Action Module

Action Components

Warning: Work in progress. Will replace struts in a future version.

Role

org.xwiki.action.Action

Interface

void execute() throws ActionException;
void execute(Object additionalData) throws ActionException;

ErrorAction Component

Description

The ErrorAction component an Action implementation that will print a stack trace.

Role Hint

error

Requires

N/A

ActionManager Components

Role

org.xwiki.action.ActionManager

Interface

/**
 * @exception ActionException when we haven't been able to use the error action to handle
 *            the original exception
 */
 void handleRequest() throws ActionException;
/**
 * Force execution of a specific action.
 * @exception ActionException when we haven't been able to use the error action to handle
 *            the original exception
 */
 void handleRequest(String actionName) throws ActionException;
 void handleRequest(String actionName, Object additionalData)
        throws ActionException;

DefaultActionManager Component

Description

The DefaultActionManager component provides an ActionManager implementation that executes actions that may be identified by name or found in the http request in a Container.

Role Hint

N/A

Requires

  • Action
  • Container

Cache Module

CacheFactory Components

Role

org.xwiki.cache.CacheFactory

Interface

/**
 * Create and return a custom cache.
 * 
 * @param <T> the class of the data stored in the cache.
 * @param config the cache configuration.
 * @return a new {@link Cache}.
 * @throws CacheException error when creating the cache.
 */
<T> Cache<T> newCache(CacheConfiguration config) throws CacheException;

DefaultCacheFactory Component

Description

Provides a service for creating type-safe caches.

Role Hint

default

Requires

N/A

JBossCacheCacheFactory Component

Description

JBossCacheCacheFactory provides a CacheFactory implementation on JBoss Cache.

Role Hint

jbosscache
or
jbosscache/local

Warning: Why are there two of these ?

Requires

  • Container

OSCacheCacheFactory Component

Description

OSCacheCacheFactory provides a CacheFactory implementation on OSCache.

Role Hint

oscache
or
oscache/local

Warning: Why are there two of these ?

Requires

  • Container

Configuration Module

ConfigurationManager Components

Role

org.xwiki.configuration.ConfigurationManager

Interface

void initializeConfiguration(Object configurationBean, List<ConfigurationSource> sources,
        String namespace) throws InitializationException;

DefaultConfigurationManager Component

Description

Provides a default implementation of the ConfigurationManager service based on Apache's Commons Configuration.

Role Hint

N/A

Requires

N/A

ConfigurationSourceCollection Components

Role

org.xwiki.configuration.ConfigurationSourceCollection

Interface

void initializeConfiguration(Object configurationBean, List<ConfigurationSource> sources,
        String namespace) throws InitializationException;

DefaultConfigurationSourceCollection Component

Description

Provides a default implementation of the ConfigurationSourceCollection service that includes the xwiki.properties file.

Role Hint

default

Requires

  • Container

Container Module

Container Components

Role

org.xwiki.container.Container

Interface

ApplicationContext getApplicationContext();

void setApplicationContext(ApplicationContext context);

Request getRequest();
void setRequest(Request request);
void removeRequest();
void pushRequest(Request request);
void popRequest();

Response getResponse();
void setResponse(Response response);
void removeResponse();
void pushResponse(Response response);
void popResponse();

Session getSession();
void setSession(Session session);
void removeSession();
void pushSession(Session session);
void popSession();

DefaultContainer Component

Description

Provides a default implementation of the Container service using ThreadLocals.

Role Hint

default

Requires

N/A

RequestInitializerManager Components

Role

org.xwiki.container.RequestInitializerManager

Interface

/**
 * Perform initializations here, such as storing objects in the Request.
 * 
 * @param request the XWiki Request object
 * @throws RequestInitializerException if the initialization fails. It's expected that the
 *         application should stop if this happens.
 */
void initialize(Request request) throws RequestInitializerException;

DefaultRequestInitializerManager Component

Description

Provides a default implementation of the org.xwiki.container.RequestInitializerManager service.

Role Hint

default

Requires

N/A

ContainerPortlet Module

PortletContainerInitializer Components

Role

org.xwiki.container.portlet.PortletContainerInitializer

Interface

void initializeRequest(javax.portlet.PortletRequest request, Object xwikiContext)
    throws PortletContainerException;

void initializeResponse(javax.portlet.PortletResponse response);

void initializeSession(javax.portlet.PortletRequest request);

void initializeApplicationContext(PortletContext servletContext);

DefaultPortletContainerInitializer Component

Description

Provides a default implementation of the PortletContainerInitializer service based on the Portlet 1.0 API (JSR 168).

Role Hint

default

Requires

  • Container
  • RequestInitializer
  • Execution
  • ExecutionContextInitializerManager

ContainerServlet Module

ServletContainerInitializer Components

Role

org.xwiki.container.servlet.ServletContainerInitializer

Interface

void initializeRequest(HttpServletRequest request, Object xwikiContext)
    throws ServletContainerException;

void initializeRequest(HttpServletRequest request)
    throws ServletContainerException;

void initializeResponse(HttpServletResponse response);

void initializeSession(HttpServletRequest request);

void initializeApplicationContext(ServletContext servletContext);

DefaultServletContainerInitializer Component

Description

Provides a default implementation of the ServletContainerInitializer service based on the Servlet 2.4 API.

Role Hint

default

Requires

  • Container
  • RequestInitializer
  • Execution
  • ExecutionContextInitializerManager

Context Module

Execution Components

Role

org.xwiki.context.Execution

Interface

ExecutionContext getContext();
void setContext(ExecutionContext context);
void pushContext(ExecutionContext context);
void popContext();
void removeContext();

DefaultExecution Component

Description

Provides a default implementation of the Execution service using ThreadLocals.

Role Hint

default

Requires

N/A

ExecutionContextInitializerManager Components

Role

org.xwiki.context.ExecutionContextInitializerManager

Interface

void initialize(ExecutionContext context) throws ExecutionContextInitializerException;

DefaultExecutionContextInitializerManager Component

Description

Provides a default implementation of the ExecutionContextInitializerManager service that initializes Execution components.

Role Hint

default

Requires

N/A

Observation Module

ObservationManager Components

Role

org.xwiki.observation.ObservationManager

Interface

/**
 * Add a listener.
 * 
 * @param event the event to register the listener against; acts as a template that filters out only specific events
 *            the istener is interested in
 * @param eventListener the listener to register
 */
void addListener(Event event, EventListener eventListener);

/**
 * Remove a listener from a specific event.
 * 
 * @param event the event to remove the listener from.
 * @param eventListener the listener to remove.
 */
void removeListener(Event event, EventListener eventListener);

/**
 * Remove a listener from all events it is registered by. Convenient way of cleaning up an listener object being
 * destroyed.
 * 
 * @param eventListener the listener to remove.
 */
void removeListener(EventListener eventListener);

/**
 * Call the registered listeners. The definition of <em>source</em> and <em>data</em> is purely up to the
 * communicating classes.
 * 
 * @param event the event to pass to the registered listeners
 * @param source the source of the event (or <code>null</code>)
 * @param data the additional data related to the event (or <code>null</code>)
 */
void notify(Event event, Object source, Object data);

/**
 * Convenience front-end where the additional data parameter is <code>null</code>.
 * 
 * @param event the event to pass to the registered listeners
 * @param source the source of the event (or <code>null</code>)
 * @see #notify(org.xwiki.observation.event.Event, Object, Object)
 */
void notify(Event event, Object source);

DefaultObservationManager Component

Description

Provides a default implementation of the ObservationManager service.

Role Hint

N/A

Requires

N/A

rendering

url

velocity

xml

Tags:
Created by LuisArias on 2008/09/30 13:24

Get Connected