public class PresentationsImpl extends java.lang.Object implements Presentations
| Constructor and Description |
|---|
PresentationsImpl(Component c) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Presentation p)
Adds a new presentation
|
void |
addListener(PresentationsChangeListener listener)
Adds listener
|
void |
commit()
Commits all changes into the database
|
void |
commited(java.util.Set<Entity> entities) |
java.lang.String |
getCaption(java.lang.Object id)
Returns presentation caption by its id
|
Presentation |
getCurrent()
Returns the current active presentation or
null if a current presentation didn't set |
Presentation |
getDefault()
Returns a default presentation or
null if it didn't set |
Presentation |
getPresentation(java.lang.Object id)
Returns presentation by its id or
null if a presentation doesn't exist |
Presentation |
getPresentationByName(java.lang.String name)
Returns a presentation by its name with ignored case.
|
java.util.Collection<java.lang.Object> |
getPresentationIds()
Returns a collection of the component presentations
|
org.dom4j.Element |
getSettings(Presentation p)
Returns user settings for the selected presentation or
null
if the presentation doesn't exist or if the presentation doesn't contain any settings |
boolean |
isAutoSave(Presentation p)
Returns
true if the selected presentation has an autoSave settings else returns false |
boolean |
isGlobal(Presentation p)
Returns
true if the selected presentation is marked as global else returns false |
void |
modify(Presentation p)
Modifies the selected presentation
|
void |
remove(Presentation p)
Removes a presentation from the list of available presentations
|
void |
removeListener(PresentationsChangeListener listener)
Removes listener
|
void |
setCurrent(Presentation p)
Sets current active presentation for a component
|
void |
setDefault(Presentation p)
Sets a default presentation
|
void |
setSettings(Presentation p,
org.dom4j.Element e)
Sets user settings for the selected presentation
|
public PresentationsImpl(Component c)
public void add(Presentation p)
Presentationsadd in interface Presentationspublic Presentation getCurrent()
Presentationsnull if a current presentation didn't setgetCurrent in interface Presentationspublic void setCurrent(Presentation p)
PresentationssetCurrent in interface Presentationspublic org.dom4j.Element getSettings(Presentation p)
Presentationsnull
if the presentation doesn't exist or if the presentation doesn't contain any settingsgetSettings in interface Presentationspublic void setSettings(Presentation p, org.dom4j.Element e)
PresentationssetSettings in interface Presentationspublic Presentation getPresentation(java.lang.Object id)
Presentationsnull if a presentation doesn't existgetPresentation in interface Presentationspublic java.lang.String getCaption(java.lang.Object id)
PresentationsgetCaption in interface Presentationspublic java.util.Collection<java.lang.Object> getPresentationIds()
PresentationsgetPresentationIds in interface Presentationspublic void setDefault(Presentation p)
PresentationssetDefault in interface Presentationspublic Presentation getDefault()
Presentationsnull if it didn't setgetDefault in interface Presentationspublic void remove(Presentation p)
Presentationsremove in interface Presentationspublic void modify(Presentation p)
Presentationsmodify in interface Presentationspublic boolean isAutoSave(Presentation p)
Presentationstrue if the selected presentation has an autoSave settings else returns falseisAutoSave in interface Presentationspublic boolean isGlobal(Presentation p)
Presentationstrue if the selected presentation is marked as global else returns falseisGlobal in interface Presentationspublic void commit()
Presentationscommit in interface Presentationspublic void commited(java.util.Set<Entity> entities)
public void addListener(PresentationsChangeListener listener)
PresentationsaddListener in interface Presentationspublic void removeListener(PresentationsChangeListener listener)
PresentationsremoveListener in interface Presentationspublic Presentation getPresentationByName(java.lang.String name)
Presentationsnull if a presentation with such name doesn't existgetPresentationByName in interface Presentations