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 String
IMAGE_FILTER
static String
NAME
-
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 boolean
acceptedDocument(ContentContext ctx, String fileName)
Boolean
exist(ContentContext ctx, String fileName, String category)
Map<String,String>
getCategories(ContentContext ctx)
protected ComponentBean
getComponentBean(String name, String category, String specialValue, String lg)
Collection<SharedContent>
getContent(ContentContext ctx)
protected FileFilter
getFilter()
protected String
getPreviewURL(ContentContext ctx, ComponentBean compBean)
protected File
getRootFolder(ContentContext ctx)
String
getType()
protected boolean
isCategoryAccepted(ContentContext ctx, String category, MenuElement cp, Template template)
boolean
isUploadable(ContentContext ctx)
void
upload(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:
getContent
in interfaceISharedContentProvider
- Specified by:
getContent
in classAbstractSharedContentProvider
-
isCategoryAccepted
protected boolean isCategoryAccepted(ContentContext ctx, String category, MenuElement cp, Template template)
- Overrides:
isCategoryAccepted
in classAbstractSharedContentProvider
-
getCategories
public Map<String,String> getCategories(ContentContext ctx)
- Specified by:
getCategories
in interfaceISharedContentProvider
- Overrides:
getCategories
in classAbstractSharedContentProvider
-
getType
public String getType()
- Specified by:
getType
in interfaceISharedContentProvider
- Overrides:
getType
in classAbstractSharedContentProvider
-
isUploadable
public boolean isUploadable(ContentContext ctx)
- Specified by:
isUploadable
in interfaceISharedContentProvider
- Overrides:
isUploadable
in classAbstractSharedContentProvider
-
acceptedDocument
protected boolean acceptedDocument(ContentContext ctx, String fileName)
-
exist
public Boolean exist(ContentContext ctx, String fileName, String category) throws IOException
- Specified by:
exist
in interfaceISharedContentProvider
- Overrides:
exist
in classAbstractSharedContentProvider
- Throws:
IOException
-
upload
public void upload(ContentContext ctx, String fileName, InputStream in, String category, boolean rename) throws IOException
- Specified by:
upload
in interfaceISharedContentProvider
- Overrides:
upload
in classAbstractSharedContentProvider
- Throws:
IOException
-
-