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 class
FieldFile.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:
newFieldBean
in 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:
initContent
in 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:
getEditXHTMLCode
in classField
- Throws:
Exception
-
getSearchEditXHTMLCode
public String getSearchEditXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getSearchEditXHTMLCode
in 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:
getReferenceFieldView
in 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:
isPertinent
in classField
-
search
public boolean search(ContentContext ctx, String query)
-
getViewXHTMLCode
public String getViewXHTMLCode(ContentContext ctx) throws Exception
- Overrides:
getViewXHTMLCode
in classField
- Throws:
Exception
-
getURL
public String getURL(ContentContext ctx)
-
process
public boolean process(ContentContext ctx)
Description copied from class:Field
process 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:IStaticContainer
check if the class contains the static resources define by a URI- Specified by:
contains
in interfaceIStaticContainer
inURI
- 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:IStaticContainer
return all resources found in the component.- Specified by:
getAllResources
in interfaceIStaticContainer
- Returns:
-
renameResource
public boolean renameResource(ContentContext ctx, File oldName, File newName)
Description copied from interface:IStaticContainer
rename a resource- Specified by:
renameResource
in interfaceIStaticContainer
- Returns:
- true if rename, false else
-
getAllResourcesLinks
public Collection<Link> getAllResourcesLinks(ContentContext ctx)
Description copied from interface:IStaticContainer
create link to resources.- Specified by:
getAllResourcesLinks
in 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:IStaticContainer
return indice of popularity- Specified by:
getPopularity
in interfaceIStaticContainer
- Returns:
-
getFiles
public List<File> getFiles(ContentContext ctx)
- Specified by:
getFiles
in interfaceIStaticContainer
-
getDirSelected
public String getDirSelected(ContentContext ctx)
Description copied from interface:IStaticContainer
get folder with ressources- Specified by:
getDirSelected
in interfaceIStaticContainer
- Returns:
-
setDirSelected
public void setDirSelected(String dir)
Description copied from interface:IStaticContainer
set folder with resources- Specified by:
setDirSelected
in interfaceIStaticContainer
-
isLight
protected boolean isLight()
-
getRessourceURL
protected String getRessourceURL(ContentContext ctx)
-
isValueTranslatable
protected boolean isValueTranslatable()
- Overrides:
isValueTranslatable
in classField
-
transflateFrom
public boolean transflateFrom(ContentContext ctx, ITranslator translator, String lang)
- Overrides:
transflateFrom
in classField
-
-