Package org.exoplatform.services.jcr.storage.value

Examples of org.exoplatform.services.jcr.storage.value.ValueStoragePlugin


               {
                  log.error("Not a ValueStoragePlugin object IGNORED: " + o);
                  continue;
               }

               ValueStoragePlugin plugin = (ValueStoragePlugin)o;
               // init filters
               ArrayList<ValuePluginFilter> filters = new ArrayList<ValuePluginFilter>();
               List<ValueStorageFilterEntry> filterEntries = storageEntry.getFilters();
               for (ValueStorageFilterEntry filterEntry : filterEntries)
               {
                  ValuePluginFilter filter =
                     new ValuePluginFilter(PropertyType.valueFromName(filterEntry.getPropertyType()), null, null,
                        filterEntry.getMinValueSize());
                  filters.add(filter);
               }

               // init properties
               Properties props = new Properties();
               List<SimpleParameterEntry> paramEntries = storageEntry.getParameters();
               for (SimpleParameterEntry paramEntry : paramEntries)
               {
                  props.setProperty(paramEntry.getName(), paramEntry.getValue());
               }

               plugin.init(props, resorcesHolder);
               plugin.setId(storageEntry.getId());
               plugin.setFilters(filters);

               add(plugin);
               log.info("Value Storage Plugin initialized " + plugin);
            }
         }
View Full Code Here


   public ValueIOChannel getApplicableChannel(PropertyData property, int valueOrderNumer) throws IOException
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         List<ValuePluginFilter> filters = plugin.getFilters();
         for (ValuePluginFilter filter : filters)
         {
            if (filter.match(property, valueOrderNumer))
               return plugin.openIOChannel();
         }
      }
      return null;
   }
View Full Code Here

   public void checkConsistency(WorkspaceStorageConnection dataConnection)
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         plugin.checkConsistency(dataConnection);
      }
   }
View Full Code Here

   public ValueIOChannel getChannel(String storageId) throws IOException, ValueStorageNotFoundException
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         if (plugin.isSame(storageId))
         {
            return plugin.openIOChannel();
         }
      }
      throw new ValueStorageNotFoundException("No value storage found with id " + storageId);
   }
View Full Code Here

            {
               log.error("Not a ValueStoragePlugin object IGNORED: " + o);
               continue;
            }

            ValueStoragePlugin plugin = (ValueStoragePlugin)o;
            // init filters
            ArrayList<ValuePluginFilter> filters = new ArrayList<ValuePluginFilter>();
            List<ValueStorageFilterEntry> filterEntries = storageEntry.getFilters();
            for (ValueStorageFilterEntry filterEntry : filterEntries)
            {
               ValuePluginFilter filter =
                  new ValuePluginFilter(PropertyType.valueFromName(filterEntry.getPropertyType()), null, null,
                     filterEntry.getMinValueSize());
               filters.add(filter);
            }

            // init properties
            Properties props = new Properties();
            List<SimpleParameterEntry> paramEntries = storageEntry.getParameters();
            for (SimpleParameterEntry paramEntry : paramEntries)
            {
               props.setProperty(paramEntry.getName(), paramEntry.getValue());
            }

            plugin.init(props, resorcesHolder);
            plugin.setId(storageEntry.getId());
            plugin.setFilters(filters);

            add(plugin);
            log.info("Value Storage Plugin initialized " + plugin);
         }
   }
View Full Code Here

   public ValueIOChannel getApplicableChannel(PropertyData property, int valueOrderNumer) throws IOException
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         List<ValuePluginFilter> filters = plugin.getFilters();
         for (ValuePluginFilter filter : filters)
         {
            if (filter.match(property, valueOrderNumer))
               return plugin.openIOChannel();
         }
      }
      return null;
   }
View Full Code Here

   public void checkConsistency(WorkspaceStorageConnection dataConnection)
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         plugin.checkConsistency(dataConnection);
      }
   }
View Full Code Here

   public ValueIOChannel getChannel(String storageId) throws IOException, ValueStorageNotFoundException
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         if (plugin.isSame(storageId))
         {
            return plugin.openIOChannel();
         }
      }
      throw new ValueStorageNotFoundException("No value storage found with id " + storageId);
   }
View Full Code Here

            {
               log.error("Not a ValueStoragePlugin object IGNORED: " + o);
               continue;
            }

            ValueStoragePlugin plugin = (ValueStoragePlugin) o;
            // init filters
            ArrayList<ValuePluginFilter> filters = new ArrayList<ValuePluginFilter>();
            List<ValueStorageFilterEntry> filterEntries = storageEntry.getFilters();
            for (ValueStorageFilterEntry filterEntry : filterEntries)
            {
               ValuePluginFilter filter =
                        new ValuePluginFilter(PropertyType.valueFromName(filterEntry.getPropertyType()), null, null,
                                 filterEntry.getMinValueSize());
               filters.add(filter);
            }

            // init properties
            Properties props = new Properties();
            List<SimpleParameterEntry> paramEntries = storageEntry.getParameters();
            for (SimpleParameterEntry paramEntry : paramEntries)
            {
               props.setProperty(paramEntry.getName(), paramEntry.getValue());
            }

            plugin.init(props, resorcesHolder);
            plugin.setId(storageEntry.getId());
            plugin.setFilters(filters);

            add(plugin);
            log.info("Value Storage Plugin initialized " + plugin);
         }
   }
View Full Code Here

   public ValueIOChannel getApplicableChannel(PropertyData property, int valueOrderNumer) throws IOException
   {
      Iterator<ValueStoragePlugin> plugins = iterator();
      while (plugins.hasNext())
      {
         ValueStoragePlugin plugin = plugins.next();
         List<ValuePluginFilter> filters = plugin.getFilters();
         for (ValuePluginFilter filter : filters)
         {
            if (filter.match(property, valueOrderNumer))
               return plugin.openIOChannel();
         }
      }
      return null;
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.storage.value.ValueStoragePlugin

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.