Package org.gatein.registration

Examples of org.gatein.registration.NoSuchRegistrationException


            createConsumerGroup(groupName);
            justCreatedGroup = true;
         }
         else
         {
            throw new NoSuchRegistrationException("There is no existing ConsumerGroup named '" + groupName + "'.");
         }
      }

      String identity = policy.getConsumerIdFrom(consumerName, Collections.EMPTY_MAP);
      try
View Full Code Here


   public void removeRegistration(String registrationHandle) throws RegistrationException, NoSuchRegistrationException
   {
      Registration registration = getRegistration(registrationHandle);
      if (registration == null)
      {
         throw new NoSuchRegistrationException("There is no Registration with handle '" + registrationHandle + "'");
      }
      removeRegistration(registration);
   }
View Full Code Here

         {
            consumer = createConsumer(consumerName);
         }
         else
         {
            throw new NoSuchRegistrationException("There is no Consumer named '" + consumerName + "'.");
         }
      }
      return consumer;
   }
View Full Code Here

   public void removeConsumerGroup(String name) throws RegistrationException
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "ConsumerGroup name", null);
      if (internalRemoveConsumerGroup(name) == null)
      {
         throw new NoSuchRegistrationException("There is no ConsumerGroup named '" + name + "'.");
      }
   }
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(registrationId, "Registration identity", null);

      RegistrationSPI registration = internalRemoveRegistration(registrationId);
      if (registration == null)
      {
         throw new NoSuchRegistrationException("There is no Registration with id '" + registrationId + "'");
      }

      ConsumerSPI consumer = registration.getConsumer();
      consumer.removeRegistration(registration);
   }
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNull(registrationProperties, "Registration properties");

      ConsumerSPI consumer = getConsumerSPIById(consumerId);
      if (consumer == null)
      {
         throw new NoSuchRegistrationException("There is no Consumer with identity '" + consumerId
            + "' to add a Registration to...");
      }

      return addRegistrationFor(consumer, registrationProperties);
   }
View Full Code Here

      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(groupName, "ConsumerGroup name", null);

      ConsumerGroup group = getConsumerGroup(groupName);
      if (group == null)
      {
         throw new NoSuchRegistrationException("There is no ConsumerGroup named '" + groupName
            + "' to add a Consumer to...");
      }

      ConsumerSPI consumer = getConsumerSPIById(consumerId);
      if (consumer == null)
      {
         throw new NoSuchRegistrationException("There is no Consumer with identity '" + consumerId
            + "' to add to ConsumerGroup named '" + groupName + "'. Did you create it?");
      }

      group.addConsumer(consumer);
View Full Code Here

   {
      ParameterValidation.throwIllegalArgExceptionIfNull(consumer, "Consumer");

      if (consumers.remove(consumer.getId()) == null)
      {
         throw new NoSuchRegistrationException("ConsumerGroup named '" + name
            + "' does not contain a Consumer named '" + consumer.getName() + "' (identity: '" + consumer.getId()
            + "')");
      }

      consumer.setGroup(null);
View Full Code Here

TOP

Related Classes of org.gatein.registration.NoSuchRegistrationException

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.