|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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_INDEX_STORE
|
static java.lang.String |
CONTENT_STORE
|
protected static java.lang.Class |
createStoreListenerClass
|
protected static java.lang.String |
I_CREATESTORELISTENERCLASS
|
protected static java.lang.String |
I_CREATESTORELISTENERCLASS_DEFAULT
|
static java.lang.String |
LOCK_STORE
|
static java.lang.String |
NODE_STORE
|
static java.lang.String |
PROPERTIES_INDEX_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
|
static java.lang.String |
SEQUENCE_STORE
|
Constructor Summary | |
(package private) |
Namespace()
Constructor. |
Method Summary | |
void |
clearNamespace()
Reinitialize namespace. |
(package private) void |
clearUriCache()
Clear uri cache. |
void |
connectService(Service service,
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. |
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. |
java.lang.String |
getSearchClassName()
Method getSearchClassName |
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 |
loadExtractors(Configuration namespaceExtractorsDefinition)
|
(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,
CredentialsToken token)
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 |
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 |
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
public static final java.lang.String PROPERTIES_INDEX_STORE
public static final java.lang.String CONTENT_INDEX_STORE
public static final java.lang.String SEQUENCE_STORE
protected static final java.lang.String I_CREATESTORELISTENERCLASS
protected static final java.lang.String I_CREATESTORELISTENERCLASS_DEFAULT
protected static java.lang.Class createStoreListenerClass
Constructor Detail |
Namespace()
Method Detail |
public void setName(java.lang.String name)
name
- Name of the namespacepublic java.lang.String getName()
public void setSearchClassName(java.lang.String searchClassName)
searchClassName
- classname of the search implementationpublic java.lang.String getSearchClassName()
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 stores
ServiceRegistrationFailed
- An error occured during
instantiation of the service
ServiceParameterErrorException
- Incorrect service parameter
ServiceParameterMissingException
- Service parameter missing
ServiceRegistrationFailedException
java.lang.Object dereferenceStore(java.lang.String storeType, java.util.Hashtable childStores)
public void initializeServices() throws ServicesInitializationFailedException
ServicesInitializationFailedException
- One or more
exception occured while initializing servicespublic void clearNamespace()
public void connectService(Service service, CredentialsToken token) throws ServiceConnectionFailedException, ServiceAccessException
service
- Service on which a connection attempt will be madetoken
- the credentials token containing e.g. the credential
ServiceConnectionFailedException
- Error connecting service
ServiceAccessException
- 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 disconnect
ServiceDisconnctionFailedException
- Error disconnecting
DescriptorsStore
ServiceAccessException
- Unspecified error during
service access
ServiceDisconnectionFailedException
public Store getStore(Scope scope)
scope
- Scope to matchpublic Store retrieveStore(Scope scope, CredentialsToken token) throws ServiceConnectionFailedException, ServiceAccessException
scope
- Scope to matchtoken
- the Credeantials token containing e.g. the credential
ServiceConnectionFailedException
- Connection to Store failed
ServiceAccessException
- Unspecified service access exceptionpublic Uri getUri(java.lang.String uri)
uri
- Requested Uri
public Uri getUri(SlideToken token, java.lang.String uri)
token
- SlideTokenuri
- Requested Uri
public Uri getUri(SlideToken token, java.lang.String uri, boolean forcedEnlistment)
token
- SlideTokenuri
- Requested UriforcedEnlistment
- may differ from the value set in token
void clearUriCache()
public ContentInterceptor[] getContentInterceptors()
void loadDefinition(Configuration definition) throws SlideException, ConfigurationException
definition
- Definiton of the scopes and stores of
the namespace
SlideException
- Something went wrong during registry or
services initialization
ConfigurationException
- Error parsing configuration filevoid loadBaseData(Configuration namespaceBaseDataDefinition) throws SlideException, ConfigurationException
namespaceBaseDataDefinition
- Namespace base data
SlideException
- Something went wrong during registry or
services initialization
ConfigurationException
void loadConfiguration(Configuration namespaceConfigurationDefinition) throws SlideException
namespaceConfigurationDefinition
- The configuration to load.
SlideException
- Something went wrong during registry or
services initializationvoid loadParameters(Configuration namespaceConfigurationDefinition) throws SlideException
namespaceConfigurationDefinition
- Namespace configuration
SlideException
- Something went wrong during registry or
services initializationvoid loadExtractors(Configuration namespaceExtractorsDefinition) throws SlideException
SlideException
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |