Class FileImagePublicService
- java.lang.Object
-
- fr.paris.lutece.portal.service.cache.AbstractCacheableService
-
- fr.paris.lutece.portal.service.fileimage.FileImagePublicService
-
- All Implemented Interfaces:
CacheableService,ImageResourceProvider,LuteceService,Cloneable,net.sf.ehcache.event.CacheEventListener
public class FileImagePublicService extends AbstractCacheableService implements ImageResourceProvider
-
-
Field Summary
Fields Modifier and Type Field Description static StringIMAGE_RESOURCE_TYPE_ID
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddImageResource(org.apache.commons.fileupload.FileItem fileItem)Return the Resource idImageResourcegetImageResource(int nIdResource)Return the Resource idstatic FileImagePublicServicegetInstance()Get the unique instance of the serviceStringgetName()Returns the Service nameStringgetResourceTypeId()Return the Resource Type idstatic voidinit()Initvoidregister()Initializes the service-
Methods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService
clone, dispose, enableCache, getCache, getCacheSize, getFromCache, getInfos, getKeys, getMaxElements, getMemorySize, getStatistics, getTimeToLive, initCache, initCache, isCacheEnable, notifyElementEvicted, notifyElementExpired, notifyElementPut, notifyElementRemoved, notifyElementUpdated, notifyRemoveAll, putInCache, removeKey, resetCache
-
-
-
-
Field Detail
-
IMAGE_RESOURCE_TYPE_ID
public static final String IMAGE_RESOURCE_TYPE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public static void init()
Init- Throws:
LuteceInitException- if an error occurs
-
register
public void register()
Initializes the service
-
getInstance
public static FileImagePublicService getInstance()
Get the unique instance of the service- Returns:
- The unique instance
-
getResourceTypeId
public String getResourceTypeId()
Description copied from interface:ImageResourceProviderReturn the Resource Type id- Specified by:
getResourceTypeIdin interfaceImageResourceProvider- Returns:
- The Resource Type Id
-
getImageResource
public ImageResource getImageResource(int nIdResource)
Description copied from interface:ImageResourceProviderReturn the Resource id- Specified by:
getImageResourcein interfaceImageResourceProvider- Parameters:
nIdResource- The resource identifier- Returns:
- The Resource Image
-
addImageResource
public String addImageResource(org.apache.commons.fileupload.FileItem fileItem)
Return the Resource id- Specified by:
addImageResourcein interfaceImageResourceProvider- Parameters:
iImageResource- The resource identifier- Returns:
- The New Resource Id
-
getName
public String getName()
Description copied from interface:LuteceServiceReturns the Service name- Specified by:
getNamein interfaceLuteceService- Returns:
- The name as a String
-
-