Package org.javlo.fields
Class FieldFile
- java.lang.Object
-
- org.javlo.fields.Field
-
- org.javlo.fields.FieldFile
-
- All Implemented Interfaces:
Cloneable,Comparable<Field>,IRestItem,IStaticContainer
- Direct Known Subclasses:
FieldImage,FieldSound
public class FieldFile extends Field implements IStaticContainer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFieldFile.StaticFileBean-
Nested classes/interfaces inherited from class org.javlo.fields.Field
Field.FieldBean
-
-
Field Summary
-
Fields inherited from class org.javlo.fields.Field
comp, DEFAULT_SEARCH_TYPE, globalContext, i18nAccess, LABEL_CSS, MESSAGE_ERROR, MESSAGE_INFO, properties, SMALL_PART_SIZE, SMALL_VALUE_SIZE, staticConfig, VALUE_SIZE
-
-
Constructor Summary
Constructors Constructor Description FieldFile()
-
Method Summary
-
Methods inherited from class org.javlo.fields.Field
compareTo, createKey, defaultLabelDisplayed, fillRequest, getBean, getCloseRow, getContentAsMap, getCssClass, getCSSClass, getCurrentLocale, getDefaultLanguages, getDefaultPrefix, getDefaultSuffix, getDisplayValue, getEditLabelCode, getEditXHTMLCode, getFieldPrefix, getFieldSuffix, getForceModifFieldName, getFormatedValue, getGlobalContext, getHtml, getI18nAccess, getId, getInitValue, getInputLabelName, getInputName, getLabel, getLabel, getList, getMaxSize, getMessage, getMessageType, getMessageTypeCSSClass, getMetaData, getMetaData, getMinSize, getName, getOpenRow, getOrder, getPageDescription, getPlaceholder, getPropertyValue, getReference, getReferenceComponent, getReferenceFormatedValue, getReferenceValue, getRemplacementCode, getSearchLabel, getSearchType, getSize, getSpecialClass, getStaticConfig, getTag, getTranslation, getUnicName, getUnity, getUnity, getUserLabel, getUserLabel, getValue, getValue, getValues, getValues, getViewListXHTMLCode, getWidthEdit, getXHTMLValue, isContentCachable, isDiplayedInList, isFirst, isI18n, isLabelDisplayed, isLabelEditable, isLast, isNeeded, isNeedRefresh, isReadOnly, isRealContent, isSearch, isTitle, isValid, isViewDisplayed, isWrapped, main, newInstance, referenceEditCode, referenceViewCode, reload, renderSelect, setCurrentLocale, setFirst, setGlobalContext, setI18nAccess, setId, setLabel, setLabelValue, setLast, setMessage, setMessageType, setName, setNeedRefresh, setPlaceholder, setProperties, setReadOnly, setStaticConfig, setValue, setValue, setValues, toString, validate
-
-
-
-
Method Detail
-
newFieldBean
protected Field.FieldBean newFieldBean(ContentContext ctx)
- Overrides:
newFieldBeanin classField
-
getFilter
protected String getFilter()
-
getInputFolderName
protected String getInputFolderName()
-
getInputCreateFolderName
protected String getInputCreateFolderName()
-
getFolderLabel
protected String getFolderLabel()
-
getInputFileName
protected String getInputFileName()
-
getInputFileNameSelect
protected String getInputFileNameSelect()
-
getInputAddFileName
protected String getInputAddFileName()
-
getInputLabelFileName
protected String getInputLabelFileName()
-
getFileLabel
protected String getFileLabel()
-
getLabelLabel
protected String getLabelLabel()
-
getAddFileLabel
protected String getAddFileLabel()
-
getCreateFolderLabel
protected String getCreateFolderLabel()
-
getFileType
protected String getFileType()
-
isCategoryRecursive
protected boolean isCategoryRecursive()
-
getFileTypeFolder
protected String getFileTypeFolder()
-
getFileDirectory
protected String getFileDirectory()
-
getImportFolderPath
public static String getImportFolderPath(ContentContext ctx)
-
initContent
public boolean initContent(ContentContext ctx) throws Exception
- Overrides:
initContentin classField- Throws:
Exception
-
getFolderListForSelection
protected List<String> getFolderListForSelection(ContentContext ctx)
-
getPreviewCode
protected String getPreviewCode(ContentContext ctx, boolean title) throws Exception
- Throws:
Exception
-
getEditXHTMLCode
public String getEditXHTMLCode(ContentContext ctx, boolean search) throws Exception
- Overrides:
getEditXHTMLCodein classField- Throws:
Exception
-
getSearchEditXHTMLCode
public String getSearchEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getSearchEditXHTMLCodein classField- Throws:
Exception
-
getReferenceFieldView
protected String getReferenceFieldView(ContentContext ctx) throws Exception
render the field when he is used as reference value in a other language.- Overrides:
getReferenceFieldViewin classField- Parameters:
ctx-- Returns:
- Throws:
Exception
-
getCurrentLink
public String getCurrentLink()
-
getInputLabelLinkName
protected String getInputLabelLinkName()
-
getDeleteLinkName
protected String getDeleteLinkName()
-
getLinkLabel
protected String getLinkLabel()
-
isWithLink
protected boolean isWithLink()
-
isPertinent
public boolean isPertinent(ContentContext ctx)
- Overrides:
isPertinentin classField
-
search
public boolean search(ContentContext ctx, String query)
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCodein classField- Throws:
Exception
-
getURL
public String getURL(ContentContext ctx)
-
process
public boolean process(ContentContext ctx)
Description copied from class:Fieldprocess the field
-
getCurrentFolder
public String getCurrentFolder()
-
setCurrentFolder
public void setCurrentFolder(String folder)
-
getCurrentFile
public String getCurrentFile()
-
setCurrentFile
public void setCurrentFile(String file)
-
getCurrentLabel
protected String getCurrentLabel()
-
getViewLabel
protected String getViewLabel()
-
setCurrentLabel
protected void setCurrentLabel(String label)
-
getFileURL
protected String getFileURL(ContentContext ctx, String fileLink)
-
contains
public boolean contains(ContentContext ctx, String inURI)
Description copied from interface:IStaticContainercheck if the class contains the static resources define by a URI- Specified by:
containsin interfaceIStaticContainerinURI- a uri to a static resources- Returns:
- true if the class conatins this static resources.
-
getAllResources
public Collection<Resource> getAllResources(ContentContext ctx)
Description copied from interface:IStaticContainerreturn all resources found in the component.- Specified by:
getAllResourcesin interfaceIStaticContainer- Returns:
-
renameResource
public boolean renameResource(ContentContext ctx, File oldName, File newName)
Description copied from interface:IStaticContainerrename a resource- Specified by:
renameResourcein interfaceIStaticContainer- Returns:
- true if rename, false else
-
getAllResourcesLinks
public Collection<Link> getAllResourcesLinks(ContentContext ctx)
Description copied from interface:IStaticContainercreate link to resources.- Specified by:
getAllResourcesLinksin interfaceIStaticContainer- Returns:
-
getRelativeFileDirectory
protected String getRelativeFileDirectory(ContentContext ctx)
-
getStaticInfo
protected StaticInfo getStaticInfo(ContentContext ctx) throws Exception
- Throws:
Exception
-
getPopularity
public int getPopularity(ContentContext ctx)
Description copied from interface:IStaticContainerreturn indice of popularity- Specified by:
getPopularityin interfaceIStaticContainer- Returns:
-
getFiles
public List<File> getFiles(ContentContext ctx)
- Specified by:
getFilesin interfaceIStaticContainer
-
getDirSelected
public String getDirSelected(ContentContext ctx)
Description copied from interface:IStaticContainerget folder with ressources- Specified by:
getDirSelectedin interfaceIStaticContainer- Returns:
-
setDirSelected
public void setDirSelected(String dir)
Description copied from interface:IStaticContainerset folder with resources- Specified by:
setDirSelectedin interfaceIStaticContainer
-
isLight
protected boolean isLight()
-
getRessourceURL
protected String getRessourceURL(ContentContext ctx)
-
isValueTranslatable
protected boolean isValueTranslatable()
- Overrides:
isValueTranslatablein classField
-
transflateFrom
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
- Overrides:
transflateFromin classField
-
-