public class AbstractFileComponent extends AbstractVisualComponent implements IStaticContainer, ILink, IUploadResource, IAction
AbstractVisualComponent
String
url : url to resource.String
description : description of the resource.String
label : label defined by contributor.boolean
blank : true if link must be open as popup.StaticInfo
resource : static info of resource.Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_ENCODING |
static String |
DESCRIPTION_KEY |
static String |
DIR_KEY |
static String |
EMBED_CODE_KEY |
protected static String |
ENCODING_KEY |
static String |
FILE_NAME_KEY |
static String |
LABEL_KEY |
protected Properties |
properties |
protected static String |
REVERSE_LINK_KEY |
static String |
TYPE |
CACHE_KEY_SUFFIX_PARAM_NAME, COMPONENT_KEY, config, EDIT_CLASS, FORCE_COMPONENT_ID, HIDDEN, I18N_FILE, logger, NOT_EDIT_PREVIEW_PARAM_NAME, SCROLL_TO_COMP_ID_ATTRIBUTE_NAME, TIME_CACHE_NAME, VALUE_SEPARATOR
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
Constructor and Description |
---|
AbstractFileComponent() |
applyReplacement, cleanValue, clearReplacement, clone, compareTo, contructViewStyle, countLine, delete, deleteMySelf, equals, executeCurrentRenderer, executeJSP, executeRenderer, executeRenderer, extractFieldsFromRenderer, getAjaxId, getArea, getAuthors, getBackgroundColor, getBaseHelpURL, getClassName, getComplexityLevel, getComponentBean, getComponentCSS, getComponentCssClass, getComponentId, getComponentLabel, getComponentPath, getConfig, getConfigMessage, getContainerPage, getContentAsMap, getContentCache, getContentMessage, getContentName, getContentTimeCache, getCookiesDisplayStatus, getCreationDate, getCSSStyle, getCurrentPage, getCurrentRenderer, getDebugHeader, getDefaultHelpURI, getDefaultRenderer, getDeleteDate, getDescription, getDisplayAsInputName, getDisplayMessage, getEditText, getEmptyCode, getEmptyXHTMLCode, getErrorMessage, getErrorMessage, getExternalResources, getFirstPrefix, getForcedId, getForcedPrefixViewXHTMLCode, getForcedSuffixViewXHTMLCode, getFormName, getHeaderContent, getHelpType, getHelpURI, getHelpURL, getHexColor, getI18nEditableKeys, getId, getImportFolderPath, getImportFolderPath, getInlineStyle, getInputName, getInputNameRenderer, getInputNameRendererTitle, getItalicAndStrongLanguageMarkerList, getJSOnSubmit, getKey, getLabelLevel, getLastSufix, getLayout, getListClass, getListGroup, getListItemTag, getListTag, getLock, getMarkerList, getMessage, getMirrorWrapper, getModificationDate, getNextComponent, getPage, getPageDescription, getPrefixViewXHTMLCode, getPreviewAttributes, getPreviewCssClass, getPreviewCssId, getPreviousComponent, getQuotationLanguageMarkerList, getRemplacement, getRenderer, getRendererTitle, getRenderes, getRequestComponent, getSearchLevel, getSelectRendererXHTML, getSpecialInputTag, getSpecialPreviewCssClass, getSpecialPreviewCssId, getSpecialTagTitle, getSpecialTagXHTML, getSpecificClass, getStyle, getStyleLabel, getStyleLabelList, getStyleList, getStyleTitle, getSuffixViewXHTMLCode, getTag, getTextColor, getTextForSearch, getTextLabel, getTextMessage, getTextTitle, getTitleLevel, getTypeInputName, getValue, getValue, getVersion, getViewData, getViewDataFile, getViewID, getViewText, getViewXHTMLCode, getWidth, getXHTMLCode, getXHTMLConfig, haveRight, includeComponentJSP, includePage, init, initContent, insert, isAjaxWrapper, isAskWidth, isAutoDeletable, isAutoRenderer, isBackgroundColored, isCanAddClass, isColored, isConfig, isContentCachableByQuery, isContentTimeCachable, isDefaultValue, isDispayEmptyXHTMLCode, isDisplayHidden, isEditOnCreate, isFirstElementOfRepeatSequence, isFirstRepeated, isFreeInputLayout, isHelpURL, isHiddable, isHidden, isHiddenInMode, isInline, isList, isListable, isMetaTitle, isMirrorWrapped, isModify, isNeedDelete, isNeedRefresh, isNeedRenderer, isNew, isNextSame, isNextSame, isNolink, isNoLinkable, isPreviousSame, isPreviousSame, isRealContent, isRepeat, isRepeatable, isRestMatch, isReversedLink, isUnique, isValueProperties, isValueTranslatable, isViewDataFile, isVisible, isVisible, isVisibleFromCookies, isWrapped, isXML, loadViewData, main, markAsNew, newInstance, next, onStyleChange, performConfig, performUpdate, previous, processView, renderViewXHTMLCode, replaceAllInContent, replaceInContent, resetContentCache, resetViewData, setBackgroundColor, setComponentBean, setContainerPage, setContentCache, setContentTimeCache, setDisplayHidden, setForcedId, setHidden, setHiddenInMode, setList, setMessage, setMirrorWrapped, setModify, setNeedRefresh, setNextComponent, setNolink, setPage, setPreviousComponent, setRenderer, setRepeat, setStyle, setTextColor, setValid, setWidth, stored, storeViewData, stringToReader, stringToReader, stringToStream, textToXHTML
public static final String LABEL_KEY
public static final String DIR_KEY
public static final String FILE_NAME_KEY
public static final String DESCRIPTION_KEY
public static final String EMBED_CODE_KEY
protected static final String REVERSE_LINK_KEY
protected static final String ENCODING_KEY
protected static final String DEFAULT_ENCODING
public static final String TYPE
protected Properties properties
protected boolean canUpload(ContentContext ctx)
public boolean contains(ContentContext ctx, String inURI)
IStaticContainer
contains
in interface IStaticContainer
inURI
- a uri to a static resourcespublic String createFileURL(ContentContext ctx, String url)
public boolean equals(Object obj)
equals
in class AbstractVisualComponent
protected boolean expandZip()
public String getURL(ContentContext ctx)
ILink
public boolean isLinkValid(ContentContext ctx)
ILink
isLinkValid
in interface ILink
public void prepareView(ContentContext ctx) throws Exception
AbstractVisualComponent
prepareView
in class AbstractVisualComponent
Exception
public Collection<Resource> getAllResources(ContentContext ctx)
IStaticContainer
getAllResources
in interface IStaticContainer
public Collection<Link> getAllResourcesLinks(ContentContext ctx)
IStaticContainer
getAllResourcesLinks
in interface IStaticContainer
protected String getCSSType()
protected String getDeleteTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public String getDescription()
public String getEmbedCode()
public void setEmbedCode(String embedCode)
public String getDescriptionName()
public String getEmbedCodeName()
protected String getDirInputName()
protected String getDirLabelTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String[] getDirList(ContentContext ctx, String inFolder) throws Exception
Exception
public String getDirSelected()
IStaticContainer
getDirSelected
in interface IStaticContainer
protected String getEditorComplexity(ContentContext ctx)
AbstractVisualComponent
getEditorComplexity
in class AbstractVisualComponent
protected String getMetaCode(ContentContext ctx)
protected boolean isDisplayMeta(ContentContext ctx)
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
getEditXHTMLCode
in class AbstractVisualComponent
Exception
public String getEncoding()
protected String getEncodingXHTMLInputName()
public String getFileDirectory(ContentContext ctx)
protected FilenameFilter getFileFilter()
protected FilenameFilter getDecorationFilter()
protected String[] getFileList(String directory, FilenameFilter filter)
public String getFileName()
protected String getFileURL(ContentContext ctx, String fileLink)
protected String getFileXHTMLInputName()
protected String getDecoImageXHTMLInputName()
protected String getDecoImageFileXHTMLInputName()
protected String getImageChangeTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String getImageLabelTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String getImageUploadTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String getFileUploadActionTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String getImageDecorativeTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String getImageSelectTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public String getJSOnChange(ContentContext ctx)
public String getLabel()
protected String getLabelXHTMLInputName()
protected String getTextAutoInputName()
protected String getFirstTextInputName()
protected String getSecondTextInputName()
protected String getNewDirInputName()
protected String getNewDirLabelTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public String getImageImgName()
public String getResourceURL(ContentContext ctx)
protected String getMainFolder(ContentContext ctx)
public String getResourceURL(ContentContext ctx, String fileLink)
protected int getMaxPreviewImages()
protected String getPreviewZoneId()
protected String getPreviewCode(ContentContext ctx) throws Exception
Exception
public File getFile(ContentContext ctx)
public String getPreviewCode(ContentContext ctx, int maxDisplayedImage) throws Exception
Exception
public String getPreviewCode(ContentContext ctx, int maxDisplayedImage, boolean imageList) throws Exception
Exception
protected String getDisplayAllLabel(I18nAccess i18nAccess)
protected String getRelativeFileDirectory(ContentContext ctx)
protected String getReverseLinkeLabelTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected String getReverseLinkInputName()
protected String getSelectXHTMLInputName()
public StaticInfo getStaticInfo(ContentContext ctx)
public int getWordCount(ContentContext ctx)
IContentVisualComponent
getWordCount
in interface IContentVisualComponent
getWordCount
in class AbstractVisualComponent
public void init(ComponentBean bean, ContentContext ctx) throws Exception
init
in class AbstractVisualComponent
Exception
protected boolean isImported(ContentContext ctx)
public boolean isContentCachable(ContentContext ctx)
IContentVisualComponent
isContentCachable
in interface IContentVisualComponent
isContentCachable
in class AbstractVisualComponent
protected boolean isFileNameValid(ContentContext ctx, String fileName)
public boolean isInsertable()
AbstractVisualComponent
isInsertable
in interface IContentVisualComponent
isInsertable
in class AbstractVisualComponent
protected boolean isLinkToStatic()
public boolean isOnlyFirstOccurrence()
public boolean isReverseLink()
public boolean isWithDescription()
protected boolean needEncoding()
protected boolean isFromShared(ContentContext ctx)
public String performEdit(ContentContext ctx) throws Exception
IContentVisualComponent
performEdit
in interface IContentVisualComponent
performEdit
in class AbstractVisualComponent
Exception
protected void setLabel(String label)
protected void reloadProperties()
public boolean renameResource(ContentContext ctx, File oldName, File newName)
IStaticContainer
renameResource
in interface IStaticContainer
protected String saveItem(ContentContext ctx, org.apache.commons.fileupload.FileItem item) throws Exception
Exception
public void setDirSelected(String dir)
IStaticContainer
setDirSelected
in interface IStaticContainer
public void setFileName(String name)
public void setValue(String inContent)
IContentVisualComponent
setValue
in interface IContentVisualComponent
setValue
in class AbstractVisualComponent
public void storeProperties()
protected void uploadFiles(ContentContext ctx, RequestService service) throws Exception
Exception
public String performUpload(ContentContext ctx) throws Exception
performUpload
in interface IUploadResource
Exception
public boolean isMirroredByDefault(ContentContext ctx)
IContentVisualComponent
isMirroredByDefault
in interface IContentVisualComponent
isMirroredByDefault
in class AbstractVisualComponent
public String getContentAsText(ContentContext ctx)
IContentVisualComponent
getContentAsText
in interface IContentVisualComponent
getContentAsText
in class AbstractVisualComponent
public static String performLoadImages(RequestService rs, ContentContext ctx, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
Exception
public String getType()
IContentVisualComponent
getType
in interface IContentVisualComponent
public String getActionGroupName()
IAction
getActionGroupName
in interface IAction
public boolean isUploadOnDrop()
isUploadOnDrop
in interface IUploadResource
public int getPopularity(ContentContext ctx)
IStaticContainer
getPopularity
in interface IStaticContainer
public List<File> getFiles(ContentContext ctx)
getFiles
in interface IStaticContainer
public void setLatestValidDate(Date date)
setLatestValidDate
in interface ILink
public Date getLatestValidDate()
getLatestValidDate
in interface ILink
public boolean isDisplayable(ContentContext ctx) throws Exception
IContentVisualComponent
isDisplayable
in interface IContentVisualComponent
isDisplayable
in class AbstractVisualComponent
Exception
public String getFontAwesome()
getFontAwesome
in interface IContentVisualComponent
getFontAwesome
in class AbstractVisualComponent
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
IContentVisualComponent
transflateFrom
in interface IContentVisualComponent
transflateFrom
in class AbstractVisualComponent
ctx
- contextContext of the current renderingtranslator
- class to translatelang
- the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.