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)
Presentations
add
in interface Presentations
public Presentation getCurrent()
Presentations
null
if a current presentation didn't setgetCurrent
in interface Presentations
public void setCurrent(Presentation p)
Presentations
setCurrent
in interface Presentations
public org.dom4j.Element getSettings(Presentation p)
Presentations
null
if the presentation doesn't exist or if the presentation doesn't contain any settingsgetSettings
in interface Presentations
public void setSettings(Presentation p, org.dom4j.Element e)
Presentations
setSettings
in interface Presentations
public Presentation getPresentation(java.lang.Object id)
Presentations
null
if a presentation doesn't existgetPresentation
in interface Presentations
public java.lang.String getCaption(java.lang.Object id)
Presentations
getCaption
in interface Presentations
public java.util.Collection<java.lang.Object> getPresentationIds()
Presentations
getPresentationIds
in interface Presentations
public void setDefault(Presentation p)
Presentations
setDefault
in interface Presentations
public Presentation getDefault()
Presentations
null
if it didn't setgetDefault
in interface Presentations
public void remove(Presentation p)
Presentations
remove
in interface Presentations
public void modify(Presentation p)
Presentations
modify
in interface Presentations
public boolean isAutoSave(Presentation p)
Presentations
true
if the selected presentation has an autoSave
settings else returns false
isAutoSave
in interface Presentations
public boolean isGlobal(Presentation p)
Presentations
true
if the selected presentation is marked as global else returns false
isGlobal
in interface Presentations
public void commit()
Presentations
commit
in interface Presentations
public void commited(java.util.Set<Entity> entities)
public void addListener(PresentationsChangeListener listener)
Presentations
addListener
in interface Presentations
public void removeListener(PresentationsChangeListener listener)
Presentations
removeListener
in interface Presentations
public Presentation getPresentationByName(java.lang.String name)
Presentations
null
if a presentation with such name doesn't existgetPresentationByName
in interface Presentations