Interface OptionFactory
- All Superinterfaces:
Factory<Option,
,Object> LabelFactory<Option>
Interface for factories providing option creation functionalities.
Although, this interface provides members with rather generic parameters,
specific factories may only produce output with respect to specific types
of objects. Otherwise, a FactoryException
will be thrown.
- Since:
- 4.0.17
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new option from the given object, which usually is the value.getOptionModel
(SpecialistsBroker broker, Language language, boolean release) Return a model on options, based upon information provided by the given specialists broker.getPersistence
(Option option) Returns the persistence key for given option.
-
Method Details
-
create
Create a new option from the given object, which usually is the value.- Specified by:
create
in interfaceFactory<Option,
Object> - Specified by:
create
in interfaceLabelFactory<Option>
- Parameters:
object
- The object to create an option from.- Returns:
- The option instance or null, if object is null.
- Throws:
de.espirit.common.util.FactoryException
- If the object could not be used as option source.- Since:
- 4.0.17
-
getPersistence
Returns the persistence key for given option.- Parameters:
option
- the option to get the persistence key for- Since:
- 5.0.313
-
getOptionModel
Return a model on options, based upon information provided by the given specialists broker. If the given language is not known to the factory, the model has to provide all options available.- Parameters:
broker
- The broker providing needed access information.language
- The language to get the model for.release
- Indicates to get the model for release.- Returns:
- A model on options.
- Throws:
de.espirit.common.util.FactoryException
- If the given service could not be used as option model source.- Since:
- 4.2.400
-