|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.defaults.master.CmsMasterMedia
An instance of this module describes a modulemedia entry in the database. It carries a set of data to read and write.
| Field Summary | |
static String |
C_DEFAULT_MIMETYPE
The default mimetype |
static int |
C_MEDIA_TYPE_FILE
Constant fro media type |
static int |
C_MEDIA_TYPE_IMAGE
Constant fro media type |
| Constructor Summary | |
CmsMasterMedia()
Constructs a new instance with some default values. |
|
CmsMasterMedia(int id,
int masterId,
int position,
int width,
int height,
int size,
String mimetype,
int type,
String title,
String name,
String description,
byte[] media)
Constructs a new instance with some default values. |
|
CmsMasterMedia(int position,
int width,
int height,
int size,
String mimetype,
int type,
String title,
String name,
String description,
byte[] media)
Constructs a new instance with some default values. |
|
| Method Summary | |
static String |
computeMimetype(CmsObject cms,
String filename)
Convenience method to compute the mimetype with the extension of the filename (e.g. mypic.gif -> image/gif) |
String |
getDescription()
|
int |
getHeight()
|
int |
getId()
|
int |
getMasterId()
|
byte[] |
getMedia()
|
String |
getMimetype()
|
String |
getName()
|
int |
getPosition()
|
int |
getSize()
|
String |
getTitle()
|
int |
getType()
|
int |
getWidth()
|
void |
setDescription(String desc)
|
void |
setHeight(int height)
|
void |
setId(int id)
Never set this on yourself! |
void |
setMasterId(int id)
Never set this on yourself! |
void |
setMedia(byte[] media)
|
void |
setMimetype(String mimetype)
|
void |
setName(String name)
|
void |
setPosition(int pos)
|
void |
setSize(int size)
|
void |
setTitle(String title)
|
void |
setType(int type)
|
void |
setWidth(int width)
|
String |
toString()
Returns a string representation of this instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int C_MEDIA_TYPE_IMAGE
public static final int C_MEDIA_TYPE_FILE
public static final String C_DEFAULT_MIMETYPE
| Constructor Detail |
public CmsMasterMedia()
public CmsMasterMedia(int position,
int width,
int height,
int size,
String mimetype,
int type,
String title,
String name,
String description,
byte[] media)
public CmsMasterMedia(int id,
int masterId,
int position,
int width,
int height,
int size,
String mimetype,
int type,
String title,
String name,
String description,
byte[] media)
| Method Detail |
public static String computeMimetype(CmsObject cms,
String filename)
cms - - the CmsObject to get access to cms ressources.filename - - the filename to extract the extension from
public int getId()
public int getMasterId()
public int getPosition()
public int getWidth()
public int getHeight()
public int getSize()
public String getMimetype()
public int getType()
public String getTitle()
public String getName()
public String getDescription()
public byte[] getMedia()
public void setId(int id)
public void setMasterId(int id)
public void setPosition(int pos)
public void setWidth(int width)
public void setHeight(int height)
public void setSize(int size)
public void setMimetype(String mimetype)
public void setType(int type)
public void setTitle(String title)
public void setName(String name)
public void setDescription(String desc)
public void setMedia(byte[] media)
public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||