Examples of unregisterNamespace()


Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

     */
    public void unregisterNamespace(SessionInfo sessionInfo, String uri)
            throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
        Session session = getSessionInfoImpl(sessionInfo).getSession();
        NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
        nsReg.unregisterNamespace(nsReg.getPrefix(uri));
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

     */
    public void unregisterNamespace(SessionInfo sessionInfo, String uri)
            throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
        Session session = getSessionInfoImpl(sessionInfo).getSession();
        NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
        nsReg.unregisterNamespace(nsReg.getPrefix(uri));
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

     */
    public void unregisterNamespace(SessionInfo sessionInfo, String uri)
            throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
        Session session = getSessionInfoImpl(sessionInfo).getSession();
        NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
        nsReg.unregisterNamespace(nsReg.getPrefix(uri));
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

                String[] registeredPrefixes = nsReg.getPrefixes();
                for (int i = 0; i < registeredPrefixes.length; i++) {
                    String prfx = registeredPrefixes[i];
                    if (!changes.containsKey(prfx)) {
                        // prefix not present amongst the new values any more > unregister
                        nsReg.unregisterNamespace(prfx);
                    } else if (changes.get(prfx).equals(nsReg.getURI(prfx))) {
                        // present with same uri-value >> no action required
                        changes.remove(prfx);
                    }
                }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

          }
          if ( !keepNewNamespaces ) {
            // save old namespace
            overwrittenNamespaces.put( prefix, registry.getURI( prefix ) );
          }
          registry.unregisterNamespace( prefix );
          // postpone registration for later
        }
      }
    }
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

    NamespaceRegistry registry = getSession().getWorkspace().getNamespaceRegistry();

    for ( Object key : namespaces.keySet() ) {
      String prefix = (String) key;
      registry.unregisterNamespace( prefix );
    }

    if ( forceNamespacesRegistration ) {
      if ( LOG.isDebugEnabled() ) {
        LOG.debug( "reverting back overwritten namespaces " + overwrittenNamespaces );
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

     */
    public void unregisterNamespace(SessionInfo sessionInfo, String uri)
            throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException {
        Session session = getSessionInfoImpl(sessionInfo).getSession();
        NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
        nsReg.unregisterNamespace(nsReg.getPrefix(uri));
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

        nsReg.registerNamespace("foo", "file:///foo");
        assertTrue(asList(nsReg.getPrefixes()).contains("foo"));
        assertTrue(asList(nsReg.getURIs()).contains("file:///foo"));

        nsReg.unregisterNamespace("foo");
        assertFalse(asList(nsReg.getPrefixes()).contains("foo"));
        assertFalse(asList(nsReg.getURIs()).contains("file:///foo"));
    }

    @Test
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

        assertEquals("bar:test", n.getName());
        s.logout();

        getAdminSession().getRootNode().getNode("foo:test").remove();
        getAdminSession().save();
        nsReg.unregisterNamespace("foo");
    }

    @Test
    public void registryRemappedNamespace() throws RepositoryException {
        NamespaceRegistry nsReg =
View Full Code Here

Examples of javax.jcr.NamespaceRegistry.unregisterNamespace()

            // expected
        } finally {
            getAdminSession().getRootNode().getNode("foo:test").remove();
            getAdminSession().save();

            nsReg.unregisterNamespace("foo");
        }
    }

    @Test
    public void mixin() throws RepositoryException {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.