Exemplo n.º 1
0
  private void initDefaultWorkspace() {
    final String defaultState = getProperties().getWorkspaceDefaultState();
    final String wn = getProperties().getJcrDefaultWorkspace();
    final SitePlugin sp = SitePlugin.get(brix);

    if (!sp.siteExists(wn, defaultState)) {
      Workspace w = sp.createSite(wn, defaultState);
      JcrSession session = brix.getCurrentSession(w.getId());

      session.importXML(
          "/", getWorkspaceXml(), ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);

      brix.initWorkspace(w, session);
      session.save();
    }
  }