Class DefaultDisplayServiceImpl
java.lang.Object
ch.tocco.nice2.persist.entity.impl.defaultdisplay.DefaultDisplayServiceImpl
- All Implemented Interfaces:
DefaultDisplayService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluateDefaultDisplay(Entity entity) evaluateDisplay(Entity entity, DefaultDisplay.Options baseOptions, DefaultDisplay.Options... fallbackOptions) evaluate display for the first available option from the provided options.evaluateDisplay(Entity entity, String... types) evaluate display for the first available type from the provided types.evaluateDisplayForOption(Entity entity, DefaultDisplay.Options option) evaluates the display for the given optionsgetDefaultDisplay(EntityModel model) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DefaultDisplayService
evaluateDefaultDisplay
-
Constructor Details
-
DefaultDisplayServiceImpl
public DefaultDisplayServiceImpl()
-
-
Method Details
-
evaluateDefaultDisplay
- Specified by:
evaluateDefaultDisplayin interfaceDefaultDisplayService
-
evaluateDisplay
Description copied from interface:DefaultDisplayServiceevaluate display for the first available type from the provided types. If none of the types are available for the provided entity, the default display is evaluated.- Specified by:
evaluateDisplayin interfaceDefaultDisplayService- Parameters:
entity- the entity to evaluate the display fortypes- the list of types to try- Returns:
- the evaluated display
-
evaluateDisplay
public String evaluateDisplay(Entity entity, DefaultDisplay.Options baseOptions, DefaultDisplay.Options... fallbackOptions) Description copied from interface:DefaultDisplayServiceevaluate display for the first available option from the provided options. If none of the options match a display, the default display is evaluated withbaseOptions.- Specified by:
evaluateDisplayin interfaceDefaultDisplayService- Parameters:
entity- the entity to evaluate the display forbaseOptions- the options to try first and to use for the default display if no type is providedfallbackOptions- the options to try ifbaseOptionsdid not provide a display- Returns:
- the evaluated display
-
evaluateDisplayForOption
Description copied from interface:DefaultDisplayServiceevaluates the display for the given options- Specified by:
evaluateDisplayForOptionin interfaceDefaultDisplayService- Parameters:
entity- the entity to evaluate the display foroption- the options used to find and evaluate the display- Returns:
- the evaluated display or null if none could be found for type in options
-
getDefaultDisplay
- Specified by:
getDefaultDisplayin interfaceDefaultDisplayService
-