info.magnolia.module.rssaggregator.generator
Class FeedGeneratorResolver

java.lang.Object
  extended by info.magnolia.module.rssaggregator.generator.FeedGeneratorResolver

public class FeedGeneratorResolver
extends Object

Responsible for resolving FeedGenerators based on given parameters. In order to resolve a FeedGenerator, a FeedGeneratorFactory capable of building it must first be registered with a given name.

Author:
Rob van der Linden Vooren
See Also:
FeedGeneratorFactory, FeedGenerator

Field Summary
static String REQUIRED_PARAMETER
           
 
Constructor Summary
FeedGeneratorResolver(info.magnolia.module.ModuleRegistry moduleRegistry, FeedGenerator feederGenerator)
           
 
Method Summary
 FeedGenerator resolve(Map<String,String[]> parameterMap)
          Return a FeedGenerator instance based on the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUIRED_PARAMETER

public static final String REQUIRED_PARAMETER
See Also:
Constant Field Values
Constructor Detail

FeedGeneratorResolver

@Inject
public FeedGeneratorResolver(info.magnolia.module.ModuleRegistry moduleRegistry,
                                    FeedGenerator feederGenerator)
Method Detail

resolve

public FeedGenerator resolve(Map<String,String[]> parameterMap)
Return a FeedGenerator instance based on the given parameters. As a minimal requirement, the incoming parameter map is expected to hold a parameter named ""generatorName"". Based on the value of this parameter the associated FeedGenerator is constructed and returned.

Parameters:
parameterMap - parameter map (must not be null) (key = name / values = 0..N values for parameter name)
Returns:
the SyndFeedGenerator appropriate for the given parameters
Throws:
IllegalArgumentException - when parameters is null


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.