magoffin.matt.ma2.biz
Interface BizContext

All Known Implementing Classes:
BasicBizContext, InternalBizContext, WebBizContext

public interface BizContext

Interface for application input data.

This interface is passed to Biz implementations to allow for context-specific information to get passed into the Biz layer.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Nested Class Summary
static class BizContext.Feature
          An enumeration of features supported by the application.
 
Method Summary
 User getActingUser()
          Get the acting user.
 magoffin.matt.xweb.util.AppContextSupport getAppContextSupport()
          Get the application context.
 java.lang.Object getAttribute(java.lang.String key)
          Get an attribute value.
 java.util.Locale getLocale()
          Get the Locale to use for messages, etc.
 boolean isFeatureEnabled(BizContext.Feature feature)
          Test if a feature is enabled.
 void setAttribute(java.lang.String key, java.lang.Object value)
          Set an attribute value.
 

Method Detail

getActingUser

User getActingUser()
Get the acting user.

Returns:
the acting user

isFeatureEnabled

boolean isFeatureEnabled(BizContext.Feature feature)
Test if a feature is enabled.

Parameters:
feature - the feature to test
Returns:
boolean

getAppContextSupport

magoffin.matt.xweb.util.AppContextSupport getAppContextSupport()
Get the application context.

Returns:
AppContextSupport

getLocale

java.util.Locale getLocale()
Get the Locale to use for messages, etc.

Returns:
locale

getAttribute

java.lang.Object getAttribute(java.lang.String key)
Get an attribute value.

Parameters:
key - the attribute key
Returns:
the attribute value, or null

setAttribute

void setAttribute(java.lang.String key,
                  java.lang.Object value)
Set an attribute value.

Parameters:
key - the attribute key
value - the attribute value