Spring for Apache Hadoop

org.springframework.data.hadoop.config.common.annotation.configurers
Class DefaultResourceConfigurer<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.DefaultResourceConfigurer<O,I,B>
Type Parameters:
O - The Object being built by B
B - The Builder that is building O and is configured by AnnotationConfigurerAdapter
I - The type of an interface of B
All Implemented Interfaces:
AnnotationConfigurer<O,B>, AnnotationConfigurerBuilder<I>, ResourceConfigurer<I>

public class DefaultResourceConfigurer<O,I,B extends AnnotationBuilder<O>>
extends AnnotationConfigurerAdapter<O,I,B>
implements ResourceConfigurer<I>

AnnotationConfigurer which knows how to handle configuring a Resources.

Author:
Janne Valkealahti

Constructor Summary
DefaultResourceConfigurer()
           
 
Method Summary
 void configure(B builder)
          Configure the AnnotationBuilder by setting the necessary properties on the AnnotationBuilder.
protected  boolean configureResources(B builder, java.util.Set<org.springframework.core.io.Resource> resources)
          Configure resources.
 java.util.Set<org.springframework.core.io.Resource> getResources()
          Gets the Resources configured for this builder.
 ResourceConfigurer<I> resource(org.springframework.core.io.Resource resource)
          Adds a Resource to this builder.
 ResourceConfigurer<I> resource(java.util.Set<org.springframework.core.io.Resource> resources)
          Adds a Set of Resources to this builder.
 ResourceConfigurer<I> resource(java.lang.String resource)
          Adds a Resource 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

DefaultResourceConfigurer

public DefaultResourceConfigurer()
Method Detail

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

resource

public ResourceConfigurer<I> resource(java.util.Set<org.springframework.core.io.Resource> resources)
Adds a Set of Resources to this builder.

Specified by:
resource in interface ResourceConfigurer<I>
Parameters:
resources - the resources
Returns:
the ResourceConfigurer for chaining

resource

public ResourceConfigurer<I> resource(org.springframework.core.io.Resource resource)
Adds a Resource to this builder.

Specified by:
resource in interface ResourceConfigurer<I>
Parameters:
resource - the resource
Returns:
the ResourceConfigurer for chaining

resource

public ResourceConfigurer<I> resource(java.lang.String resource)
Adds a Resource to this builder.

Specified by:
resource in interface ResourceConfigurer<I>
Parameters:
resource - the resource
Returns:
the ResourceConfigurer for chaining

getResources

public java.util.Set<org.springframework.core.io.Resource> getResources()
Gets the Resources configured for this builder.

Returns:
the resources

configureResources

protected boolean configureResources(B builder,
                                     java.util.Set<org.springframework.core.io.Resource> resources)
Configure resources. If this implementation is extended, custom configure handling can be handled here.

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

Spring for Apache Hadoop