Package org.javlo.service.shared
Class LocalImageSharedContentProvider
- java.lang.Object
-
- org.javlo.service.shared.AbstractSharedContentProvider
-
- org.javlo.service.shared.LocalImageSharedContentProvider
-
- All Implemented Interfaces:
ISharedContentProvider
- Direct Known Subclasses:
GlobalImageSharedContentProvider,ImportedImageSharedContentProvider,LocalFileSharedContentProvider
public class LocalImageSharedContentProvider extends AbstractSharedContentProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringIMAGE_FILTERstatic StringNAME-
Fields inherited from class org.javlo.service.shared.AbstractSharedContentProvider
categories, name, url
-
Fields inherited from interface org.javlo.service.shared.ISharedContentProvider
TYPE_DEFAULT, TYPE_IMAGE, TYPE_MULTIMEDIA, TYPE_TEXT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanacceptedDocument(ContentContext ctx, String fileName)Booleanexist(ContentContext ctx, String fileName, String category)Map<String,String>getCategories(ContentContext ctx)protected ComponentBeangetComponentBean(String name, String category, String specialValue, String lg)Collection<SharedContent>getContent(ContentContext ctx)protected FileFiltergetFilter()protected StringgetPreviewURL(ContentContext ctx, ComponentBean compBean)protected FilegetRootFolder(ContentContext ctx)StringgetType()protected booleanisCategoryAccepted(ContentContext ctx, String category, MenuElement cp, Template template)booleanisUploadable(ContentContext ctx)voidupload(ContentContext ctx, String fileName, InputStream in, String category, boolean rename)-
Methods inherited from class org.javlo.service.shared.AbstractSharedContentProvider
getCategoriesSize, getContent, getContentSize, getFolder, getLabel, getName, getURL, isCategoryAccepted, isEmpty, isLarge, isSearch, refresh, searchContent, setCategories, setName, setURL
-
-
-
-
Field Detail
-
IMAGE_FILTER
protected static final String IMAGE_FILTER
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getComponentBean
protected ComponentBean getComponentBean(String name, String category, String specialValue, String lg)
-
getPreviewURL
protected String getPreviewURL(ContentContext ctx, ComponentBean compBean) throws Exception
- Throws:
Exception
-
getFilter
protected FileFilter getFilter()
-
getRootFolder
protected File getRootFolder(ContentContext ctx)
-
getContent
public Collection<SharedContent> getContent(ContentContext ctx)
- Specified by:
getContentin interfaceISharedContentProvider- Specified by:
getContentin classAbstractSharedContentProvider
-
isCategoryAccepted
protected boolean isCategoryAccepted(ContentContext ctx, String category, MenuElement cp, Template template)
- Overrides:
isCategoryAcceptedin classAbstractSharedContentProvider
-
getCategories
public Map<String,String> getCategories(ContentContext ctx)
- Specified by:
getCategoriesin interfaceISharedContentProvider- Overrides:
getCategoriesin classAbstractSharedContentProvider
-
getType
public String getType()
- Specified by:
getTypein interfaceISharedContentProvider- Overrides:
getTypein classAbstractSharedContentProvider
-
isUploadable
public boolean isUploadable(ContentContext ctx)
- Specified by:
isUploadablein interfaceISharedContentProvider- Overrides:
isUploadablein classAbstractSharedContentProvider
-
acceptedDocument
protected boolean acceptedDocument(ContentContext ctx, String fileName)
-
exist
public Boolean exist(ContentContext ctx, String fileName, String category) throws IOException
- Specified by:
existin interfaceISharedContentProvider- Overrides:
existin classAbstractSharedContentProvider- Throws:
IOException
-
upload
public void upload(ContentContext ctx, String fileName, InputStream in, String category, boolean rename) throws IOException
- Specified by:
uploadin interfaceISharedContentProvider- Overrides:
uploadin classAbstractSharedContentProvider- Throws:
IOException
-
-