Examples of findByPath()


Examples of org.chromattic.api.ChromatticSession.findByPath()

   {
      try
      {
         ChromatticSession session = persister.getSession();

         ProducerConfigurationMapping pcm = session.findByPath(ProducerConfigurationMapping.class, PRODUCER_CONFIGURATION_PATH);
         if (pcm == null)
         {
            pcm = session.insert(ProducerConfigurationMapping.class, PRODUCER_CONFIGURATION_PATH);
         }
         pcm.initFrom(configuration.get());
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

   public long getPersistedLastModifiedForConfiguration()
   {
      try
      {
         ChromatticSession session = persister.getSession();
         ProducerConfigurationMapping pcm = session.findByPath(ProducerConfigurationMapping.class, PRODUCER_CONFIGURATION_PATH);

         return (pcm == null) ? 0 : pcm.getLastModified();
      }
      finally
      {
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

   {
      try
      {
         ChromatticSession session = persister.getSession();

         ExportInfoMapping eim = session.findByPath(ExportInfoMapping.class, getPathFor(exportTime));
         if (eim != null)
         {
            return eim.toModel(null, null);
         }
         else
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

   {
      try
      {
         ChromatticSession session = persister.getSession();

         ExportInfoMapping eim = session.findByPath(ExportInfoMapping.class, getChildPath(info));
         long exportTime = info.getExportTime();
         if (eim != null)
         {
            throw new IllegalArgumentException("An ExportInfo with export time "
               + exportTime + " already exists!");
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

      this.persister = persister;

      try
      {
         ChromatticSession session = persister.getSession();
         ConsumersAndGroupsMapping mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
         if (mappings == null)
         {
            session.insert(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
            persister.save();
         }
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

      try
      {
         ChromatticSession session = persister.getSession();

         ConsumersAndGroupsMapping mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
         ConsumerMapping cm = mappings.createConsumer(consumerId);
         mappings.getConsumers().add(cm);
         cm.initFrom(consumer);
         consumer.setPersistentKey(cm.getPersistentKey());
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

      try
      {
         ChromatticSession session = persister.getSession();

         ConsumersAndGroupsMapping mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
         ConsumerGroupMapping cgm = mappings.createConsumerGroup(name);
         mappings.getConsumerGroups().add(cgm);
         group.setPersistentKey(cgm.getPersistentKey());
         cgm.initFrom(group);
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

   {
      try
      {
         final ChromatticSession session = persister.getSession();

         ConsumersAndGroupsMapping mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
         final List<ConsumerGroupMapping> groupMappings = mappings.getConsumerGroups();
         List<ConsumerGroup> groups = new ArrayList<ConsumerGroup>(groupMappings.size());
         for (ConsumerGroupMapping cgm : groupMappings)
         {
            groups.add(cgm.toModel(newConsumerGroupSPI(cgm.getName()), this));
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

   {
      try
      {
         final ChromatticSession session = persister.getSession();

         ConsumersAndGroupsMapping mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
         final List<ConsumerMapping> consumerMappings = mappings.getConsumers();
         List<Consumer> consumers = new ArrayList<Consumer>(consumerMappings.size());
         for (ConsumerMapping consumerMapping : consumerMappings)
         {
            consumers.add(consumerMapping.toModel(newConsumerSPI(consumerMapping.getId(), consumerMapping.getName()), this));
View Full Code Here

Examples of org.chromattic.api.ChromatticSession.findByPath()

        this.mopManager = mopManager;
    }

    public ContentRegistry getContentRegistry() {
        ChromatticSession session = lifeCycle.getChromattic().openSession();
        ContentRegistry registry = session.findByPath(ContentRegistry.class, "app:applications");
        if (registry == null) {
            registry = session.insert(ContentRegistry.class, "app:applications");
        }
        return registry;
    }
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.