pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.statistics.view
Class AbstractStatisticsController<T extends AbstractStatisticsViewControllerConfiguration,U extends AbstractStatisticsViewControllerResult<?>>

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.statistics.view.AbstractStatisticsController<T,U>
Type Parameters:
T - the actual implementation of: AbstractStatisticsViewControllerConfiguration
U - the actual implementation of: AbstractStatisticsViewControllerResult
All Implemented Interfaces:
Configurable<AbstractStatisticsViewControllerConfiguration>
Direct Known Subclasses:
AbstractStatisticsViewController, WestPanelController

public abstract class AbstractStatisticsController<T extends AbstractStatisticsViewControllerConfiguration,U extends AbstractStatisticsViewControllerResult<?>>
extends Controller
implements Configurable<AbstractStatisticsViewControllerConfiguration>

Abstract base-class to derive a pulse website administration "view" for the statistics component from.

Basically this will be:

Version:
$Revision: 1914 $
Author:
Daniel Dietz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Field Summary
protected static org.slf4j.Logger LOGGER
          The LOGGER.
 
Constructor Summary
AbstractStatisticsController()
           
 
Method Summary
protected  T getConfiguration()
          Returns the AbstractStatisticsViewControllerConfiguration.
protected  boolean hasRoleForServer(User user, StatisticsServer server)
          Checks whether the given User has the Role required for the given StatisticsServer.
 void initialize(AbstractStatisticsViewControllerConfiguration conf)
          Initialises the Controller with the given Configuration.
abstract  U initView(ServiceRequest request)
          Initialises the view.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER
The LOGGER.

Constructor Detail

AbstractStatisticsController

public AbstractStatisticsController()
Method Detail

initView

public abstract U initView(ServiceRequest request)
Initialises the view.

Parameters:
request - the current ServiceRequest
Returns:
a JAXB-enabled AbstractStatisticsViewControllerResult&lt;? extends AbstractStatisticsViewControllerResultData&gt;

initialize

public final void initialize(AbstractStatisticsViewControllerConfiguration conf)
Initialises the Controller with the given Configuration.

Specified by:
initialize in interface Configurable<AbstractStatisticsViewControllerConfiguration>
Parameters:
conf - the Configuration

getConfiguration

protected final T getConfiguration()
Returns the AbstractStatisticsViewControllerConfiguration.

Returns:
AbstractStatisticsViewControllerConfiguration

hasRoleForServer

protected final boolean hasRoleForServer(User user, StatisticsServer server)
Checks whether the given User has the Role required for the given StatisticsServer.

Parameters:
user - the User
server - the StatisticsServer
Returns:
true if end only if the given User has the matching Role, false otherwise