| |
|
| org.jboss.portal.registration.RegistrationPolicy
All known Subclasses: org.jboss.portal.registration.policies.DefaultRegistrationPolicy, org.jboss.portal.test.wsrp.config.TestRegistrationPolicy,
RegistrationPolicy | public interface RegistrationPolicy (Code) | | An interface allowing users of the Registration service to customize different aspects of how Consumers are handled.
Methods of this interface are used by RegistrationManager to make appropriate decisions. Implementations of this
interface MUST provide a no-argument constructor for instantiation from the class name.
author: Chris Laprun version: $Revision: 9177 $ since: 2.6 |
createRegistrationHandleFor | String createRegistrationHandleFor(String registrationId) throws IllegalArgumentException(Code) | | Generates a registration handle based on the database identity of the Registration. This allows users to customize
the registration handle format if they want to prevent exposure of database-related data.
Parameters: registrationId - the database identity of the Registration for which a handle is required. a registration handle for the Registration associated with the specified identifier. throws: IllegalArgumentException - if the specified registration identity if null or empty |
getAutomaticGroupNameFor | String getAutomaticGroupNameFor(String consumerName) throws IllegalArgumentException(Code) | | Determines the ConsumerGroup name to which the Consumer associated with the specified name should be assigned with
or null if the Consumer should not be automatically assigned to a ConsumerGroup. This method is
called during the Consumer creation process to see if the Consumer should be automatically added to a
ConsumerGroup.
Parameters: consumerName - the name of the Consumer being created the name of the ConsumerGroup the Consumer must be automatically added to or null if theConsumer will not be automatically to a ConsumerGroup at creation throws: IllegalArgumentException - if the specified Consumer name if null or empty |
getConsumerIdFrom | String getConsumerIdFrom(String consumerName, Map registrationProperties) throws IllegalArgumentException, InvalidConsumerDataException(Code) | | Obtains a consumer identity which uniquely identifies a Consumer in function of the consumer name and registration
properties. This is potentially necessary because Consumer names are not guaranteed to be unique (even though the
specification states that they should).
Parameters: consumerName - the consumer name Parameters: registrationProperties - a Map containing the registration properties in the form of property name (QName) -property value (Object) mappings. Producer implementations might use theregistration properties to provide secure Consumer identity. the consumer identity throws: InvalidConsumerDataException - if the Policy examines the specified registration properties to determine theConsumer identity and decides that they are not in a proper state throws: IllegalArgumentException - if the specified Consumer name if null or empty |
getManager | RegistrationManager getManager()(Code) | | Retrieves the RegistrationManager with which this RegistrationPolicy is associated.
the RegistrationManager with which this RegistrationPolicy is associated. |
setExpectations | void setExpectations(Map<QName, ? extends PropertyDescription> registrationPropertyDescriptions)(Code) | | Define what the expectations are as far as acceptable registration properties go.
Parameters: registrationPropertyDescriptions - a map of containing the description of expected registrations since: 2.6.3 |
setManager | void setManager(RegistrationManager manager)(Code) | | Associates this RegistrationPolicy with the specified RegistrationManager. This method should not be called
directly by client code as it used in the wiring process of the Registration service.
Parameters: manager - the RegistrationManager with which this RegistrationPolicy should be associated. |
validateConsumerName | void validateConsumerName(String consumerName) throws IllegalArgumentException, RegistrationException(Code) | | Determines if the specified Consumer name is acceptable. This method is called before a Consumer is created and
before a unique Consumer identity is created. This is in particular used if the Policy mandates that Consumer
names must be unique.
Parameters: consumerName - the name of the Consumer as passed during the registration process throws: IllegalArgumentException - if the specified Consumer name if null or empty throws: RegistrationException - if an exception occurred in the Registration service |
validateRegistrationDataFor | void validateRegistrationDataFor(Map registrationProperties, String consumerIdentity) throws IllegalArgumentException, RegistrationException(Code) | | Examines and determines whether the given registration properties are adequate for the Consumer associated with
the given identity. This method is called before a Registration is created and thus allows users to decide whether
or not to reject a given registration if not satisfied with the given registration properties.
Parameters: registrationProperties - a Map containing the registration properties in the form of property name (QName) -property value (Object) mappings Parameters: consumerIdentity - the Consumer identity (as returned by RegistrationPolicy.getConsumerIdFrom(String,java.util.Map)) for which the registration properties must be ascertained throws: IllegalArgumentException - if any of the registration properties is invalid for the specified Consumer throws: RegistrationException - if an exception occured in the registration service |
|
|
|