|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.spi.commons.namespace.AbstractNamespaceResolver
org.apache.jackrabbit.jcr2spi.name.NamespaceRegistryImpl
public class NamespaceRegistryImpl
NamespaceRegistryImpl
implements the JCR client facing
NamespaceRegistry.
Constructor Summary | |
---|---|
NamespaceRegistryImpl(NamespaceStorage storage,
NamespaceCache nsCache)
Create a new NamespaceRegistryImpl . |
Method Summary | |
---|---|
void |
addListener(NamespaceListener listener)
Register on NamespaceCache . |
String |
getPrefix(String uri)
Returns the prefix which is mapped to the given URI. |
String[] |
getPrefixes()
|
String |
getURI(String prefix)
Returns the URI to which the given prefix is mapped. |
String[] |
getURIs()
|
void |
registerNamespace(String prefix,
String uri)
|
void |
removeListener(NamespaceListener listener)
Unregister on NamespaceCache . |
void |
unregisterNamespace(String prefix)
|
Methods inherited from class org.apache.jackrabbit.spi.commons.namespace.AbstractNamespaceResolver |
---|
notifyNamespaceAdded, notifyNamespaceRemapped, notifyNamespaceRemoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamespaceRegistryImpl(NamespaceStorage storage, NamespaceCache nsCache)
NamespaceRegistryImpl
.
storage
- pathFactory
- Method Detail |
---|
public void registerNamespace(String prefix, String uri) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
registerNamespace
in interface NamespaceRegistry
NamespaceException
UnsupportedRepositoryOperationException
RepositoryException
NamespaceRegistry.registerNamespace(String, String)
public void unregisterNamespace(String prefix) throws NamespaceException, UnsupportedRepositoryOperationException, RepositoryException
unregisterNamespace
in interface NamespaceRegistry
NamespaceException
UnsupportedRepositoryOperationException
RepositoryException
NamespaceRegistry.unregisterNamespace(String)
public String[] getPrefixes() throws RepositoryException
getPrefixes
in interface NamespaceRegistry
RepositoryException
NamespaceRegistry.getPrefixes()
public String[] getURIs() throws RepositoryException
getURIs
in interface NamespaceRegistry
RepositoryException
NamespaceRegistry.getURIs()
public String getURI(String prefix) throws NamespaceException
NamespaceResolver
getURI
in interface NamespaceRegistry
getURI
in interface NamespaceResolver
prefix
- namespace prefix
NamespaceException
- if the prefix is unknown.NamespaceRegistry.getURI(String)
,
NamespaceResolver.getURI(String)
public String getPrefix(String uri) throws NamespaceException
NamespaceResolver
getPrefix
in interface NamespaceRegistry
getPrefix
in interface NamespaceResolver
uri
- namespace URI
NamespaceException
- if the URI is unknown.NamespaceRegistry.getPrefix(String)
,
NamespaceResolver.getPrefix(String)
public void removeListener(NamespaceListener listener)
NamespaceCache
.
removeListener
in class AbstractNamespaceResolver
listener
- the namespace listener.public void addListener(NamespaceListener listener)
NamespaceCache
.
addListener
in class AbstractNamespaceResolver
listener
- the namespace listener.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |