Package org.exoplatform.services.jcr.config

Examples of org.exoplatform.services.jcr.config.ContainerEntry


    * @throws RepositoryConfigurationException
    * @throws IOException
    */
   public void removeWorkspaceValueStorage(WorkspaceEntry wEntry) throws RepositoryConfigurationException, IOException
   {
      ContainerEntry containerEntry = wEntry.getContainer();

      if (containerEntry.getValueStorages() != null)
      {
         for (ValueStorageEntry valueStorageEntry : containerEntry.getValueStorages())
         {
            String valueStorageDirName = valueStorageEntry.getParameterValue(FileValueStorage.PATH);
           
            File valueStorageDir = new File(valueStorageDirName);
            if (PrivilegedFileHelper.exists(valueStorageDir))
View Full Code Here


    * @throws RepositoryConfigurationException
    * @throws IOException
    */
   public void removeWorkspaceValueStorage(WorkspaceEntry wEntry) throws RepositoryConfigurationException, IOException
   {
      ContainerEntry containerEntry = wEntry.getContainer();

      if (containerEntry.getValueStorages() != null)
      {
         for (ValueStorageEntry valueStorageEntry : containerEntry.getValueStorages())
         {
            String valueStorageDirName = valueStorageEntry.getParameterValue(FileValueStorage.PATH);
           
            File valueStorageDir = new File(valueStorageDirName);
            if (valueStorageDir.exists())
View Full Code Here

            newp.setValue("target/temp/swap/" + name + System.currentTimeMillis());

         params.add(newp);
      }

      ContainerEntry ce =
               new ContainerEntry("org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer", params);
     
      ArrayList<ValueStorageEntry> list = new ArrayList<ValueStorageEntry>();

      // value storage
      ArrayList<ValueStorageFilterEntry> vsparams = new ArrayList<ValueStorageFilterEntry>();
      ValueStorageFilterEntry filterEntry = new ValueStorageFilterEntry();
      filterEntry.setPropertyType("Binary");
      vsparams.add(filterEntry);

      ValueStorageEntry valueStorageEntry =
         new ValueStorageEntry("org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage", vsparams);
      ArrayList<SimpleParameterEntry> spe = new ArrayList<SimpleParameterEntry>();
      spe.add(new SimpleParameterEntry("path", "target/temp/values/" + name + "_" + System.currentTimeMillis()));
      valueStorageEntry.setId("draft");
      valueStorageEntry.setParameters(spe);
      valueStorageEntry.setFilters(vsparams);

      // containerEntry.setValueStorages();
      list.add(valueStorageEntry);
      ce.setValueStorages(list);


      ws1back.setContainer(ce);

      return ws1back;
View Full Code Here

            newp.setValue("false");

         params.add(newp);
      }

      ContainerEntry ce =
               new ContainerEntry("org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer", params);
     
      ArrayList list = new ArrayList();
     
      // value storage
      ArrayList<ValueStorageFilterEntry> vsparams = new ArrayList<ValueStorageFilterEntry>();
      ValueStorageFilterEntry filterEntry = new ValueStorageFilterEntry();
      filterEntry.setPropertyType("Binary");
      vsparams.add(filterEntry);

      ValueStorageEntry valueStorageEntry =
         new ValueStorageEntry("org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage", vsparams);
      ArrayList<SimpleParameterEntry> spe = new ArrayList<SimpleParameterEntry>();
      spe.add(new SimpleParameterEntry("path", "target/temp/swap/" + repoName + "_" + wsName + "_"
         + System.currentTimeMillis()));
      valueStorageEntry.setId("draft");
      valueStorageEntry.setParameters(spe);
      valueStorageEntry.setFilters(vsparams);

      // containerEntry.setValueStorages();
      list.add(valueStorageEntry);
      ce.setValueStorages(list);

      ws1back.setContainer(ce);

      return ws1back;
   }
View Full Code Here

            newp.setValue(Boolean.toString(multiDb));

         params.add(newp);
      }

      ContainerEntry ce = new ContainerEntry(defWEntry.getContainer().getType(), params);
      ws1back.setContainer(ce);

      return ws1back;
   }
View Full Code Here

            newp.setValue("false");

         params.add(newp);
      }

      ContainerEntry ce = new ContainerEntry(defWEntry.getContainer().getType(), params);
      ws1back.setContainer(ce);

      return ws1back;
   }
