public class AbstractFileComponent extends AbstractVisualComponent implements IStaticContainer, ILink, IUploadResource, IAction
AbstractVisualComponentString 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_SEPARATORCOLORED_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, textToXHTMLpublic 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)
IStaticContainercontains in interface IStaticContainerinURI - a uri to a static resourcespublic String createFileURL(ContentContext ctx, String url)
public boolean equals(Object obj)
equals in class AbstractVisualComponentprotected boolean expandZip()
public String getURL(ContentContext ctx)
ILinkpublic boolean isLinkValid(ContentContext ctx)
ILinkisLinkValid in interface ILinkpublic void prepareView(ContentContext ctx) throws Exception
AbstractVisualComponentprepareView in class AbstractVisualComponentExceptionpublic Collection<Resource> getAllResources(ContentContext ctx)
IStaticContainergetAllResources in interface IStaticContainerpublic Collection<Link> getAllResourcesLinks(ContentContext ctx)
IStaticContainergetAllResourcesLinks in interface IStaticContainerprotected String getCSSType()
protected String getDeleteTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic 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
FileNotFoundExceptionIOExceptionprotected String[] getDirList(ContentContext ctx, String inFolder) throws Exception
Exceptionpublic String getDirSelected()
IStaticContainergetDirSelected in interface IStaticContainerprotected String getEditorComplexity(ContentContext ctx)
AbstractVisualComponentgetEditorComplexity in class AbstractVisualComponentprotected String getMetaCode(ContentContext ctx)
protected boolean isDisplayMeta(ContentContext ctx)
protected String getEditXHTMLCode(ContentContext ctx) throws Exception
getEditXHTMLCode in class AbstractVisualComponentExceptionpublic 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
FileNotFoundExceptionIOExceptionprotected String getImageLabelTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionprotected String getImageUploadTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionprotected String getFileUploadActionTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionprotected String getImageDecorativeTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionprotected String getImageSelectTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionpublic 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
FileNotFoundExceptionIOExceptionpublic 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
Exceptionpublic File getFile(ContentContext ctx)
public String getPreviewCode(ContentContext ctx, int maxDisplayedImage) throws Exception
Exceptionpublic String getPreviewCode(ContentContext ctx, int maxDisplayedImage, boolean imageList) throws Exception
Exceptionprotected String getDisplayAllLabel(I18nAccess i18nAccess)
protected String getRelativeFileDirectory(ContentContext ctx)
protected String getReverseLinkeLabelTitle(ContentContext ctx) throws FileNotFoundException, IOException
FileNotFoundExceptionIOExceptionprotected String getReverseLinkInputName()
protected String getSelectXHTMLInputName()
public StaticInfo getStaticInfo(ContentContext ctx)
public int getWordCount(ContentContext ctx)
IContentVisualComponentgetWordCount in interface IContentVisualComponentgetWordCount in class AbstractVisualComponentpublic void init(ComponentBean bean, ContentContext ctx) throws Exception
init in class AbstractVisualComponentExceptionprotected boolean isImported(ContentContext ctx)
public boolean isContentCachable(ContentContext ctx)
IContentVisualComponentisContentCachable in interface IContentVisualComponentisContentCachable in class AbstractVisualComponentprotected boolean isFileNameValid(ContentContext ctx, String fileName)
public boolean isInsertable()
AbstractVisualComponentisInsertable in interface IContentVisualComponentisInsertable in class AbstractVisualComponentprotected 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
IContentVisualComponentperformEdit in interface IContentVisualComponentperformEdit in class AbstractVisualComponentExceptionprotected void setLabel(String label)
protected void reloadProperties()
public boolean renameResource(ContentContext ctx, File oldName, File newName)
IStaticContainerrenameResource in interface IStaticContainerprotected String saveItem(ContentContext ctx, org.apache.commons.fileupload.FileItem item) throws Exception
Exceptionpublic void setDirSelected(String dir)
IStaticContainersetDirSelected in interface IStaticContainerpublic void setFileName(String name)
public void setValue(String inContent)
IContentVisualComponentsetValue in interface IContentVisualComponentsetValue in class AbstractVisualComponentpublic void storeProperties()
protected void uploadFiles(ContentContext ctx, RequestService service) throws Exception
Exceptionpublic String performUpload(ContentContext ctx) throws Exception
performUpload in interface IUploadResourceExceptionpublic boolean isMirroredByDefault(ContentContext ctx)
IContentVisualComponentisMirroredByDefault in interface IContentVisualComponentisMirroredByDefault in class AbstractVisualComponentpublic String getContentAsText(ContentContext ctx)
IContentVisualComponentgetContentAsText in interface IContentVisualComponentgetContentAsText in class AbstractVisualComponentpublic static String performLoadImages(RequestService rs, ContentContext ctx, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
Exceptionpublic String getType()
IContentVisualComponentgetType in interface IContentVisualComponentpublic String getActionGroupName()
IActiongetActionGroupName in interface IActionpublic boolean isUploadOnDrop()
isUploadOnDrop in interface IUploadResourcepublic int getPopularity(ContentContext ctx)
IStaticContainergetPopularity in interface IStaticContainerpublic List<File> getFiles(ContentContext ctx)
getFiles in interface IStaticContainerpublic void setLatestValidDate(Date date)
setLatestValidDate in interface ILinkpublic Date getLatestValidDate()
getLatestValidDate in interface ILinkpublic boolean isDisplayable(ContentContext ctx) throws Exception
IContentVisualComponentisDisplayable in interface IContentVisualComponentisDisplayable in class AbstractVisualComponentExceptionpublic String getFontAwesome()
getFontAwesome in interface IContentVisualComponentgetFontAwesome in class AbstractVisualComponentpublic boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
IContentVisualComponenttransflateFrom in interface IContentVisualComponenttransflateFrom in class AbstractVisualComponentctx - contextContext of the current renderingtranslator - class to translatelang - the language of the current content (source language)Copyright © 2012-2018. All Rights Reserved.