Package io.jmix.uidata
Class TablePresentationsImpl
java.lang.Object
io.jmix.uidata.TablePresentationsImpl
- All Implemented Interfaces:
TablePresentations
-
Field Summary
Modifier and TypeFieldDescriptionprotected TablePresentation
protected CurrentUserSubstitution
protected DataManager
protected TablePresentation
protected EntityStates
protected FetchPlanRepository
protected List<PresentationsChangeListener>
protected Metadata
protected String
protected Set<TablePresentation>
protected Set<TablePresentation>
protected Map<Object,
TablePresentation> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new presentationvoid
addListener
(PresentationsChangeListener listener) Adds listenerprotected void
protected void
void
commit()
Commits all changes into the databasevoid
create()
protected void
fireCurrentPresentationChanged
(Object oldPresentationId) protected void
fireDefaultPresentationChanged
(Object oldPresentationId) protected void
getCaption
(Object id) Returns presentation caption by its idReturns the current active presentation ornull
if a current presentation didn't setReturns a default presentation ornull
if it didn't setReturns presentation by its id ornull
if a presentation doesn't existgetPresentationByName
(String name) Returns a presentation by its name with ignored case.Returns a collection of the component presentationsboolean
Returnstrue
if the selected presentation has anautoSave
settings else returnsfalse
boolean
Returnstrue
if the selected presentation is marked as global else returnsfalse
void
Modifies the selected presentationprotected void
void
Removes a presentation from the list of available presentationsvoid
removeListener
(PresentationsChangeListener listener) Removes listenervoid
Sets current active presentation for a componentvoid
Sets a default presentationvoid
setSettings
(TablePresentation p, String settings) Sets user settings for the selected presentation
-
Field Details
-
metadata
-
fetchPlanRepository
-
dataManager
-
currentUserSubstitution
-
entityStates
-
name
-
presentations
-
current
-
defaultPresentation
-
needToUpdate
-
needToRemove
-
listeners
-
-
Constructor Details
-
TablePresentationsImpl
-
-
Method Details
-
add
Description copied from interface:TablePresentations
Adds a new presentation- Specified by:
add
in interfaceTablePresentations
-
getCurrent
Description copied from interface:TablePresentations
Returns the current active presentation ornull
if a current presentation didn't set- Specified by:
getCurrent
in interfaceTablePresentations
-
setCurrent
Description copied from interface:TablePresentations
Sets current active presentation for a component- Specified by:
setCurrent
in interfaceTablePresentations
-
getSettingsString
- Specified by:
getSettingsString
in interfaceTablePresentations
- Parameters:
p
- presentation- Returns:
- user settings for the selected presentation or
null
if the presentation doesn't exist or if the presentation doesn't contain any settings
-
setSettings
Description copied from interface:TablePresentations
Sets user settings for the selected presentation- Specified by:
setSettings
in interfaceTablePresentations
- Parameters:
p
- presentationsettings
- user settings
-
getPresentation
Description copied from interface:TablePresentations
Returns presentation by its id ornull
if a presentation doesn't exist- Specified by:
getPresentation
in interfaceTablePresentations
-
getCaption
Description copied from interface:TablePresentations
Returns presentation caption by its id- Specified by:
getCaption
in interfaceTablePresentations
-
getPresentationIds
Description copied from interface:TablePresentations
Returns a collection of the component presentations- Specified by:
getPresentationIds
in interfaceTablePresentations
-
setDefault
Description copied from interface:TablePresentations
Sets a default presentation- Specified by:
setDefault
in interfaceTablePresentations
-
getDefault
Description copied from interface:TablePresentations
Returns a default presentation ornull
if it didn't set- Specified by:
getDefault
in interfaceTablePresentations
-
persistDefaultPresentation
-
remove
Description copied from interface:TablePresentations
Removes a presentation from the list of available presentations- Specified by:
remove
in interfaceTablePresentations
-
modify
Description copied from interface:TablePresentations
Modifies the selected presentation- Specified by:
modify
in interfaceTablePresentations
-
isAutoSave
Description copied from interface:TablePresentations
Returnstrue
if the selected presentation has anautoSave
settings else returnsfalse
- Specified by:
isAutoSave
in interfaceTablePresentations
-
isGlobal
Description copied from interface:TablePresentations
Returnstrue
if the selected presentation is marked as global else returnsfalse
- Specified by:
isGlobal
in interfaceTablePresentations
-
commit
public void commit()Description copied from interface:TablePresentations
Commits all changes into the database- Specified by:
commit
in interfaceTablePresentations
-
commited
-
addListener
Description copied from interface:TablePresentations
Adds listener- Specified by:
addListener
in interfaceTablePresentations
-
removeListener
Description copied from interface:TablePresentations
Removes listener- Specified by:
removeListener
in interfaceTablePresentations
-
getPresentationByName
Description copied from interface:TablePresentations
Returns a presentation by its name with ignored case. It returnsnull
if a presentation with such name doesn't exist- Specified by:
getPresentationByName
in interfaceTablePresentations
-
create
- Specified by:
create
in interfaceTablePresentations
- Returns:
- presentation instance or stub if corresponding add-on is not added to the project
-
fireCurrentPresentationChanged
-
firePresentationsSetChanged
protected void firePresentationsSetChanged() -
fireDefaultPresentationChanged
-
checkLoad
protected void checkLoad() -
clearCommitList
protected void clearCommitList()
-