View Full Code Here

   public WorkspaceEntry copyWorkspaceEntry(WorkspaceEntry baseWorkspaceEntry) throws Exception
   {
      // container entry
      ArrayList<SimpleParameterEntry> params = new ArrayList<SimpleParameterEntry>();
      params.addAll(copyList(baseWorkspaceEntry.getContainer().getParameters()));
      ContainerEntry containerEntry =
               new ContainerEntry(baseWorkspaceEntry.getContainer().getType(), params);
      containerEntry.setParameters(params);

      // value storage
      ArrayList<ValueStorageEntry> list = new ArrayList<ValueStorageEntry>();

     
      for (ValueStorageEntry baseValueStorageEntry : baseWorkspaceEntry.getContainer().getValueStorages())
      {
         ArrayList<ValueStorageFilterEntry> vsparams = new ArrayList<ValueStorageFilterEntry>();

         for (ValueStorageFilterEntry baseValueStorageFilterEntry : baseValueStorageEntry.getFilters())
         {
            ValueStorageFilterEntry filterEntry = new ValueStorageFilterEntry();
            filterEntry.setPropertyType(baseValueStorageFilterEntry.getPropertyType());
            filterEntry.setPropertyName(baseValueStorageFilterEntry.getPropertyName());
            filterEntry.setAncestorPath(baseValueStorageFilterEntry.getAncestorPath());
            filterEntry.setMinValueSize(baseValueStorageFilterEntry.getMinValueSize());

            vsparams.add(filterEntry);
         }

         ValueStorageEntry valueStorageEntry =
                  new ValueStorageEntry(baseValueStorageEntry.getType(),vsparams);
         ArrayList<SimpleParameterEntry> spe = new ArrayList<SimpleParameterEntry>();
         spe.addAll(copyList(baseValueStorageEntry.getParameters()));
         valueStorageEntry.setId(baseValueStorageEntry.getId());
         valueStorageEntry.setParameters(spe);
         valueStorageEntry.setFilters(vsparams);

         // containerEntry.setValueStorages();
         list.add(valueStorageEntry);
      }

      containerEntry.setValueStorages(list);

      // Indexer
      params = new ArrayList<SimpleParameterEntry>();
      params.addAll(copyList(baseWorkspaceEntry.getQueryHandler().getParameters()));
      QueryHandlerEntry qEntry =
View Full Code Here

      params.add(new SimpleParameterEntry("multi-db", isMultiDb ? "true" : "false"));
      params.add(new SimpleParameterEntry("max-buffer-size", "204800"));
      params.add(new SimpleParameterEntry("dialect", "auto"));
      params.add(new SimpleParameterEntry("swap-directory", "target/temp/swap/" + wsName));

      ContainerEntry containerEntry =
         new ContainerEntry("org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer",
            (ArrayList)params);
      containerEntry.setParameters(params);

      // value storage
      ArrayList list = new ArrayList();
      if (valueStorageIds != null)
      {
         for (String vsId : valueStorageIds)
         {
            ArrayList<ValueStorageFilterEntry> vsparams = new ArrayList<ValueStorageFilterEntry>();
            ValueStorageFilterEntry filterEntry = new ValueStorageFilterEntry();
            filterEntry.setPropertyType("Binary");
            vsparams.add(filterEntry);

            ValueStorageEntry valueStorageEntry =
               new ValueStorageEntry("org.exoplatform.services.jcr.impl.storage.value.fs.SimpleFileValueStorage",
                  vsparams);
            ArrayList<SimpleParameterEntry> spe = new ArrayList<SimpleParameterEntry>();
            spe.add(new SimpleParameterEntry("path", "target/temp/values/" + wsName + "-" + vsId));
            valueStorageEntry.setId(vsId);
            valueStorageEntry.setParameters(spe);
            valueStorageEntry.setFilters(vsparams);

            // containerEntry.setValueStorages();
            containerEntry.setParameters(params);
            list.add(valueStorageEntry);
         }
      }

      containerEntry.setValueStorages(list);

      // Indexer
      params = new ArrayList();
      params.add(new SimpleParameterEntry("index-dir", "target/temp/index/" + wsName));
      QueryHandlerEntry qEntry =
View Full Code Here

            newp.setValue("hsqldb");

         params.add(newp);
      }

      ContainerEntry ce =
               new ContainerEntry("org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer", params);
      ws1back.setContainer(ce);

      return ws1back;
   }
View Full Code Here

      params.add(new SimpleParameterEntry("multi-db", isMultiDb ? "true" : "false"));
      params.add(new SimpleParameterEntry("max-buffer-size", "204800"));
      params.add(new SimpleParameterEntry("dialect", "auto"));
      params.add(new SimpleParameterEntry("swap-directory", "target/temp/swap/" + wsName));

      ContainerEntry containerEntry =
         new ContainerEntry("org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer",
            (ArrayList)params);
      containerEntry.setParameters(params);

      // value storage
      ArrayList list = new ArrayList();
      if (valueStorageIds != null)
      {
         for (String vsId : valueStorageIds)
         {
            ArrayList<ValueStorageFilterEntry> vsparams = new ArrayList<ValueStorageFilterEntry>();
            ValueStorageFilterEntry filterEntry = new ValueStorageFilterEntry();
            filterEntry.setPropertyType("Binary");
            vsparams.add(filterEntry);

            ValueStorageEntry valueStorageEntry =
               new ValueStorageEntry("org.exoplatform.services.jcr.impl.storage.value.fs.SimpleFileValueStorage",
                  vsparams);
            ArrayList<SimpleParameterEntry> spe = new ArrayList<SimpleParameterEntry>();
            spe.add(new SimpleParameterEntry("path", "target/temp/values/" + wsName + "-" + vsId));
            valueStorageEntry.setId(vsId);
            valueStorageEntry.setParameters(spe);
            valueStorageEntry.setFilters(vsparams);

            // containerEntry.setValueStorages();
            containerEntry.setParameters(params);
            list.add(valueStorageEntry);
         }
      }

      containerEntry.setValueStorages(list);

      // Indexer
      params = new ArrayList();
      params.add(new SimpleParameterEntry("index-dir", "target/temp/index/" + wsName));
      QueryHandlerEntry qEntry =
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.config.ContainerEntry

Copyright © 2018 www.massapicom. 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.