Spring for Apache Hadoop

org.springframework.data.hadoop.config.common.annotation.configurers
Class DefaultPropertiesConfigurer<O,I,B extends AnnotationBuilder<O>>

java.lang.Object
  extended by org.springframework.data.hadoop.config.common.annotation.AnnotationConfigurerAdapter<O,I,B>
      extended by org.springframework.data.hadoop.config.common.annotation.configurers.DefaultPropertiesConfigurer<O,I,B>
Type Parameters:
O - The Object being built by B
I - The type of interface or builder itself returned by the configurer
B - The Builder that is building O and is configured by AnnotationConfigurerAdapter
All Implemented Interfaces:
AnnotationConfigurer<O,B>, AnnotationConfigurerBuilder<I>, PropertiesConfigurer<I>

public class DefaultPropertiesConfigurer<O,I,B extends AnnotationBuilder<O>>
extends AnnotationConfigurerAdapter<O,I,B>
implements PropertiesConfigurer<I>

AnnotationConfigurer which knows how to handle configuring a Properties.

Author:
Janne Valkealahti

Constructor Summary
DefaultPropertiesConfigurer()
           
 
Method Summary
 void configure(B builder)
          Configure the AnnotationBuilder by setting the necessary properties on the AnnotationBuilder.
protected  boolean configureProperties(B builder, java.util.Properties properties)
          Configure properties.
 java.util.Properties getProperties()
          Gets the Properties configured for this builder.
 PropertiesConfigurer<I> properties(java.util.Properties properties)
          Adds a Properties to this builder.
 PropertiesConfigurer<I> property(java.lang.String key, java.lang.String value)
          Adds a property to this builder.
 
Methods inherited from class org.springframework.data.hadoop.config.common.annotation.AnnotationConfigurerAdapter
addObjectPostProcessor, and, getBuilder, init, isAssignable, setBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.data.hadoop.config.common.annotation.AnnotationConfigurerBuilder
and
 

Constructor Detail

DefaultPropertiesConfigurer

public DefaultPropertiesConfigurer()
Method Detail

properties

public PropertiesConfigurer<I> properties(java.util.Properties properties)
Adds a Properties to this builder.

Specified by:
properties in interface PropertiesConfigurer<I>
Parameters:
properties - the properties
Returns:
the PropertiesConfigurer for chaining

property

public PropertiesConfigurer<I> property(java.lang.String key,
                                        java.lang.String value)
Adds a property to this builder.

Specified by:
property in interface PropertiesConfigurer<I>
Parameters:
key - the key
value - the value
Returns:
the PropertiesConfigurer for chaining

getProperties

public java.util.Properties getProperties()
Gets the Properties configured for this builder.

Returns:
the properties

configure

public void configure(B builder)
               throws java.lang.Exception
Description copied from interface: AnnotationConfigurer
Configure the AnnotationBuilder by setting the necessary properties on the AnnotationBuilder.

Specified by:
configure in interface AnnotationConfigurer<O,B extends AnnotationBuilder<O>>
Overrides:
configure in class AnnotationConfigurerAdapter<O,I,B extends AnnotationBuilder<O>>
Parameters:
builder - the builder
Throws:
java.lang.Exception - if error occurred

configureProperties

protected boolean configureProperties(B builder,
                                      java.util.Properties properties)
Configure properties. If this implementation is extended, custom configure handling can be handled here.

Parameters:
builder - the builder
properties - the properties
Returns:
true, if properties configure is handled

Spring for Apache Hadoop