org.jboss.portal.registration
Interface Consumer

All Known Implementing Classes:
ConsumerImpl, PersistentConsumer

public interface Consumer

An entity that groups several registrations under the same scope, for exemple a Consumer entity could be related to several registrations for the same consumer with different capabilities.

Since:
2.6
Version:
$Revision:5641 $
Author:
Julien Viet, @author Chris Laprun

Method Summary
 ConsumerCapabilities getCapabilities()
           
 java.lang.String getConsumerAgent()
           
 ConsumerGroup getGroup()
          Returns the group that this consumer belongs to.
 java.lang.String getId()
          Retrieves this Consumer's identity, which uniquely identifies the Consumer since the name cannot be relied on.
 java.lang.String getName()
          Return the consumer name.
 java.util.Collection getRegistrations()
          Return all the registrations for the specified consumer.
 RegistrationStatus getStatus()
          Return the registration status of the consumer entity.
 void setCapabilities(ConsumerCapabilities capabilities)
           
 void setConsumerAgent(java.lang.String consumerAgent)
           
 void setGroup(ConsumerGroup group)
           
 void setStatus(RegistrationStatus status)
          Set the registration status of the consumer entity.
 

Method Detail

getName

java.lang.String getName()
Return the consumer name.

Returns:
the consumer name

getStatus

RegistrationStatus getStatus()
Return the registration status of the consumer entity.

Returns:
the registration stats.

setStatus

void setStatus(RegistrationStatus status)
Set the registration status of the consumer entity.

Parameters:
status - the registration status

getRegistrations

java.util.Collection getRegistrations()
                                      throws RegistrationException
Return all the registrations for the specified consumer.

Returns:
the consumer registrations
Throws:
RegistrationException

getGroup

ConsumerGroup getGroup()
Returns the group that this consumer belongs to.

Returns:
the consumer group

getId

java.lang.String getId()
Retrieves this Consumer's identity, which uniquely identifies the Consumer since the name cannot be relied on. It is up to the RegistrationPolicy to determine what the Consumer's identity is. Note also that this is different from the Consumer's database identifier.

Returns:
this Consumer's identity.

getCapabilities

ConsumerCapabilities getCapabilities()

setCapabilities

void setCapabilities(ConsumerCapabilities capabilities)

setGroup

void setGroup(ConsumerGroup group)
              throws RegistrationException,
                     DuplicateRegistrationException
Throws:
RegistrationException
DuplicateRegistrationException

getConsumerAgent

java.lang.String getConsumerAgent()

setConsumerAgent

void setConsumerAgent(java.lang.String consumerAgent)
                      throws java.lang.IllegalArgumentException,
                             java.lang.IllegalStateException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException