de.hs_rm.cs.lecturenotes.shared.entity
Class MediaFile

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.shared.entity.MediaFile
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
Direct Known Subclasses:
LectureMediaFile

public abstract class MediaFile
extends java.lang.Object
implements com.google.gwt.user.client.rpc.IsSerializable

Generalized Parent Entity MediaFile. A MediaFile of image type has two representations: a) web and b) print. This is due to different carrier material resolutions and aspect ratios. Paper is usually printed in portrait orientation, while the display has a landscape orientation. The filename{Web, Print} attributes were of type String not of the probably more usable option java.io.File because GWT doesn't support it for the client. This entity is made transient and not stored in the SQL database, because the logic is to operate with the files directly on the file system (also a database, sort of).

Version:
$LastChangedRevision: 236 $
Author:
Enrico Homann

Method Summary
 java.lang.String getEditorCode()
          Editor Code of the MediaFile for insertation in the client editors.
 java.lang.String getFilenamePrint()
          Will return the filename for print context.
 java.lang.String getFilenameWeb()
          Will return the filename for web context.
 java.lang.String getKeyName()
          Will return the key name.
 MimeType getMimeType()
          Will return the mime type.
 java.lang.String getUrlWeb()
          Will return the URL as location on the server.
 void setFilenamePrint(java.lang.String sFilenamePrint)
          Sets the filename for print context.
 void setFilenameWeb(java.lang.String sFilenameWeb)
          Sets the filename for web context.
 void setKeyName(java.lang.String sKeyName)
          Sets the key name.
 void setMimeType(MimeType oMimeType)
          Sets the mime type.
 void setUrlWeb(java.lang.String sUrlWeb)
          Sets the URL as location on the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKeyName

public final java.lang.String getKeyName()
Will return the key name.

Returns:
String

setKeyName

public final void setKeyName(java.lang.String sKeyName)
Sets the key name.

Parameters:
sKeyName - String

getMimeType

public final MimeType getMimeType()
Will return the mime type.

Returns:
MimeType

setMimeType

public final void setMimeType(MimeType oMimeType)
Sets the mime type.

Parameters:
oMimeType - MimeType

getFilenameWeb

public final java.lang.String getFilenameWeb()
Will return the filename for web context.

Returns:
String

setFilenameWeb

public final void setFilenameWeb(java.lang.String sFilenameWeb)
Sets the filename for web context.

Parameters:
sFilenameWeb - String

getFilenamePrint

public final java.lang.String getFilenamePrint()
Will return the filename for print context.

Returns:
String

setFilenamePrint

public final void setFilenamePrint(java.lang.String sFilenamePrint)
Sets the filename for print context.

Parameters:
sFilenamePrint - String

getUrlWeb

public final java.lang.String getUrlWeb()
Will return the URL as location on the server.

Returns:
String

setUrlWeb

public final void setUrlWeb(java.lang.String sUrlWeb)
Sets the URL as location on the server.

Parameters:
sUrlWeb - String

getEditorCode

public final java.lang.String getEditorCode()
Editor Code of the MediaFile for insertation in the client editors.

Returns:
String