public class MediaFragments extends MMObjectBuilder
| Modifier and Type | Field and Description |
|---|---|
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 |
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, temporaryNodes, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunctionmaxNodesFromQuery, mmb, storageConnector, tableNamefunctions| Constructor and Description |
|---|
MediaFragments() |
| Modifier and Type | Method and Description |
|---|---|
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?
|
addEventListener, addField, addLocalObserver, addRemoteObserver, broadcastChanges, checkAddTmpField, clearBlobCache, commit, create, createAlias, createAlias, createIfNotExists, delete, equals, executeFunction, fieldLocalChanged, getAncestors, getBlobCache, getClassName, getConfigFile, getConfigResource, getDataTypeCollector, getDBState, getDBType, getDefaultTeaser, getDefaultUrl, getDescendants, getDescription, getDescription, getDescriptions, getEmptyNode, getField, getFieldNames, getFields, getFields, getFunction, getFunctionParameters, getFunctions, getGUIIndicator, getHTML, getInitParameter, getInitParameters, getInitParameters, getInternalVersion, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNodeFromCache, getNodeGUIIndicator, getNumber, getObjectType, getParentBuilder, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedInputStream, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hasField, hashCode, hashCode, hostname_function, insert, insert, isExtensionOf, isNodeCached, isNull, isVirtual, loadInitParameters, newFunctionInstance, nodeLocalChanged, nodeRemoteChanged, notify, notify, preCommit, process, removeEventListener, removeField, removeLocalObserver, removeNode, removeRelations, removeRemoteObserver, removeSyncNodes, safeCache, sendFieldChangeSignal, setDefaults, setDescription, setDescriptions, setFields, setInitParameter, setMaintainer, setPluralNames, setSearchAge, setSingularNames, setUniqueValue, setUniqueValue, setValue, setVersion, setXMLPath, shutdown, testValidData, toString, toString, update, updateFields, wrapcount, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, sizeaddFunction, createParameters, getFunction, getFunctions, getFunctionValuepublic 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
public boolean init()
MMObjectBuilderinit 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.protected long calculateLength(MMObjectNode node)
node - the mediafragmentpublic String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - the mediafragment nodepublic String getGUIIndicator(String field, MMObjectNode node)
MMObjectBuildergetGUIIndicator in class MMObjectBuilderfield - the name field of the field to displaynode - The node to displayString, null if not specifiedprotected 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 fragmentpublic List<MMObjectNode> getSources(MMObjectNode fragment)
fragment - the mediafragmentpublic void removeSources(MMObjectNode fragment)
fragment - The MMObjectNodepublic 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)
MMObjectBuildergetObjectValue in class MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String)public boolean setValue(MMObjectNode node, String fieldname)
MMObjectBuildersetValue in class MMObjectBuildernode - the node whose fields are changedfieldname - the fieldname that is changedtrue if the call was handled.public boolean equals(MMObjectNode o1, MMObjectNode o2)
equals in class MMObjectBuilderMMBase 1.9-SNAPSHOT - ${javadoctimestamp}