com.livis.livingtalks.model
Class TalkModel
java.lang.Object
|
+--com.livis.livingtalks.model.AbstractModel
|
+--com.livis.livingtalks.model.TalkModel
- Direct Known Subclasses:
- TalkWebImpl
- public class TalkModel
- extends AbstractModel
- See Also:
- Serialized Form
Method Summary |
protected TalkModel |
assignTalkModel(java.lang.String key,
java.lang.String editor,
java.lang.String timestamp,
int duration,
java.lang.String state,
java.lang.String title,
java.lang.String typeKey,
java.lang.String abstractHtml,
java.lang.String homePageUrl,
java.lang.String slidesUrl,
java.lang.String slidesSize,
java.lang.String paperUrl,
java.lang.String draftUrl,
java.lang.String speaker,
java.util.Collection authors)
|
void |
check()
Checks if model is logically OK.
|
void |
checkForKeyCreation()
Checks whether a key can be created from other model data.
|
void |
clear()
Set this Model to a clear state suitable for data entry into a
clear form it is not recommended behaviour for a clear model to
pass a subsequent check() test. |
protected java.lang.String |
createKey()
Creates a key from other model data which must pass the check() test if isKeyCreatable() returns
true .
|
protected java.lang.String |
createKey(int minWordLength,
int maxKeyLength)
|
java.lang.String |
getAbstractHtml()
|
java.lang.String |
getAuthorList()
|
java.util.Collection |
getAuthors()
|
java.lang.String |
getDraftUrl()
|
int |
getDuration()
|
java.lang.String |
getDurationString()
|
java.lang.String |
getHomePageUrl()
|
TalkModel |
getModel()
|
java.lang.String |
getPaperUrl()
|
java.lang.String |
getSlidesSize()
|
java.lang.String |
getSlidesUrl()
|
java.lang.String |
getSpeaker()
|
java.lang.String |
getState()
|
java.lang.String |
getTitle()
|
java.lang.String |
getTypeKey()
|
void |
init()
|
boolean |
isKeyCreatable()
Checks whether a key can, in theory, be created from other
model data.
|
void |
makeShort()
Modifies the model such that less relevant properties
are deleted from the model.
|
void |
setAbstractHtml(java.lang.String abstractHtml)
|
void |
setAuthorList(java.lang.String authorList)
|
void |
setAuthors(java.util.Collection authors)
|
void |
setDraftUrl(java.lang.String draftUrl)
|
void |
setDuration(int minutes)
|
void |
setDurationString(java.lang.String minutesString)
|
void |
setHomePageUrl(java.lang.String homePageUrl)
|
void |
setModel(TalkModel model)
|
void |
setPaperUrl(java.lang.String paperUrl)
|
void |
setSlidesSize(java.lang.String slidesSize)
|
void |
setSlidesUrl(java.lang.String slidesUrl)
|
void |
setSpeaker(java.lang.String speaker)
|
void |
setState(java.lang.String state)
|
void |
setTitle(java.lang.String title)
|
void |
setTypeKey(java.lang.String typeKey)
|
protected java.util.List |
xmlTagPropertiesStore()
|
Methods inherited from class com.livis.livingtalks.model.AbstractModel |
assignAbstractModel,
checkForNonEmptyKey,
getAutoKey,
getEditor,
getKey,
getTimestamp,
setAutoKey,
setEditor,
setKey,
setTimestamp,
setTimestampFromDate,
shallCreateKey,
touch,
XMLTagProperties |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
duration
public int duration
state
public java.lang.String state
title
public java.lang.String title
typeKey
public java.lang.String typeKey
abstractHtml
public java.lang.String abstractHtml
homePageUrl
public java.lang.String homePageUrl
slidesUrl
public java.lang.String slidesUrl
slidesSize
public java.lang.String slidesSize
paperUrl
public java.lang.String paperUrl
draftUrl
public java.lang.String draftUrl
speaker
public java.lang.String speaker
TalkModel
public TalkModel()
assignTalkModel
protected TalkModel assignTalkModel(java.lang.String key,
java.lang.String editor,
java.lang.String timestamp,
int duration,
java.lang.String state,
java.lang.String title,
java.lang.String typeKey,
java.lang.String abstractHtml,
java.lang.String homePageUrl,
java.lang.String slidesUrl,
java.lang.String slidesSize,
java.lang.String paperUrl,
java.lang.String draftUrl,
java.lang.String speaker,
java.util.Collection authors)
getModel
public TalkModel getModel()
setModel
public void setModel(TalkModel model)
init
public void init()
clear
public void clear()
- Description copied from class: AbstractModel
- Set this Model to a clear state suitable for data entry into a
clear form it is not recommended behaviour for a clear model to
pass a subsequent
AbstractModel.check()
test.
- Overrides:
- clear in class AbstractModel
getDuration
public int getDuration()
setDuration
public void setDuration(int minutes)
getState
public java.lang.String getState()
setState
public void setState(java.lang.String state)
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
getTypeKey
public java.lang.String getTypeKey()
setTypeKey
public void setTypeKey(java.lang.String typeKey)
getAbstractHtml
public java.lang.String getAbstractHtml()
setAbstractHtml
public void setAbstractHtml(java.lang.String abstractHtml)
getHomePageUrl
public java.lang.String getHomePageUrl()
setHomePageUrl
public void setHomePageUrl(java.lang.String homePageUrl)
getSlidesUrl
public java.lang.String getSlidesUrl()
setSlidesUrl
public void setSlidesUrl(java.lang.String slidesUrl)
getSlidesSize
public java.lang.String getSlidesSize()
setSlidesSize
public void setSlidesSize(java.lang.String slidesSize)
getPaperUrl
public java.lang.String getPaperUrl()
setPaperUrl
public void setPaperUrl(java.lang.String paperUrl)
getDraftUrl
public java.lang.String getDraftUrl()
setDraftUrl
public void setDraftUrl(java.lang.String draftUrl)
getSpeaker
public java.lang.String getSpeaker()
setSpeaker
public void setSpeaker(java.lang.String speaker)
getAuthorList
public java.lang.String getAuthorList()
setAuthorList
public void setAuthorList(java.lang.String authorList)
getAuthors
public java.util.Collection getAuthors()
setAuthors
public void setAuthors(java.util.Collection authors)
getDurationString
public java.lang.String getDurationString()
setDurationString
public void setDurationString(java.lang.String minutesString)
makeShort
public void makeShort()
- Description copied from class: AbstractModel
- Modifies the model such that less relevant properties
are deleted from the model.
The version of AbstractModel does nothing. A derived version
may set a memory-consuming property to null if it is not used in any
master or tabular view, i.e. a view of many models at once.
A derived version may set a flag if makeShort got called and throw a
LivingTalksException if a property is gotten which was nulled by makeShort.
- Overrides:
- makeShort in class AbstractModel
isKeyCreatable
public boolean isKeyCreatable()
- Description copied from class: AbstractModel
- Checks whether a key can, in theory, be created from other
model data.
This default implementation returns
false
. If
derived classes re-implement this to return true,
they should also overwrite AbstractModel.createKey()
to return a
suitable key and AbstractModel.checkForKeyCreation()
to test whether a
key is valid.
- Overrides:
- isKeyCreatable in class AbstractModel
- Tags copied from class: AbstractModel
- Returns:
true
if a key can be created- See Also:
AbstractModel.createKey()
,
AbstractModel.checkForKeyCreation()
createKey
protected java.lang.String createKey(int minWordLength,
int maxKeyLength)
createKey
protected java.lang.String createKey()
- Description copied from class: AbstractModel
- Creates a key from other model data which must pass the
AbstractModel.check()
test if AbstractModel.isKeyCreatable()
returns
true
.
The generated key is returned. This default implementation
always throws an exception.
- Overrides:
- createKey in class AbstractModel
- Tags copied from class: AbstractModel
- Throws:
- LivingTalksException - if cannot create a key.
- See Also:
AbstractModel.isKeyCreatable()
,
AbstractModel.check()
checkForKeyCreation
public void checkForKeyCreation()
- Description copied from class: AbstractModel
- Checks whether a key can be created from other model data.
This method is called by
AbstractModel.check()
if AbstractModel.isKeyCreatable()
returns true. This default implementation does
nothing and should be re-implemented by derived classes in
conjunction with AbstractModel.isKeyCreatable()
and AbstractModel.createKey()
.
- Overrides:
- checkForKeyCreation in class AbstractModel
- Tags copied from class: AbstractModel
- Throws:
- LivingTalksException - if a key cannot be created from
other model data.
- See Also:
AbstractModel.isKeyCreatable()
,
AbstractModel.createKey()
,
AbstractModel.check()
check
public void check()
- Description copied from class: AbstractModel
- Checks if model is logically OK.
This default implementation checks for an non-empty key and --
if
AbstractModel.isKeyCreatable()
returns true -- whether the key can
in fact be created (using AbstractModel.checkForKeyCreation()
).
Also, special charcters (<, >, &, ", ', \r, and \n) are removed
from the key.
- Overrides:
- check in class AbstractModel
- Tags copied from class: AbstractModel
- Throws:
- LivingTalksException - if model is invalid. Must not
check for duplicate keys as this
is checked anyway at database
insertion time.
- See Also:
AbstractModel.isKeyCreatable()
,
AbstractModel.createKey()
xmlTagPropertiesStore
protected java.util.List xmlTagPropertiesStore()
- Overrides:
- xmlTagPropertiesStore in class AbstractModel