protected void initializeExtensionPoints(Brix brix) {
   ExtensionPointRegistry registry = brix.getConfig().getRegistry();
   registry.register(RepositoryInitializer.POINT, new HierarchicalRepoInitializer());
   registry.register(JcrNodeWrapperFactory.POINT, TitledNode.FACTORY);
   registry.register(
       getManageNodeTabFactoryExtensionPoint(),
       new ManageFolderNodeTabFactory(getPluginLocator()));
 }
  /**
   * Creates a uri path for the specified <code>node</code> By default this method uses {@link
   * BrixConfig#getMapper()} to map node path to a uri path.
   *
   * @param node node to create uri path for
   * @return uri path that represents the node
   */
  public Path getUriPathForNode(final BrixNode node) {
    // allow site plugin to translate jcr path into node path
    final String jcrPath = SitePlugin.get().fromRealWebNodePath(node.getPath());
    final Path nodePath = new Path(jcrPath);

    // use urimapper to create the uri
    return brix.getConfig().getMapper().getUriPathForNode(nodePath, brix);
  }
  /**
   * Resolves uri path to a {@link BrixNode}. By default this method uses {@link
   * BrixConfig#getMapper()} to map the uri to a node path.
   *
   * @param uriPath uri path
   * @return node that maps to the <code>uriPath</code> or <code>null</code> if none
   */
  public BrixNode getNodeForUriPath(final Path uriPath) {
    BrixNode node = null;

    // create desired nodepath
    final Path nodePath =
        brix.getConfig().getMapper().getNodePathForUriPath(uriPath.toAbsolute(), brix);

    if (nodePath != null) {
      // allow site plugin to translate the node path into an actual jcr
      // path
      final String jcrPath = SitePlugin.get().toRealWebNodePath(nodePath.toString());

      // retrieve jcr session
      final String workspace = getWorkspace();
      final JcrSession session = brix.getCurrentSession(workspace);

      if (session.itemExists(jcrPath)) {
        // node exists, return it
        node = (BrixNode) session.getItem(jcrPath);
      }
    }

    return node;
  }
 public Collection<? extends ManageNodeTabFactory> getManageNodeTabFactories() {
   return brix.getConfig().getRegistry().lookupCollection(getManageNodeTabFactoryExtensionPoint());
 }
 public Collection<? extends NodeEditorPlugin> getNodeEditorPlugins() {
   return brix.getConfig().getRegistry().lookupCollection(getNodeEditorPluginExtensionPoint());
 }
 private String getDefaultWorkspaceName() {
   final Workspace workspace =
       brix.getConfig().getMapper().getWorkspaceForRequest(RequestCycle.get(), brix);
   return (workspace != null) ? workspace.getId() : null;
 }