|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.slide.common.Namespace
A Namespace contains a hierarchically organized tree of information.
Objects in the namespace are generally referred to as Nodes. Nodes may have a parent, children, content and meta-data. They can also be versioned (so that multiple revisions of the object's content and metadata are stored) and locked (so that only specific principals are allowed to read or modify the object). In addition, access control information can be assigned to every node.
Nodes in the hierarchy are identified by their URI (Unique Resource Identifier). A URI is analogous to a file path in traditional file systems. For example:
/users/john/documents/my_document.txtAs you can see, the slash ("/") is used to separate nodes in the path.
Client applications can not access a Namespace object directly. Instead,
access must be requested from the Domain
, which will hand
out a proxy object (NamespaceAccessToken
)
that enables the client application to access the namespace using the
helpers.
Namespaces are necessarily self-contained. What this means is that a namespace cannot reference or contain links to another namespace. A namespace is typically assigned per-application, which effectively isolates it's data and security context from those of other applications.
Field Summary | |
static java.lang.String |
CONTENT_STORE
|
static java.lang.String |
LOCK_STORE
|
static java.lang.String |
NODE_STORE
|
static java.lang.String |
REFERENCE
|
static java.lang.String |
REVISION_DESCRIPTOR_STORE
|
static java.lang.String |
REVISION_DESCRIPTORS_STORE
|
static java.lang.String |
SECURITY_STORE
|
Constructor Summary | |
(package private) |
Namespace()
Constructor. |
Method Summary | |
void |
clearNamespace()
Reinitialize namespace. |
(package private) void |
clearUriCache()
Clear uri cache. |
void |
connectService(Service service)
Connects a data source on demand. |
void |
disconnectServices()
Disconnects all services. |
java.util.Enumeration |
enumerateScopes()
Enumerate all scopes managed by this namespace. |
Logger |
getApplicationLogger()
Return the current application logger. |
NamespaceConfig |
getConfig()
Returns the namespace configuration. |
ContentInterceptor[] |
getContentInterceptors()
Get content interceptors associated with this namespace. |
Logger |
getLogger()
Return the current logger. |
java.lang.String |
getName()
Gets the qulified name of the namespace. |
Store |
getStore(Scope scope)
Get the Data Source associated with the given scope, if any. |
javax.transaction.TransactionManager |
getTransactionManager()
Transaction manager accessor. |
Uri |
getUri(SlideToken token,
java.lang.String uri)
Builds a new uri object to access this namespace. |
Uri |
getUri(SlideToken token,
java.lang.String uri,
boolean forcedEnlistment)
Builds a new uri object to access this namespace. |
Uri |
getUri(java.lang.String uri)
Builds a new uri object to access this namespace. |
void |
initializeServices()
At the end of the service registration, this service is called to perform any required initialization task. |
(package private) void |
loadBaseData(Configuration namespaceBaseDataDefinition)
Parses the contents of the specified reader, and uses that info to initialize the specified Slide namespace. |
(package private) void |
loadConfiguration(Configuration namespaceConfigurationDefinition)
Parses the contents of the specified reader, and uses that info to initialize the specified Slide namespace. |
(package private) void |
loadDefinition(Configuration definition)
Parses the contents of the specified definition object, and uses that info to initialize the namespace. |
(package private) void |
loadParameters(Configuration namespaceConfigurationDefinition)
Parses the contents of the specified reader, and uses that info to initialize the specified Slide namespace. |
void |
registerStore(java.lang.String storeName,
java.lang.Class storeClass,
java.util.Hashtable parameters,
Scope scope,
java.util.Hashtable childStores)
Used to register a Store in the namespace for the specified scope. |
Store |
retrieveStore(Scope scope)
Get the Data Source associated with the given scope, if any and connect to the store. |
void |
setApplicationLogger(Logger logger)
Set the logger used by this namespace. |
void |
setLogger(Logger logger)
Set the logger used by this namespace. |
void |
setName(java.lang.String name)
Sets the qualified name of the namespace. |
void |
unregisterStore(Scope scope)
Remove a Store from the registry. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String REFERENCE
public static final java.lang.String NODE_STORE
public static final java.lang.String SECURITY_STORE
public static final java.lang.String LOCK_STORE
public static final java.lang.String REVISION_DESCRIPTORS_STORE
public static final java.lang.String REVISION_DESCRIPTOR_STORE
public static final java.lang.String CONTENT_STORE
Constructor Detail |
Namespace()
Method Detail |
public void setName(java.lang.String name)
name
- Name of the namespacepublic java.lang.String getName()
public NamespaceConfig getConfig()
public java.util.Enumeration enumerateScopes()
public javax.transaction.TransactionManager getTransactionManager()
public Logger getLogger()
public void setLogger(Logger logger)
public Logger getApplicationLogger()
public void setApplicationLogger(Logger logger)
public void registerStore(java.lang.String storeName, java.lang.Class storeClass, java.util.Hashtable parameters, Scope scope, java.util.Hashtable childStores) throws ServiceRegistrationFailedException, ServiceParameterErrorException, ServiceParameterMissingException
storeClass
- Class of the Data Sourceparameters
- Init parameters for the Data Sourcescope
- Scope for which the Data Source is registeredchildStores
- Instances of the typed storesServiceRegistrationFailed
- An error occured during
instantiation of the serviceServiceParameterErrorException
- Incorrect service parameterServiceParameterMissingException
- Service parameter missingpublic void initializeServices() throws ServicesInitializationFailedException
ServicesInitializationFailedException
- One or more
exception occured while initializing servicespublic void clearNamespace()
public void connectService(Service service) throws ServiceConnectionFailedException, ServiceAccessException
service
- Service on which a connection attempt will be madeServiceConnectionFailedException
- Error connecting serviceServiceAccessException
- Unspecified low level service
access exceptionpublic void disconnectServices() throws ServicesShutDownFailedException
ServicesShutDownFailedException
- Error disconnecting one or
more servicespublic void unregisterStore(Scope scope) throws ServiceDisconnectionFailedException, ServiceAccessException
scope
- Scope to disconnectServiceDisconnctionFailedException
- Error disconnecting
DescriptorsStoreServiceAccessException
- Unspecified error during
service accesspublic Store getStore(Scope scope)
scope
- Scope to matchpublic Store retrieveStore(Scope scope) throws ServiceConnectionFailedException, ServiceAccessException
scope
- Scope to matchServiceConnectionFailedException
- Connection to Store failedServiceAccessException
- Unspecified service access exceptionpublic Uri getUri(java.lang.String uri)
uri
- Requested Uripublic Uri getUri(SlideToken token, java.lang.String uri)
token
- SlideTokenuri
- Requested Uripublic Uri getUri(SlideToken token, java.lang.String uri, boolean forcedEnlistment)
token
- SlideTokenuri
- Requested UriforcedEnlistment
- may differ from the value set in tokenvoid clearUriCache()
public ContentInterceptor[] getContentInterceptors()
void loadDefinition(Configuration definition) throws SlideException, ConfigurationException
definition
- Definiton of the scopes and stores of
the namespaceSlideException
- Something went wrong during registry or
services initializationConfigurationException
- Error parsing configuration filevoid loadBaseData(Configuration namespaceBaseDataDefinition) throws SlideException, ConfigurationException
namespaceBaseDataDefinition
- Namespace base dataSlideException
- Something went wrong during registry or
services initializationvoid loadConfiguration(Configuration namespaceConfigurationDefinition) throws SlideException
namespaceBaseDataDefinition
- Namespace base dataSlideException
- Something went wrong during registry or
services initializationvoid loadParameters(Configuration namespaceConfigurationDefinition) throws SlideException
namespaceConfigurationDefinition
- Namespace configurationSlideException
- Something went wrong during registry or
services initialization
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |