Package it.tidalwave.role.ui
Interface Presentable
-
- All Known Implementing Classes:
SimpleCompositePresentable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Presentable
The role of an object that can be presented on a UI, thus is capable of creating aPresentationModel
.- Author:
- Fabrizio Giudici
- Stereotype:
- Role
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class<Presentable>
_Presentable_
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PresentationModel
createPresentationModel()
Creates aPresentationModel
.default PresentationModel
createPresentationModel(java.lang.Object instanceRole)
Creates aPresentationModel
with a single role.PresentationModel
createPresentationModel(java.util.Collection<java.lang.Object> instanceRoles)
Creates aPresentationModel
with some roles.static Presentable
of(java.lang.Object owner)
Creates a defaultPresentable
for the given object.
-
-
-
Field Detail
-
_Presentable_
static final java.lang.Class<Presentable> _Presentable_
-
-
Method Detail
-
createPresentationModel
default PresentationModel createPresentationModel()
Creates aPresentationModel
.- Returns:
- the
PresentationModel
- Since:
- 3.2-ALPHA-3 (refactored)
-
createPresentationModel
@Nonnull PresentationModel createPresentationModel(@Nonnull java.util.Collection<java.lang.Object> instanceRoles)
Creates aPresentationModel
with some roles.- Parameters:
instanceRoles
- the roles- Returns:
- the
PresentationModel
- Since:
- 3.2-ALPHA-3 (refactored)
-
createPresentationModel
@Nonnull default PresentationModel createPresentationModel(@Nonnull java.lang.Object instanceRole)
Creates aPresentationModel
with a single role.- Parameters:
instanceRole
- the role- Returns:
- the
PresentationModel
- Since:
- 3.2-ALPHA-3
-
of
@Nonnull static Presentable of(@Nonnull java.lang.Object owner)
Creates a defaultPresentable
for the given object.- Parameters:
owner
- the object- Returns:
- the new instance
- Since:
- 3.2-ALPHA-2
-
-