|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.applications.media.builders.MediaFragments
public class MediaFragments
The MediaFragment builder describes a piece of media. This can be audio, or video. A media fragment contains a title, description, and more information about the media fragment. A media fragment will have relations with mediasources which are the actual files in different formats (mp3, real, etc.) The classification, and replace methods are added for backwards compatibility.
| Field Summary | |
|---|---|
static Parameter[] |
AVAILABLE_PARAMETERS
|
static Parameter[] |
DURATION_PARAMETERS
|
static Parameter[] |
FILTEREDURLS_PARAMETERS
|
static Parameter[] |
FORMAT_PARAMETERS
|
static String |
FUNCTION_AVAILABLE
|
static String |
FUNCTION_DURATION
|
static String |
FUNCTION_FILTEREDURLS
|
static String |
FUNCTION_FORMAT
|
static String |
FUNCTION_NUDEURL
|
static String |
FUNCTION_PARENTS
|
static String |
FUNCTION_ROOT
|
static String |
FUNCTION_SUBFRAGMENT
|
static String |
FUNCTION_SUBFRAGMENTS
|
static String |
FUNCTION_URL
|
static String |
FUNCTION_URLS
|
static Parameter[] |
ISSUBFRAGMENT_PARAMETERS
|
static Parameter[] |
NUDEURL_PARAMETERS
|
static Parameter[] |
PARENTS_PARAMETERS
|
static Parameter[] |
ROOT_PARAMETERS
|
static Parameter[] |
SUBFRAGMENT_SPARAMETERS
|
static Parameter[] |
URL_PARAMETERS
|
static Parameter[] |
URLS_PARAMETERS
|
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
|---|
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_INDICATOR, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
|---|
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions |
| Constructor Summary | |
|---|---|
MediaFragments()
|
|
| Method Summary | |
|---|---|
protected boolean |
addParentFragment(Stack<MMObjectNode> fragments)
Adds a parent fragment to the Stack and returns true, or returns false. |
protected long |
calculateLength(MMObjectNode node)
Calculate the length of a mediafragment |
boolean |
equals(MMObjectNode o1,
MMObjectNode o2)
Implements equals for nodes (this is in MMObjectBuilder because you cannot override MMObjectNode) |
protected Object |
executeFunction(MMObjectNode node,
String function,
List<?> args)
Executes a function on the field of a node, and returns the result. |
protected List<URLComposer> |
getFilteredURLs(MMObjectNode fragment,
Map<String,Object> info,
Set<MMObjectNode> cacheExpireObjects)
|
protected String |
getFormat(MMObjectNode fragment,
Map<String,Object> info)
|
String |
getGUIIndicator(MMObjectNode node)
Will show the title (clickable if possible) |
String |
getGUIIndicator(String field,
MMObjectNode node)
What should a GUI display for this node/field combo. |
Object |
getObjectValue(MMObjectNode node,
String field)
Like getValue, but without the 'old' code (short_ html_ etc). |
Stack<MMObjectNode> |
getParentFragments(MMObjectNode fragment)
Returns a Stack with all parent fragments. |
MMObjectNode |
getRootFragment(MMObjectNode fragment)
Find the mediafragment of which the given mediafragment is a part. |
List<MMObjectNode> |
getSources(MMObjectNode fragment)
Get all mediasources belonging to this mediafragment (scope should be protected) |
protected String |
getURL(MMObjectNode fragment,
Map<String,Object> info)
Retrieves the url of the mediasource that matches best. |
protected List<URLComposer> |
getURLs(MMObjectNode fragment,
Map<String,Object> info,
List<URLComposer> urls,
Set<MMObjectNode> cacheExpireObjects)
Returns a List of all possible (unfiltered) URLComposer's for this Fragment. |
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
boolean |
isSubFragment(MMObjectNode mediafragment)
If a mediafragment is coupled to another mediafragment instead of being directly coupled to mediasources, the mediafragment is a subfragment. |
void |
removeSources(MMObjectNode fragment)
Removes related media sources. |
String |
replace(PageInfo sp,
StringTokenizer command)
Replace all for frontend code Replace commands available are GETURL (gets mediafile url for an objectnumber), |
boolean |
setValue(MMObjectNode node,
String fieldname)
Provides additional functionality when setting field values. |
protected static Map<String,Object> |
translateURLArguments(List<?> arguments,
Map<String,Object> info)
Would something like this be feasible to translate a List to a Map? |
| Methods inherited from class org.mmbase.module.core.MMTable |
|---|
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FUNCTION_URLS
public static final String FUNCTION_FILTEREDURLS
public static final String FUNCTION_URL
public static final String FUNCTION_NUDEURL
public static final String FUNCTION_PARENTS
public static final String FUNCTION_ROOT
public static final String FUNCTION_SUBFRAGMENT
public static final String FUNCTION_SUBFRAGMENTS
public static final String FUNCTION_AVAILABLE
public static final String FUNCTION_FORMAT
public static final String FUNCTION_DURATION
public static final Parameter[] URLS_PARAMETERS
public static final Parameter[] FILTEREDURLS_PARAMETERS
public static final Parameter[] URL_PARAMETERS
public static final Parameter[] NUDEURL_PARAMETERS
public static final Parameter[] PARENTS_PARAMETERS
public static final Parameter[] ROOT_PARAMETERS
public static final Parameter[] ISSUBFRAGMENT_PARAMETERS
public static final Parameter[] SUBFRAGMENT_SPARAMETERS
public static final Parameter[] AVAILABLE_PARAMETERS
public static final Parameter[] FORMAT_PARAMETERS
public static final Parameter[] DURATION_PARAMETERS
| Constructor Detail |
|---|
public MediaFragments()
| Method Detail |
|---|
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()
protected static Map<String,Object> translateURLArguments(List<?> arguments,
Map<String,Object> info)
protected Object executeFunction(MMObjectNode node,
String function,
List<?> args)
MMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions.
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List>)protected long calculateLength(MMObjectNode node)
node - the mediafragment
public String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - the mediafragment node
public String getGUIIndicator(String field,
MMObjectNode node)
MMObjectBuilder
getGUIIndicator in class MMObjectBuilderfield - the name field of the field to displaynode - The node to display
String, null if not specified
protected List<URLComposer> getURLs(MMObjectNode fragment,
Map<String,Object> info,
List<URLComposer> urls,
Set<MMObjectNode> cacheExpireObjects)
protected List<URLComposer> getFilteredURLs(MMObjectNode fragment,
Map<String,Object> info,
Set<MMObjectNode> cacheExpireObjects)
protected String getURL(MMObjectNode fragment,
Map<String,Object> info)
fragment - the media fragmentinfo - extra information (i.e. request, wanted bitrate, preferred format)
protected String getFormat(MMObjectNode fragment,
Map<String,Object> info)
public boolean isSubFragment(MMObjectNode mediafragment)
protected boolean addParentFragment(Stack<MMObjectNode> fragments)
public Stack<MMObjectNode> getParentFragments(MMObjectNode fragment)
public MMObjectNode getRootFragment(MMObjectNode fragment)
fragment - sub media fragment
public List<MMObjectNode> getSources(MMObjectNode fragment)
fragment - the mediafragment
public void removeSources(MMObjectNode fragment)
fragment - The MMObjectNode
public String replace(PageInfo sp,
StringTokenizer command)
replace in class MMObjectBuildersp - the PageInfocommand - the stringtokenizer reference with the replace command.
public Object getObjectValue(MMObjectNode node,
String field)
MMObjectBuilder
getObjectValue in class MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String)
public boolean setValue(MMObjectNode node,
String fieldname)
MMObjectBuilder
setValue in class MMObjectBuildernode - the node whose fields are changedfieldname - the fieldname that is changed
true if the call was handled.
public boolean equals(MMObjectNode o1,
MMObjectNode o2)
equals in class MMObjectBuilder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||