com.arsdigita.mimetypes
Class ImageMimeType

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.mimetypes.MimeType
          extended bycom.arsdigita.mimetypes.ImageMimeType

public class ImageMimeType
extends MimeType

A mime type for images.

Version:
$Revision: #6 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Stanislav Freidin (sfreidin@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String MIME_IMAGE_JPEG
           
static String SIZER_CLASS
           
static String versionId
           
 
Fields inherited from class com.arsdigita.mimetypes.MimeType
ALL_FILE_EXTENSIONS, FILE_EXTENSION, JAVA_CLASS, LABEL, MIME_TYPE, OBJECT_TYPE
 
Constructor Summary
ImageMimeType(DataObject obj)
          Construct a new ImageMimeType from the given DataObject.
ImageMimeType(OID oid)
          Load an existing ImageMimeType.
ImageMimeType(String type, String mimeType)
          Construct a new MimeType with a given object type.
 
Method Summary
static MimeTypeCollection getAllImageMimeTypes()
          Get all image mime-types in the system
 String getBaseDataObjectType()
          Return the base data object type for this mime-type
 String getImageSizer()
          Return the name of the image sizer class for this mime-type.
 void setImageSizer(String imageSizerClassName)
          Set the name of the image sizer class for this mime type.
 
Methods inherited from class com.arsdigita.mimetypes.MimeType
beforeSave, createMimeType, getAllFileExtensions, getAllMimeTypes, getFileExtension, getJavaClass, getLabel, getMimeType, getPrefix, getSpecificObjectType, guessMimeType, guessMimeTypeFromFile, hasFileExtension, loadMimeType, searchMimeTypes, setFileExtension, setJavaClass, setLabel, setMimeType, setSpecificObjectType, specialize
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, initialize, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values

SIZER_CLASS

public static final String SIZER_CLASS
See Also:
Constant Field Values

MIME_IMAGE_JPEG

public static final String MIME_IMAGE_JPEG
See Also:
Constant Field Values
Constructor Detail

ImageMimeType

public ImageMimeType(OID oid)
              throws DataObjectNotFoundException
Load an existing ImageMimeType.


ImageMimeType

public ImageMimeType(DataObject obj)
Construct a new ImageMimeType from the given DataObject. All subclasses must implement this constructor.


ImageMimeType

public ImageMimeType(String type,
                     String mimeType)
Construct a new MimeType with a given object type. All subclasses must implement this constructor.

Method Detail

getBaseDataObjectType

public String getBaseDataObjectType()
Return the base data object type for this mime-type

Overrides:
getBaseDataObjectType in class MimeType

getImageSizer

public String getImageSizer()
Return the name of the image sizer class for this mime-type. The image sizer class can be used to guess the width and height (in pixels) of an image. The class will be a subclass of com.arsdigita.cms.image.ImageSizer

Returns:
the name of the class which handles image sizing for this mime type on success, null if the mime type is not an image or if its size cannot be automatically guessed

setImageSizer

public void setImageSizer(String imageSizerClassName)
Set the name of the image sizer class for this mime type.

Parameters:
imageSizerClassName - the name of the Java class which will handle image sizing for this mime type
See Also:
getImageSizer()

getAllImageMimeTypes

public static MimeTypeCollection getAllImageMimeTypes()
Get all image mime-types in the system



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC