org.mmbase.applications.media.urlcomposers
Class URLComposerFactory

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

public class URLComposerFactory
extends java.lang.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 java.lang.String CONFIG_FILE
           
 
Method Summary
protected  boolean addURLComposer(URLComposer uc, java.util.List urls)
          Add urlcomposer to list of urlcomposers if that is possible.
 java.util.List createURLComposers(MMObjectNode provider, MMObjectNode source, MMObjectNode fragment, java.util.Map info, java.util.List urls, java.util.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  java.util.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 java.lang.String CONFIG_FILE
Method Detail

getInstance

public static URLComposerFactory getInstance()
Returns the one instance.


getTemplates

protected java.util.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,
                                 java.util.List urls)
Add urlcomposer to list of urlcomposers if that is possible.

Returns:
true if added, false if not.

createURLComposers

public java.util.List createURLComposers(MMObjectNode provider,
                                         MMObjectNode source,
                                         MMObjectNode fragment,
                                         java.util.Map info,
                                         java.util.List urls,
                                         java.util.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.7.1.20041002