org.alfresco.jcr.dictionary
Class NamespaceRegistryImpl

java.lang.Object
  extended by org.alfresco.jcr.dictionary.NamespaceRegistryImpl
All Implemented Interfaces:
javax.jcr.NamespaceRegistry

public class NamespaceRegistryImpl
extends java.lang.Object
implements javax.jcr.NamespaceRegistry

Alfresco implementation of a JCR Namespace registry


Constructor Summary
NamespaceRegistryImpl(boolean allowRegistraton, org.alfresco.service.namespace.NamespaceService namespaceService)
          Construct
 
Method Summary
 org.alfresco.service.namespace.NamespaceService getNamespaceService()
          Get the namespace prefix resolver
 java.lang.String getPrefix(java.lang.String uri)
           
 java.lang.String[] getPrefixes()
           
 java.lang.String getURI(java.lang.String prefix)
           
 java.lang.String[] getURIs()
           
 void registerNamespace(java.lang.String prefix, java.lang.String uri)
           
 void unregisterNamespace(java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceRegistryImpl

public NamespaceRegistryImpl(boolean allowRegistraton,
                             org.alfresco.service.namespace.NamespaceService namespaceService)
Construct

Parameters:
namespaceService - namespace service
Method Detail

getNamespaceService

public org.alfresco.service.namespace.NamespaceService getNamespaceService()
Get the namespace prefix resolver

Returns:
the namespace prefix resolver

registerNamespace

public void registerNamespace(java.lang.String prefix,
                              java.lang.String uri)
                       throws javax.jcr.NamespaceException,
                              javax.jcr.UnsupportedRepositoryOperationException,
                              javax.jcr.AccessDeniedException,
                              javax.jcr.RepositoryException
Specified by:
registerNamespace in interface javax.jcr.NamespaceRegistry
Throws:
javax.jcr.NamespaceException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException

unregisterNamespace

public void unregisterNamespace(java.lang.String prefix)
                         throws javax.jcr.NamespaceException,
                                javax.jcr.UnsupportedRepositoryOperationException,
                                javax.jcr.AccessDeniedException,
                                javax.jcr.RepositoryException
Specified by:
unregisterNamespace in interface javax.jcr.NamespaceRegistry
Throws:
javax.jcr.NamespaceException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException

getPrefixes

public java.lang.String[] getPrefixes()
                               throws javax.jcr.RepositoryException
Specified by:
getPrefixes in interface javax.jcr.NamespaceRegistry
Throws:
javax.jcr.RepositoryException

getURIs

public java.lang.String[] getURIs()
                           throws javax.jcr.RepositoryException
Specified by:
getURIs in interface javax.jcr.NamespaceRegistry
Throws:
javax.jcr.RepositoryException

getURI

public java.lang.String getURI(java.lang.String prefix)
                        throws javax.jcr.NamespaceException,
                               javax.jcr.RepositoryException
Specified by:
getURI in interface javax.jcr.NamespaceRegistry
Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException

getPrefix

public java.lang.String getPrefix(java.lang.String uri)
                           throws javax.jcr.NamespaceException,
                                  javax.jcr.RepositoryException
Specified by:
getPrefix in interface javax.jcr.NamespaceRegistry
Throws:
javax.jcr.NamespaceException
javax.jcr.RepositoryException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.