Package org.javlo.component.multimedia
Class OnlineVideo
- java.lang.Object
-
- org.javlo.component.core.AbstractVisualComponent
-
- org.javlo.component.files.AbstractFileComponent
-
- org.javlo.component.image.Image
-
- org.javlo.component.image.GlobalImage
-
- org.javlo.component.multimedia.OnlineVideo
-
- All Implemented Interfaces:
Serializable
,Comparable<IContentVisualComponent>
,IAction
,IContentVisualComponent
,IImageFilter
,ILink
,IPreviewable
,IStaticResource
,IUploadResource
,IVideo
,IImageTitle
,IRestItem
,IStaticContainer
public class OnlineVideo extends GlobalImage implements IAction, IVideo
- Author:
- pvandermaesen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OnlineVideo.OrderVideo
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE
-
Fields inherited from class org.javlo.component.image.GlobalImage
IMAGE_FILTER, logger, RAW_FILTER
-
Fields inherited from class org.javlo.component.image.Image
config, STYLE_CENTER
-
Fields inherited from class org.javlo.component.files.AbstractFileComponent
DEFAULT_ENCODING, DESCRIPTION_KEY, DIR_KEY, EMBED_CODE_KEY, ENCODING_KEY, FILE_NAME_KEY, LABEL_KEY, properties, REVERSE_LINK_KEY
-
Fields inherited from class org.javlo.component.core.AbstractVisualComponent
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, EDIT_CLASS, FLUID_COL_SIZE, FORCE_COMPONENT_ID, HIDDEN, I18N_FILE, MAX_COL_VALUE, MOBILE_TYPE, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATOR
-
Fields inherited from interface org.javlo.component.core.IContentVisualComponent
COLORED_WRAPPER_CLASS, COMP_ID_REQUEST_PARAM, COMPLEXITY_ADMIN, COMPLEXITY_EASY, COMPLEXITY_STANDARD, CONTAINER_COLOR, DEFAULT_COLOR, DYN_COMP_COLOR, ECOM_COLOR, EDIT_ACTION_CSS_CLASS, GRAPHIC_COLOR, HIGH_LABEL_LEVEL, ID_SEPARATOR, LINK_COLOR, LOW_LABEL_LEVEL, META_COLOR, MIDDLE_LABEL_LEVEL, SEARCH_LEVEL_HIGH, SEARCH_LEVEL_LOW, SEARCH_LEVEL_MIDDLE, SEARCH_LEVEL_NONE, TEXT_COLOR, VIEW_DEFINITION_REQUEST_ID, WEB2_COLOR
-
Fields inherited from interface org.javlo.component.image.IImageTitle
NO_LINK
-
-
Constructor Summary
Constructors Constructor Description OnlineVideo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOneAccess(ContentContext ctx)
int
getAccess(ContentContext ctx, int days)
String
getActionGroupName()
the group name of the actionCollection<Resource>
getAllResources(ContentContext ctx)
return all resources found in the component.Collection<OnlineVideo>
getAllVideoOnPage(ContentContext ctx)
int
getComplexityLevel(ContentContext ctx)
return the complexity level of the component.String
getCurrentRenderer(ContentContext ctx)
get current renderer keyprotected String
getDefaultFilter()
String
getFontAwesome()
protected String
getImageChangeTitle(ContentContext ctx)
protected String
getImageFilter(ContentContext ctx)
int
getPopularity(ContentContext ctx)
return indice of popularityString
getPreviewURL(ContentContext ctx, String filter)
String
getRenderer(ContentContext ctx)
get current renderer file.String[]
getStyleLabelList(ContentContext ctx)
return a list of label define the style.String[]
getStyleList(ContentContext ctx)
get the list of style possible for this component.String
getStyleTitle(ContentContext ctx)
return the title of the style choice.protected Map<String,String>
getTranslatableResources(ContentContext ctx)
String
getType()
return the type of the element.String
getURL(ContentContext ctx)
generate a URL or URI link with all elements to click on.String
getViewXHTMLCode(ContentContext ctx)
protected boolean
isAutoRenderer()
return true if end user could not select the renderer.boolean
isContentCachable(ContentContext ctx)
return the part of header needed for this componentprotected boolean
isDisplayMeta(ContentContext ctx)
protected boolean
isEmbedCode()
protected boolean
isInline(ContentContext ctx)
protected boolean
isLink()
protected boolean
isLinkValid(String url)
protected boolean
isMeta()
boolean
isRealContent(ContentContext ctx)
return true if component is considered as realContent and the page that contain the component is also considered as real content.static String
performAccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
String
performEdit(ContentContext ctx)
action call when update the content page.void
prepareView(ContentContext ctx)
prepare the rendering of a component. default attributes put in request : style, value, type, compidboolean
renameResource(ContentContext ctx, File oldName, File newName)
rename a resourceString
renderInline(ContentContext ctx, String width, String height, boolean preview, boolean onlyPrepare)
-
Methods inherited from class org.javlo.component.image.GlobalImage
canUpload, createFileURL, filterImage, getAlt, getCSSClassName, getDate, getDate, getDecorationImage, getDisplayDate, getEditorComplexity, getEditXHTMLCode, getErrorMessage, getFileDirectory, getFileNameOver, getFilter, getFirstText, getHeight, getHeight, getHexColor, getIcon, getImageFilterKey, getImageHash, getImageImgName, getImageLinkTitle, getImageLinkURL, getImageURL, getLabelTextInputName, getLargeFilter, getLink, getLinkXHTMLInputName, getLocation, getLocation, getMessage, getNewLinkParamName, getSecondText, getSpecialTagTitle, getSpecialTagXHTML, getSpecificClass, getTextMessage, getTitle, getTitle, getTranslatedID, getWidth, getWidth, hashForImage, init, initContent, isAskWidth, isDecorationImage, isEditImage, isFileNameValid, isFloatText, isHiddenImage, isImageFilter, isLabel, isLinkValid, isListable, isLocal, isMutlimediaResource, isStyleHidden, isTextAuto, performDataFeedBack, setDate, setDecorationImage, setFilter, setFirstText, setHeight, setLink, setMessage, setRenderer, setSecondText, setTextAuto, setTitle, setTranslatedID, setWidth, setWidth, uploadFiles
-
Methods inherited from class org.javlo.component.image.Image
getCssClass, getCSSType, getDefaultFile, getDescription, getDisplayAllLabel, getFile, getFileList, getFiles, getHelpURI, getImageDescription, getLanguage, getMainFolder, getPriority, getRelativeFileDirectory, getStaticLabel, getTags, init, isAllowRAW, isImageValid, isMobileOnly, isShared, isUploadOnDrop
-
Methods inherited from class org.javlo.component.files.AbstractFileComponent
contains, equals, expandZip, getAllResourcesLinks, getColumnableDefaultValue, getContentAsText, getDecoImageFileXHTMLInputName, getDecoImageXHTMLInputName, getDecorationFilter, getDeleteTitle, getDescription, getDescriptionName, getDirInputName, getDirLabelTitle, getDirList, getDirSelected, getEmbedCode, getEmbedCodeName, getEncoding, getEncodingXHTMLInputName, getFileFilter, getFileList, getFileName, getFileUploadActionTitle, getFileURL, getFileXHTMLInputName, getFirstTextInputName, getImageDecorativeTitle, getImageLabelTitle, getImageSelectTitle, getImageUploadTitle, getJSOnChange, getLabel, getLabelXHTMLInputName, getLatestValidDate, getMaxPreviewImages, getMetaCode, getNewDirInputName, getNewDirLabelTitle, getPreviewCode, getPreviewCode, getPreviewCode, getPreviewZoneId, getResourceURL, getResourceURL, getReverseLinkeLabelTitle, getReverseLinkInputName, getSecondTextInputName, getSelectXHTMLInputName, getStaticInfo, getTextAutoInputName, getWordCount, isDisplayable, isFromShared, isImported, isInsertable, isLinkToStatic, isMirroredByDefault, isOnlyFirstOccurrence, isReverseLink, isWithDescription, needEncoding, performLoadImages, performUpload, reloadProperties, saveItem, setDirSelected, setEmbedCode, setFileName, setLabel, setLatestValidDate, setValue, storeProperties, transflateFrom
-
Methods inherited from class org.javlo.component.core.AbstractVisualComponent
applyReplacement, cleanResources, cleanValue, clearReplacement, clone, compareTo, contructViewStyle, countLine, delete, deleteMySelf, drawColumn, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, forceInit, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getColomnablePrefix, getColomnableSuffix, getColumn, getColumnMaxSize, getColumnSize, getColumnSizes, getColumnStyle, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentLabel, getComponentPath, getConfig, getConfigInValue, getConfigMessage, getContainerPage, getContentAsMap, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getDataAttributes, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditRenderer, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getExternalModules, getExternalResources, getFirstPrefix, getForcedId, getForcedPrefixViewXHTMLCode, getForcedRenderer, getForcedSuffixViewXHTMLCode, getFormName, getGroup, getHeaderContent, getHelpText, getHelpType, getHelpURL, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputName, getInputNameColomn, getInputNameColomnStyle, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLabelLevel, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLocalMessage, getLock, getManualCssClass, getMarkerList, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPageDescription, getPrefixCssClass, getPrefixViewXHTMLCode, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getReferenceComponent, getRemplacement, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssId, getSpecificCssClass, getStyle, getStyleLabel, getSuffixViewXHTMLCode, getTag, getTextColor, getTextForSearch, getTextLabel, getTextPosition, getTextTitle, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, insert, isAjaxWrapper, isAutoDeletable, isBackgroundColored, isCanAddClass, isCloseRow, isColored, isColumnable, isConfig, isContentCachableByQuery, isContentTimeCachable, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isHiddenInModeValue, isInline, isList, isMetaTitle, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isOpenRow, isPreviousSame, isPreviousSame, isRepeat, isRepeatable, isRestMatch, isReversedLink, isUnique, isValueProperties, isValueTranslatable, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, loadViewData, markAsNew, newInstance, next, onStyleChange, performColumnable, performConfig, performUpdate, prepareEdit, previous, processView, renderOtherComponent, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setColumnSize, setColumnStyle, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setForcedRenderer, setGroup, setHidden, setHiddenInMode, setList, setLocalMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRepeat, setStyle, setTextColor, setTextPosition, setValid, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTML, toString, updateCache
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.javlo.component.core.IContentVisualComponent
cleanResources, clearReplacement, delete, equals, extractFieldsFromRenderer, forceInit, getArea, getAuthors, getClassName, getColumnSize, getColumnStyle, getComponentBean, getComponentCssClass, getComponentLabel, getConfig, getConfigInValue, getConfigMessage, getContentAsText, getContentMessage, getContentName, getCreationDate, getDescription, getEditText, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalModules, getExternalResources, getFirstPrefix, getGroup, getHeaderContent, getHelpText, getHelpURL, getHexColor, getI18nEditableKeys, getIcon, getId, getInputNameRenderer, getJSOnSubmit, getKey, getLabelLevel, getLastSufix, getLayout, getListGroup, getMarkerList, getMessage, getModificationDate, getNextComponent, getPage, getPageDescription, getPrefixViewXHTMLCode, getPreviousComponent, getReferenceComponent, getSearchLevel, getSpecialTagTitle, getSpecialTagXHTML, getStyle, getStyleLabel, getSuffixViewXHTMLCode, getTextForSearch, getTextLabel, getTextMessage, getTextTitle, getTitleLevel, getValue, getVersion, getViewText, getWordCount, getXHTMLCode, getXHTMLConfig, initContent, insert, isColumnable, isConfig, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayable, isDisplayHidden, isEditOnCreate, isFirstRepeated, isHelpURL, isHidden, isHiddenInMode, isInline, isInsertable, isList, isListable, isMetaTitle, isMirroredByDefault, isModify, isNeedRefresh, isNew, isNolink, isRepeat, isRepeatable, isRestMatch, isUnique, isVisible, isVisible, isVisibleFromCookies, loadViewData, markAsNew, newInstance, next, performConfig, previous, replaceAllInContent, replaceInContent, resetViewData, setColumnSize, setContainerPage, setDisplayHidden, setGroup, setList, setNeedRefresh, setNextComponent, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setValid, setValue, stored, transflateFrom
-
Methods inherited from interface org.javlo.component.core.IImageFilter
getId
-
Methods inherited from interface org.javlo.component.image.IImageTitle
getImageDescription, getImageLinkURL, getPriority, getResourceURL, isImageValid, isMobileOnly
-
Methods inherited from interface org.javlo.component.core.IPreviewable
getPreviewCode
-
Methods inherited from interface org.javlo.data.rest.IRestItem
getContentAsMap
-
Methods inherited from interface org.javlo.ztatic.IStaticContainer
contains, getAllResourcesLinks, getDirSelected, getFiles, setDirSelected
-
Methods inherited from interface org.javlo.component.core.IStaticResource
getCssClass, getDate, getDescription, getFile, getLanguage, getLocation, getTags, getTitle, isLocal, isShared
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAllResources
public Collection<Resource> getAllResources(ContentContext ctx)
Description copied from interface:IStaticContainer
return all resources found in the component.- Specified by:
getAllResources
in interfaceIStaticContainer
- Overrides:
getAllResources
in classAbstractFileComponent
- Returns:
-
getStyleList
public String[] getStyleList(ContentContext ctx)
Description copied from interface:IContentVisualComponent
get the list of style possible for this component.- Specified by:
getStyleList
in interfaceIContentVisualComponent
- Overrides:
getStyleList
in classImage
- Returns:
- a list of string represent a style.
-
getStyleLabelList
public String[] getStyleLabelList(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return a list of label define the style.- Specified by:
getStyleLabelList
in interfaceIContentVisualComponent
- Overrides:
getStyleLabelList
in classImage
- Returns:
- a list of label.
-
getStyleTitle
public String getStyleTitle(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return the title of the style choice.- Specified by:
getStyleTitle
in interfaceIContentVisualComponent
- Overrides:
getStyleTitle
in classImage
-
isInline
protected boolean isInline(ContentContext ctx)
-
renameResource
public boolean renameResource(ContentContext ctx, File oldName, File newName)
Description copied from interface:IStaticContainer
rename a resource- Specified by:
renameResource
in interfaceIStaticContainer
- Overrides:
renameResource
in classAbstractFileComponent
- Returns:
- true if rename, false else
-
getType
public String getType()
Description copied from interface:IContentVisualComponent
return the type of the element.- Specified by:
getType
in interfaceIContentVisualComponent
- Overrides:
getType
in classGlobalImage
- Returns:
- the type of the element.
-
isContentCachable
public boolean isContentCachable(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return the part of header needed for this component- Specified by:
isContentCachable
in interfaceIContentVisualComponent
- Overrides:
isContentCachable
in classGlobalImage
- Returns:
-
getCurrentRenderer
public String getCurrentRenderer(ContentContext ctx)
Description copied from class:AbstractVisualComponent
get current renderer key- Specified by:
getCurrentRenderer
in interfaceIContentVisualComponent
- Overrides:
getCurrentRenderer
in classAbstractVisualComponent
- Returns:
-
getRenderer
public String getRenderer(ContentContext ctx)
Description copied from class:AbstractVisualComponent
get current renderer file.- Specified by:
getRenderer
in interfaceIContentVisualComponent
- Overrides:
getRenderer
in classGlobalImage
-
isAutoRenderer
protected boolean isAutoRenderer()
Description copied from class:AbstractVisualComponent
return true if end user could not select the renderer.- Overrides:
isAutoRenderer
in classAbstractVisualComponent
- Returns:
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCode
in classGlobalImage
- Throws:
Exception
- See Also:
org.javlo.itf.IContentVisualComponent#getXHTMLCode()
-
getTranslatableResources
protected Map<String,String> getTranslatableResources(ContentContext ctx) throws Exception
- Overrides:
getTranslatableResources
in classGlobalImage
- Throws:
Exception
-
getAllVideoOnPage
public Collection<OnlineVideo> getAllVideoOnPage(ContentContext ctx) throws Exception
- Throws:
Exception
-
getDefaultFilter
protected String getDefaultFilter()
- Overrides:
getDefaultFilter
in classGlobalImage
-
getImageFilter
protected String getImageFilter(ContentContext ctx)
-
prepareView
public void prepareView(ContentContext ctx) throws Exception
Description copied from class:AbstractVisualComponent
prepare the rendering of a component. default attributes put in request : style, value, type, compid- Specified by:
prepareView
in interfaceIContentVisualComponent
- Overrides:
prepareView
in classGlobalImage
- Throws:
Exception
-
getURL
public String getURL(ContentContext ctx)
Description copied from interface:ILink
generate a URL or URI link with all elements to click on.- Specified by:
getURL
in interfaceILink
- Specified by:
getURL
in interfaceIStaticResource
- Overrides:
getURL
in classGlobalImage
- Returns:
-
renderInline
public String renderInline(ContentContext ctx, String width, String height, boolean preview, boolean onlyPrepare) throws Exception
- Throws:
Exception
-
isLinkValid
protected boolean isLinkValid(String url)
- Overrides:
isLinkValid
in classGlobalImage
-
isMeta
protected boolean isMeta()
- Overrides:
isMeta
in classGlobalImage
-
isDisplayMeta
protected boolean isDisplayMeta(ContentContext ctx)
- Overrides:
isDisplayMeta
in classAbstractFileComponent
-
isRealContent
public boolean isRealContent(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return true if component is considered as realContent and the page that contain the component is also considered as real content.- Specified by:
isRealContent
in interfaceIContentVisualComponent
- Overrides:
isRealContent
in classAbstractVisualComponent
- Parameters:
ctx
- current context- Returns:
-
getImageChangeTitle
protected String getImageChangeTitle(ContentContext ctx) throws FileNotFoundException, IOException
- Overrides:
getImageChangeTitle
in classAbstractFileComponent
- Throws:
FileNotFoundException
IOException
-
getAccess
public int getAccess(ContentContext ctx, int days) throws NumberFormatException, IOException
- Throws:
NumberFormatException
IOException
-
addOneAccess
public void addOneAccess(ContentContext ctx) throws NumberFormatException, IOException
- Throws:
NumberFormatException
IOException
-
performAccess
public static final String performAccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
- Throws:
Exception
-
getPreviewURL
public String getPreviewURL(ContentContext ctx, String filter)
- Specified by:
getPreviewURL
in interfaceIStaticResource
- Overrides:
getPreviewURL
in classGlobalImage
-
isEmbedCode
protected boolean isEmbedCode()
- Overrides:
isEmbedCode
in classGlobalImage
-
isLink
protected boolean isLink()
- Overrides:
isLink
in classGlobalImage
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IAction
the group name of the action- Specified by:
getActionGroupName
in interfaceIAction
- Overrides:
getActionGroupName
in classGlobalImage
- Returns:
- a group name.
-
getPopularity
public int getPopularity(ContentContext ctx)
Description copied from interface:IStaticContainer
return indice of popularity- Specified by:
getPopularity
in interfaceIStaticContainer
- Overrides:
getPopularity
in classImage
- Returns:
-
performEdit
public String performEdit(ContentContext ctx) throws Exception
Description copied from interface:IContentVisualComponent
action call when update the content page.- Specified by:
performEdit
in interfaceIContentVisualComponent
- Overrides:
performEdit
in classGlobalImage
- Returns:
- the error message, null if no error
- Throws:
Exception
-
getComplexityLevel
public int getComplexityLevel(ContentContext ctx)
Description copied from interface:IContentVisualComponent
return the complexity level of the component.- Specified by:
getComplexityLevel
in interfaceIContentVisualComponent
- Overrides:
getComplexityLevel
in classAbstractVisualComponent
- Parameters:
ctx
- TODO- Returns:
- see contant
-
getFontAwesome
public String getFontAwesome()
- Specified by:
getFontAwesome
in interfaceIContentVisualComponent
- Overrides:
getFontAwesome
in classImage
-
-