|
|||||||||
| Home >> All >> org >> apache >> slide >> [ common overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.slide.common
Class Namespace

java.lang.Objectorg.apache.slide.common.Namespace
- public final class Namespace
- extends java.lang.Object
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.txt
As 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.
- Version:
- $Revision: 1.65.2.1 $
| Constructor Summary | |
(package private) |
Namespace()
Constructor. |
| Method Summary | |
void |
clearNamespace()
Reinitialize namespace. |
(package private) void |
clearUriCache()
Clear uri cache. |
void |
connectService(Service service,
org.apache.slide.authenticate.CredentialsToken token)
Connects a data source on demand. |
(package private) java.lang.Object |
dereferenceStore(java.lang.String storeType,
java.util.Hashtable childStores)
|
void |
disconnectServices()
Disconnects all services. |
java.util.Enumeration |
enumerateScopes()
Enumerate all scopes managed by this namespace. |
org.apache.slide.util.logger.Logger |
getApplicationLogger()
Return the current application logger. |
private void |
getChildStore(org.apache.slide.util.conf.Configuration storeDefinition,
java.lang.String key,
java.util.Hashtable currentStoreChildStores,
java.util.Hashtable storeParameters)
|
NamespaceConfig |
getConfig()
Returns the namespace configuration. |
org.apache.slide.content.ContentInterceptor[] |
getContentInterceptors()
Get content interceptors associated with this namespace. |
org.apache.slide.util.logger.Logger |
getLogger()
Return the current logger. |
java.lang.String |
getName()
Gets the qulified name of the namespace. |
java.lang.String |
getSearchClassName()
Method getSearchClassName |
org.apache.slide.store.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(org.apache.slide.util.conf.Configuration namespaceBaseDataDefinition)
Parses the contents of the specified reader, and uses that info to initialize the specified Slide namespace. |
private Service |
loadChildStore(org.apache.slide.util.conf.Configuration childStoreDefinition,
java.util.Hashtable fatherParameters)
Load a child descriptors store. |
(package private) void |
loadConfiguration(org.apache.slide.util.conf.Configuration namespaceConfigurationDefinition)
Parses the contents of the specified reader, and uses that info to initialize the specified Slide namespace. |
(package private) void |
loadDefinition(org.apache.slide.util.conf.Configuration definition)
Parses the contents of the specified definition object, and uses that info to initialize the namespace. |
(package private) void |
loadExtractors(org.apache.slide.util.conf.Configuration namespaceExtractorsDefinition)
|
(package private) void |
loadParameters(org.apache.slide.util.conf.Configuration namespaceConfigurationDefinition)
Parses the contents of the specified reader, and uses that info to initialize the specified Slide namespace. |
private void |
loadScopeDefinition(org.apache.slide.util.conf.Configuration scopeDefinition,
java.util.Hashtable storesClass,
java.util.Hashtable storesParameters,
java.util.Hashtable childStores)
Parse the content store definition. |
private void |
loadStoreDefinition(org.apache.slide.util.conf.Configuration storeDefinition,
java.util.Hashtable storesClass,
java.util.Hashtable storesParameters,
java.util.Hashtable childStores)
Parse the store definition. |
private void |
notifyStoreCreated(java.lang.String namespaceName,
java.lang.String scope,
java.lang.String storeName)
|
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. |
org.apache.slide.store.Store |
retrieveStore(Scope scope,
org.apache.slide.authenticate.CredentialsToken token)
Get the Data Source associated with the given scope, if any and connect to the store. |
void |
setApplicationLogger(org.apache.slide.util.logger.Logger logger)
Set the logger used by this namespace. |
void |
setLogger(org.apache.slide.util.logger.Logger logger)
Set the logger used by this namespace. |
void |
setName(java.lang.String name)
Sets the qualified name of the namespace. |
void |
setSearchClassName(java.lang.String searchClassName)
Method setSearchClassName |
java.lang.String |
toString()
Get a String representation of this namespace. |
void |
unregisterStore(Scope scope)
Remove a Store from the registry. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
REFERENCE
public static final java.lang.String REFERENCE
- See Also:
- Constant Field Values
NODE_STORE
public static final java.lang.String NODE_STORE
- See Also:
- Constant Field Values
SECURITY_STORE
public static final java.lang.String SECURITY_STORE
- See Also:
- Constant Field Values
LOCK_STORE
public static final java.lang.String LOCK_STORE
- See Also:
- Constant Field Values
REVISION_DESCRIPTORS_STORE
public static final java.lang.String REVISION_DESCRIPTORS_STORE
- See Also:
- Constant Field Values
REVISION_DESCRIPTOR_STORE
public static final java.lang.String REVISION_DESCRIPTOR_STORE
- See Also:
- Constant Field Values
CONTENT_STORE
public static final java.lang.String CONTENT_STORE
- See Also:
- Constant Field Values
PROPERTIES_INDEX_STORE
public static final java.lang.String PROPERTIES_INDEX_STORE
- See Also:
- Constant Field Values
CONTENT_INDEX_STORE
public static final java.lang.String CONTENT_INDEX_STORE
- See Also:
- Constant Field Values
SEQUENCE_STORE
public static final java.lang.String SEQUENCE_STORE
- See Also:
- Constant Field Values
LOG_CHANNEL
private static final java.lang.String LOG_CHANNEL
- Log channel for logger
I_CREATESTORELISTENERCLASS
protected static final java.lang.String I_CREATESTORELISTENERCLASS
- See Also:
- Constant Field Values
I_CREATESTORELISTENERCLASS_DEFAULT
protected static final java.lang.String I_CREATESTORELISTENERCLASS_DEFAULT
- See Also:
- Constant Field Values
createStoreListenerClass
protected static java.lang.Class createStoreListenerClass
name
private java.lang.String name
- Namespace name.
searchClassName
private java.lang.String searchClassName
- classname of the search implementation
connectedServices
private transient java.util.Vector connectedServices
- Static Vector which holds a reference, and provides access to all
the services instances used by the Slide namespace.
stores
private transient java.util.Hashtable stores
- Registered DescriptorStores on this Namespace.
config
private NamespaceConfig config
- Current namespace configuration.
uriCache
private java.util.Hashtable uriCache
- Uri cache.
defaultStoreClassname
private java.lang.String defaultStoreClassname
- Default descriptors store classname.
transactionManager
private javax.transaction.TransactionManager transactionManager
- Transaction manager associated with this namespace.
logger
private org.apache.slide.util.logger.Logger logger
- Logger.
applicationLogger
private org.apache.slide.util.logger.Logger applicationLogger
- Application logger.
| Constructor Detail |
Namespace
Namespace()
- Constructor.
| Method Detail |
setName
public void setName(java.lang.String name)
- Sets the qualified name of the namespace.
getName
public java.lang.String getName()
- Gets the qulified name of the namespace.
setSearchClassName
public void setSearchClassName(java.lang.String searchClassName)
- Method setSearchClassName
getSearchClassName
public java.lang.String getSearchClassName()
- Method getSearchClassName
getConfig
public NamespaceConfig getConfig()
- Returns the namespace configuration.
enumerateScopes
public java.util.Enumeration enumerateScopes()
- Enumerate all scopes managed by this namespace.
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()
- Transaction manager accessor.
getLogger
public org.apache.slide.util.logger.Logger getLogger()
- Return the current logger.
setLogger
public void setLogger(org.apache.slide.util.logger.Logger logger)
- Set the logger used by this namespace.
getApplicationLogger
public org.apache.slide.util.logger.Logger getApplicationLogger()
- Return the current application logger.
setApplicationLogger
public void setApplicationLogger(org.apache.slide.util.logger.Logger logger)
- Set the logger used by this namespace.
registerStore
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
- Used to register a Store in the namespace for the specified scope.
First, the function instantiate the Store, then gives it
its init parameters. It is then stored in the stores
Hashtable, associated with the given scope.
dereferenceStore
java.lang.Object dereferenceStore(java.lang.String storeType, java.util.Hashtable childStores)
initializeServices
public void initializeServices()
throws ServicesInitializationFailedException
- At the end of the service registration, this service is called to
perform any required initialization task.
clearNamespace
public void clearNamespace()
- Reinitialize namespace.
connectService
public void connectService(Service service, org.apache.slide.authenticate.CredentialsToken token) throws ServiceConnectionFailedException, ServiceAccessException
- Connects a data source on demand.
disconnectServices
public void disconnectServices()
throws ServicesShutDownFailedException
- Disconnects all services.
unregisterStore
public void unregisterStore(Scope scope) throws ServiceDisconnectionFailedException, ServiceAccessException
- Remove a Store from the registry.
getStore
public org.apache.slide.store.Store getStore(Scope scope)
- Get the Data Source associated with the given scope, if any.
In contrary to the retrieveStore method, this methos does not
perform a connection.
retrieveStore
public org.apache.slide.store.Store retrieveStore(Scope scope, org.apache.slide.authenticate.CredentialsToken token) throws ServiceConnectionFailedException, ServiceAccessException
- Get the Data Source associated with the given scope, if any and
connect to the store.
getUri
public Uri getUri(java.lang.String uri)
- Builds a new uri object to access this namespace. This call will
return a Uri which doesn't have its token field set. The store should
accept such Uri as valid, and bypass any check that is made based on the
state.
getUri
public Uri getUri(SlideToken token, java.lang.String uri)
- Builds a new uri object to access this namespace.
getUri
public Uri getUri(SlideToken token, java.lang.String uri, boolean forcedEnlistment)
- Builds a new uri object to access this namespace.
clearUriCache
void clearUriCache()
- Clear uri cache.
getContentInterceptors
public org.apache.slide.content.ContentInterceptor[] getContentInterceptors()
- Get content interceptors associated with this namespace.
loadDefinition
void loadDefinition(org.apache.slide.util.conf.Configuration definition) throws SlideException, org.apache.slide.util.conf.ConfigurationException
- Parses the contents of the specified definition object, and uses that
info to initialize the namespace.
loadBaseData
void loadBaseData(org.apache.slide.util.conf.Configuration namespaceBaseDataDefinition) throws SlideException, org.apache.slide.util.conf.ConfigurationException
- Parses the contents of the specified reader, and uses that info to
initialize the specified Slide namespace.
loadConfiguration
void loadConfiguration(org.apache.slide.util.conf.Configuration namespaceConfigurationDefinition) throws SlideException
- Parses the contents of the specified reader, and uses that info to
initialize the specified Slide namespace.
loadParameters
void loadParameters(org.apache.slide.util.conf.Configuration namespaceConfigurationDefinition) throws SlideException
- Parses the contents of the specified reader, and uses that info to
initialize the specified Slide namespace.
loadExtractors
void loadExtractors(org.apache.slide.util.conf.Configuration namespaceExtractorsDefinition) throws SlideException
loadStoreDefinition
private void loadStoreDefinition(org.apache.slide.util.conf.Configuration storeDefinition, java.util.Hashtable storesClass, java.util.Hashtable storesParameters, java.util.Hashtable childStores) throws org.apache.slide.util.conf.ConfigurationException, SlideException
- Parse the store definition.
getChildStore
private void getChildStore(org.apache.slide.util.conf.Configuration storeDefinition, java.lang.String key, java.util.Hashtable currentStoreChildStores, java.util.Hashtable storeParameters) throws SlideException
loadChildStore
private Service loadChildStore(org.apache.slide.util.conf.Configuration childStoreDefinition, java.util.Hashtable fatherParameters) throws org.apache.slide.util.conf.ConfigurationException, SlideException
- Load a child descriptors store.
loadScopeDefinition
private void loadScopeDefinition(org.apache.slide.util.conf.Configuration scopeDefinition, java.util.Hashtable storesClass, java.util.Hashtable storesParameters, java.util.Hashtable childStores) throws org.apache.slide.util.conf.ConfigurationException, UnknownServiceDeclarationException, ServiceParameterErrorException, ServiceParameterMissingException, ServiceRegistrationFailedException
- Parse the content store definition.
notifyStoreCreated
private void notifyStoreCreated(java.lang.String namespaceName, java.lang.String scope, java.lang.String storeName)
toString
public java.lang.String toString()
- Get a String representation of this namespace.
|
|||||||||
| Home >> All >> org >> apache >> slide >> [ common overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.slide.common.Namespace