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

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.shared.entity.Annotation
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable, IFieldVerifier
Direct Known Subclasses:
DocentAnnotation, UserAnnotation

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

Annotation is the generalization for DocentAnnotation and UserAnnotation.

Version:
$LastChangedVersion$
Author:
Enrico Homann

Method Summary
 java.util.List<java.lang.String> checkValidity()
          Will check the validity of the entity and return a List of error messages or a List with no messages (size 0).
 java.lang.String getContent()
          Will return the annotation content.
 java.lang.Long getCreationUnixTimestamp()
          Will return the annotation creation unix timestamp.
 RegisteredUser getCreatorUser()
          Will return the annotation creator user.
 java.lang.String getDisplayStringFromTemplate(java.lang.String template)
          Must not be called from Backend side, because DateTimeFormat is a GWT only thing.
 IconTypeEnum getIconType()
          Will return the annotation icon type.
 java.lang.Long getId()
          Will return the annotation id.
 java.lang.Long getLastModifiedUnixTimestamp()
          Will return the annotation last modified unix timestamp.
 java.lang.Long getParagraphId()
          Will return the paragraph id.
 ParagraphTransportHeader getParaHeader()
          Will return the ParagraphTransportHeader.
 Annotation getParent()
          Will return the annotation's parent annotation.
 java.lang.Long getPosition()
          Will return the annotation position.
 java.lang.String getTitle()
          Will return the annotation title.
 void setContent(java.lang.String sContent)
          Sets the annotation content.
 void setCreationUnixTimestamp(java.lang.Long nCreationUnixTimestamp)
          Sets the annotation creation unix timestamp.
 void setCreatorUser(RegisteredUser oCreatorUser)
          Sets the annotation creator user.
 void setIconType(IconTypeEnum oIconType)
          Sets the annotation icon type.
 void setId(java.lang.Long nId)
          Sets the annotation id.
 void setLastModifiedUnixTimestamp(java.lang.Long oLastModifiedUnixTimestamp)
          Sets the annotation last modified unix timestamp.
 void setParagraphId(java.lang.Long nParagraphId)
          Sets the paragraph id.
 void setParaHeader(ParagraphTransportHeader oParaHeader)
          Sets the ParagraphTransportHeader.
 void setParent(Annotation oParent)
          Sets the annotation's parent annotation.
 void setPosition(java.lang.Long nPosition)
          Sets the annotation position.
 void setTitle(java.lang.String sTitle)
          Sets the annotation title.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public final java.lang.Long getId()
Will return the annotation id.

Returns:
Long

setId

public final void setId(java.lang.Long nId)
Sets the annotation id.

Parameters:
nId - Long

getParagraphId

public final java.lang.Long getParagraphId()
Will return the paragraph id.

Returns:
Long

setParagraphId

public final void setParagraphId(java.lang.Long nParagraphId)
Sets the paragraph id.

Parameters:
nParagraphId - value

getPosition

public final java.lang.Long getPosition()
Will return the annotation position.

Returns:
Long

setPosition

public final void setPosition(java.lang.Long nPosition)
Sets the annotation position.

Parameters:
nPosition - nPosition

getTitle

public final java.lang.String getTitle()
Will return the annotation title.

Returns:
String

setTitle

public final void setTitle(java.lang.String sTitle)
Sets the annotation title.

Parameters:
sTitle - String

getContent

public final java.lang.String getContent()
Will return the annotation content.

Returns:
String

setContent

public final void setContent(java.lang.String sContent)
Sets the annotation content.

Parameters:
sContent - String

getIconType

public final IconTypeEnum getIconType()
Will return the annotation icon type.

Returns:
IconTypeEnum

setIconType

public final void setIconType(IconTypeEnum oIconType)
Sets the annotation icon type.

Parameters:
oIconType - IconTypeEnum

getCreationUnixTimestamp

public final java.lang.Long getCreationUnixTimestamp()
Will return the annotation creation unix timestamp.

Returns:
Long

setCreationUnixTimestamp

public final void setCreationUnixTimestamp(java.lang.Long nCreationUnixTimestamp)
Sets the annotation creation unix timestamp.

Parameters:
nCreationUnixTimestamp - Long

getLastModifiedUnixTimestamp

public final java.lang.Long getLastModifiedUnixTimestamp()
Will return the annotation last modified unix timestamp.

Returns:
Long

setLastModifiedUnixTimestamp

public final void setLastModifiedUnixTimestamp(java.lang.Long oLastModifiedUnixTimestamp)
Sets the annotation last modified unix timestamp.

Parameters:
oLastModifiedUnixTimestamp - Long

getParent

public final Annotation getParent()
Will return the annotation's parent annotation.

Returns:
Annotation

setParent

public final void setParent(Annotation oParent)
Sets the annotation's parent annotation.

Parameters:
oParent - Annotation

getCreatorUser

public final RegisteredUser getCreatorUser()
Will return the annotation creator user.

Returns:
registeredUser

setCreatorUser

public final void setCreatorUser(RegisteredUser oCreatorUser)
Sets the annotation creator user.

Parameters:
oCreatorUser - RegisteredUser

getParaHeader

public final ParagraphTransportHeader getParaHeader()
Will return the ParagraphTransportHeader.

Returns:
ParagraphTransportHeader

setParaHeader

public final void setParaHeader(ParagraphTransportHeader oParaHeader)
Sets the ParagraphTransportHeader.

Parameters:
oParaHeader - ParagraphTransportHeader

getDisplayStringFromTemplate

public final java.lang.String getDisplayStringFromTemplate(java.lang.String template)
Must not be called from Backend side, because DateTimeFormat is a GWT only thing. Returns a template tag replaced String for template String template.

Parameters:
template - String
Returns:
String

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

checkValidity

public final java.util.List<java.lang.String> checkValidity()
Description copied from interface: IFieldVerifier
Will check the validity of the entity and return a List of error messages or a List with no messages (size 0).

Specified by:
checkValidity in interface IFieldVerifier
Returns:
List of String