|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.core.AbstractDateStamped
org.davesag.generica.core.AbstractContent
org.davesag.generica.core.AbstractExtensibleContent
org.davesag.generica.core.MediaType
The MediaType bean represents basic information about the
MediaTypes.
| Field Summary | |
static Map |
MEDIA_TYPES
a synchrosized map of all media types, keyed by mime type. |
protected String |
theFileSuffix
the media-types' file suffix. |
protected String |
theMimeType
the media-types' mime-type |
protected String |
theName
the media-types' name |
| Fields inherited from class org.davesag.generica.core.AbstractExtensibleContent |
theMetaData |
| Fields inherited from class org.davesag.generica.core.AbstractContent |
theCountryCode, theLanguageCode |
| Fields inherited from class org.davesag.generica.core.AbstractDateStamped |
theCreated, theId, theLastModified |
| Constructor Summary | |
MediaType()
null constructor required by hibernate. |
|
MediaType(String name,
String mimetype,
String filesuffix)
Constructor takes a name and mime type and populates a simple mediatype object. |
|
| Method Summary | |
boolean |
equals(Object o)
Tests if the supplied object is equal to this MediaType, ie do they have the same Id? |
String |
getFileSuffix()
get the file suffix. |
static MediaType |
getMediaType(String mimetype)
get the media type for the given mime type. |
String |
getMimeType()
get the mime type. |
String |
getName()
get the name |
static Map |
getTypes()
get the media types map. |
int |
hashcode()
Objects must override the hashcode if they override the equals method. |
void |
setFileSuffix(String linkback)
set the file suffix. |
void |
setMimeType(String mimetype)
set the mime type. |
void |
setName(String name)
set the name |
String |
toString()
string description of the media type. |
| Methods inherited from class org.davesag.generica.core.AbstractExtensibleContent |
addMetaData, getMetaData, getMetaData, removeMetaData, setMetaData |
| Methods inherited from class org.davesag.generica.core.AbstractContent |
getCountryCode, getLanguageCode, getLocale, setCountryCode, setLanguageCode, setLocale |
| Methods inherited from class org.davesag.generica.core.AbstractDateStamped |
getCreated, getId, getLastModified, setCreated, setId, setLastModified, setTemplateId |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.davesag.generica.core.DateStamped |
getCreated, getLastModified, setCreated, setLastModified |
| Field Detail |
public static Map MEDIA_TYPES
protected String theName
protected String theMimeType
protected String theFileSuffix
| Constructor Detail |
public MediaType()
public MediaType(String name,
String mimetype,
String filesuffix)
name - The name of the user.mimetype - The mime type.filesuffix - The file suffix.| Method Detail |
public static Map getTypes()
public static MediaType getMediaType(String mimetype)
mimetype - the mimetype requested.
public String getName()
public void setName(String name)
name - the name.public String getMimeType()
public void setMimeType(String mimetype)
mimetype - the mime type.public String getFileSuffix()
public void setFileSuffix(String linkback)
linkback - the file suffix.public boolean equals(Object o)
equals in class AbstractExtensibleContento - The object to test against this MediaType. Must also be a
MediaType to make sense.
public int hashcode()
hashcode in class AbstractContentMerchant.public String toString()
toString in class AbstractContent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||