|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.mimetypes.image.ImageSizerFactory
Implements the Factory pattern in order to
supply implementation-specific instances of ImageSizer
.
The factory is initialized in the mime-type initializer.
Field Summary | |
static String |
versionId
|
Constructor Summary | |
ImageSizerFactory()
Constructor |
Method Summary | |
static void |
addImageSizer(String mime,
ImageSizer sizer)
Add an ImageSizer instance to the factory |
static ImageSizer |
getImageSizer(String mime)
Obtain an instance of an ImageSizer which can determine
the size of an image with the given mime-type. |
static void |
initialize()
Initialize the factory by loading all image sizers from the database |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public ImageSizerFactory()
Method Detail |
public static void addImageSizer(String mime, ImageSizer sizer)
ImageSizer
instance to the factory
mime
- the mime-type of the image which the image sizer
is able to handlesizer
- an implementation-specific instance of ImageSizer
public static ImageSizer getImageSizer(String mime)
ImageSizer
which can determine
the size of an image with the given mime-type.
mime
- the mime-type of the image which the image sizer
should handle
ImageSizer
, or null
if no such instance existspublic static void initialize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |