Interface BasePreferencePortable<T>
-
- Type Parameters:
T- The preference bean type implementing the interface.
- All Superinterfaces:
BasePreference<T>,Preference
- All Known Implementing Classes:
PortablePreferenceMockPortableGeneratedImpl
public interface BasePreferencePortable<T> extends BasePreference<T>
Represents a generated portable implementation of a preference bean.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringbundleKey()Returns the bundle key registered in theWorkbenchPreferenceannotation.Objectget(String property)Returns a property value by its name.Class<T>getPojoClass()Returns the preference bean class.Map<String,PropertyFormType>getPropertiesTypes()Returns the form types of all simple (non-preference) properties by their field name.default Map<String,List<PropertyValidator>>getPropertiesValidators()default PropertyFormTypegetPropertyType(String propertyName)Returns the form type of a specific simple (non-preference) property by its field name.default List<PropertyValidator>getPropertyValidators(String propertyName)Stringidentifier()Unique identifier, used by this preference children to determine their parents.booleanisPersistable()A preference is persistable when it has at least one non-shared property.String[]parents()The preferences which will have this preference as their child.voidset(String property, Object value)Sets a property value by its name.
-
-
-
Method Detail
-
getPojoClass
Class<T> getPojoClass()
Returns the preference bean class.- Returns:
- The preference bean class.
-
identifier
String identifier()
Unique identifier, used by this preference children to determine their parents. Also used to name the file containing its value.- Returns:
- A unique identifier for the preference bean.
-
parents
String[] parents()
The preferences which will have this preference as their child. All parents will share the same preference value.- Returns:
- The parents of this preference. Empty if there is not one.
-
bundleKey
String bundleKey()
Returns the bundle key registered in theWorkbenchPreferenceannotation.- Returns:
- The preference bundle key.
-
set
void set(String property, Object value)
Sets a property value by its name.- Parameters:
property- Name of the property field to be set.value- New value for the property.
-
get
Object get(String property)
Returns a property value by its name.- Parameters:
property- Name of the property field to be fetched.- Returns:
- The property value.
-
getPropertiesTypes
Map<String,PropertyFormType> getPropertiesTypes()
Returns the form types of all simple (non-preference) properties by their field name.- Returns:
- The properties form types by their field names.
-
getPropertiesValidators
default Map<String,List<PropertyValidator>> getPropertiesValidators()
-
getPropertyType
default PropertyFormType getPropertyType(String propertyName)
Returns the form type of a specific simple (non-preference) property by its field name.- Parameters:
propertyName- The property field name.- Returns:
- The property form type.
-
getPropertyValidators
default List<PropertyValidator> getPropertyValidators(String propertyName)
-
isPersistable
boolean isPersistable()
A preference is persistable when it has at least one non-shared property.- Returns:
- true if it is persistable and false otherwise.
-
-