org.apache.slide.common
Class Domain

java.lang.Object
  |
  +--org.apache.slide.common.Domain

public final class Domain
extends java.lang.Object

Domain class.

For now, does not implement access control on Namespaces.

Version:
$Revision: 1.18 $
Author:
Remy Maucherat

Constructor Summary
Domain()
           
 
Method Summary
static DomainAccessToken accessDomain(SecurityToken token)
          Access a Domain.
static NamespaceAccessToken accessNamespace(SecurityToken token, java.lang.String namespaceName)
          Access a Namespace.
(package private) static void addNamespace(Namespace namespace)
          Add a namespace to the domain.
static void closeNamespace(NamespaceAccessToken token)
          Close a namespace.
static void closeNamespace(SecurityToken token, java.lang.String namespaceName)
          Clsose a namespace.
static void debug(java.lang.Object data)
          Debug.
static void error(java.lang.Object data)
          Error.
static void error(java.lang.Object data, java.lang.Throwable t)
          Error.
(package private) static Logger getLogger()
          Get the Domain logger.
(package private) static Namespace getNamespace(java.lang.String namespaceName)
          Get a namespace.
static void info(java.lang.Object data)
          Info.
static void init(Configuration configuration)
          Domain initialization routine using Avalon configuration parser.
static boolean isInitialized()
          Tests if the domain has been initialized before.
static void log(java.lang.Object data)
          Log.
static void log(java.lang.Object data, int level)
          Log.
static void log(java.lang.Object data, java.lang.String channel, int level)
          Log.
(package private) static void selfInit()
          Default initialization of the domain.
(package private) static void setLogger(Logger logger)
          Set the logger to be used by Slide.
(package private) static void start()
          Start domain (doesn't do anything yet).
(package private) static void stop()
          Stop domain.
static void warn(java.lang.Object data)
          Warning.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Domain

public Domain()
Method Detail

isInitialized

public static boolean isInitialized()
Tests if the domain has been initialized before.
Returns:
boolean True if the domain has already been initialized

accessNamespace

public static NamespaceAccessToken accessNamespace(SecurityToken token,
                                                   java.lang.String namespaceName)
Access a Namespace.
Parameters:
token - Entity which wants access
namespaceName - Name of the namespace on which access is requested
Returns:
NamespaceAccessToken Access token to the namespace

closeNamespace

public static void closeNamespace(NamespaceAccessToken token)
Close a namespace.
Parameters:
token - Namespace access token

closeNamespace

public static void closeNamespace(SecurityToken token,
                                  java.lang.String namespaceName)
Clsose a namespace.
Parameters:
token - Entity which wants to close the namespace
namespaceName - Name of the namespace

accessDomain

public static DomainAccessToken accessDomain(SecurityToken token)
Access a Domain.
Parameters:
token - Service who wants access
Returns:
DomainAccessToken Access token to the domain

init

public static void init(Configuration configuration)
Domain initialization routine using Avalon configuration parser.
Parameters:
configuration - Avalon configuration object

log

public static void log(java.lang.Object data,
                       java.lang.String channel,
                       int level)
Log.
Parameters:
data - The object to log.
channel - The channel name used for logging.
level - The level used for logging.

log

public static void log(java.lang.Object data,
                       int level)
Log.
Parameters:
data - The object to log.
level - The level used for logging.

log

public static void log(java.lang.Object data)
Log.
Parameters:
data - The object to log.

debug

public static void debug(java.lang.Object data)
Debug.
Parameters:
data - The object to log

error

public static void error(java.lang.Object data)
Error.
Parameters:
data - The object to log

error

public static void error(java.lang.Object data,
                         java.lang.Throwable t)
Error.
Parameters:
data - The object to log
t - Throwable object

info

public static void info(java.lang.Object data)
Info.
Parameters:
data - The object to log

warn

public static void warn(java.lang.Object data)
Warning.
Parameters:
data - The object to log

start

static void start()
           throws java.lang.Exception
Start domain (doesn't do anything yet).

stop

static void stop()
          throws java.lang.Exception
Stop domain.

addNamespace

static void addNamespace(Namespace namespace)
Add a namespace to the domain.
Parameters:
namespace - Namespace to be added

getNamespace

static Namespace getNamespace(java.lang.String namespaceName)
Get a namespace.
Parameters:
namespaceName - Name of the namespace
Returns:
Namespace

setLogger

static void setLogger(Logger logger)
Set the logger to be used by Slide.
Parameters:
logger - Logger the domain will use

getLogger

static Logger getLogger()
Get the Domain logger.
Returns:
The domain logger

selfInit

static void selfInit()
Default initialization of the domain.