org.mmbase.applications.media.urlcomposers
Class URLComposerFactory

java.lang.Object
  extended byorg.mmbase.applications.media.urlcomposers.URLComposerFactory

public class URLComposerFactory
extends Object

The URLComposerFactory contains the code to decide which kind of URLComposer is instatiated. This is a default implementation, which can be extended for your situation (The class can be configured in the mediaproviders builder xml) This particular implementation provides the possibility to relate formats to URLComposer classes. It can also relate a format/protocol combination to a URLComposer class.

Author:
Michiel Meeuwissen, Rob Vermeulen (VPRO)

Field Summary
static String CONFIG_FILE
           
 
Method Summary
protected  boolean addURLComposer(URLComposer uc, List urls)
          Add urlcomposer to list of urlcomposers if that is possible.
 List createURLComposers(MMObjectNode provider, MMObjectNode source, MMObjectNode fragment, Map info, List urls, Set cacheExpireObjects)
          When the provider/source/fragment combo is determined they can be fed into this function of the urlcomposerfactory, which will then produce zero or more urlcomposers.
static URLComposerFactory getInstance()
          Returns the one instance.
protected  List getTemplates(MMObjectNode fragment)
          You can relate template objects to media fragments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILE

public static final String CONFIG_FILE
See Also:
Constant Field Values
Method Detail

getInstance

public static URLComposerFactory getInstance()
Returns the one instance.


getTemplates

protected List getTemplates(MMObjectNode fragment)
You can relate template objects to media fragments. They can be processed by 'MarkupURLComposers'. For every template a MarkupURLComposers will be created (if, at least, MarkupURLComposers are configured in urlcomposers.xml).


addURLComposer

protected boolean addURLComposer(URLComposer uc,
                                 List urls)
Add urlcomposer to list of urlcomposers if that is possible.

Returns:
true if added, false if not.

createURLComposers

public List createURLComposers(MMObjectNode provider,
                               MMObjectNode source,
                               MMObjectNode fragment,
                               Map info,
                               List urls,
                               Set cacheExpireObjects)
When the provider/source/fragment combo is determined they can be fed into this function of the urlcomposerfactory, which will then produce zero or more urlcomposers. They are added to the provided list, or a new list will be made if the argument List is 'null'.

Parameters:
provider - MMObjectNode
source - MMObjectNode
info - A Map with additional options
urls - A List with URLComposer to which the new ones must be added, or null.
Returns:
The (new) list with urlcomposers.


MMBase build 1.8.1.20060716