Package org.gatein.registration

Examples of org.gatein.registration.DuplicateRegistrationException


      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId, "Consumer identity", null);
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName, "Consumer name", null);

      if (isConsumerExisting(consumerId))
      {
         throw new DuplicateRegistrationException("A Consumer with identifier '" + consumerId + "' has already been registered.");
      }
      else
      {
         ConsumerSPI consumer = internalCreateConsumer(consumerId, consumerName);
         internalAddConsumer(consumer);
View Full Code Here


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

      if (isConsumerGroupExisting(name))
      {
         throw new DuplicateRegistrationException("A ConsumerGroup named '" + name + "' has already been registered.");
      }
      else
      {
         final ConsumerGroupSPI group = internalCreateConsumerGroup(name);
         internalAddConsumerGroup(group);
View Full Code Here

         // for this consumer...
         for (Registration registration : consumer.getRegistrations())
         {
            if (registration.hasEqualProperties(registrationProperties))
            {
               throw new DuplicateRegistrationException("Consumer named '" + consumer.getName()
                  + "' has already been registered with the same set of registration properties. Registration rejected!", null, registration);
            }
         }
      }
   }
View Full Code Here

   /** Rejects registration if a Consumer with the specified name already exists. */
   public void validateConsumerName(String consumerName, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
   {
      if (manager.isConsumerExisting(getConsumerIdFrom(consumerName, Collections.<QName, Object>emptyMap())))
      {
         throw new DuplicateRegistrationException("A Consumer named '" + consumerName + "' has already been registered.");
      }
   }
View Full Code Here

         // for this consumer...
         for (Registration registration : consumer.getRegistrations())
         {
            if (registration.hasEqualProperties(registrationProperties))
            {
               throw new DuplicateRegistrationException("Consumer named '" + consumer.getName()
                  + "' has already been registered with the same set of registration properties. Registration rejected!", null, registration);
            }
         }
      }
   }
View Full Code Here

   /** Rejects registration if a Consumer with the specified name already exists. */
   public void validateConsumerName(String consumerName, final RegistrationManager manager) throws IllegalArgumentException, RegistrationException
   {
      if (manager.isConsumerExisting(getConsumerIdFrom(consumerName, Collections.<QName, Object>emptyMap())))
      {
         throw new DuplicateRegistrationException("A Consumer named '" + consumerName + "' has already been registered.");
      }
   }
View Full Code Here

TOP

Related Classes of org.gatein.registration.DuplicateRegistrationException

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.