Class PortablePreferenceMockPortableGeneratedImpl
- java.lang.Object
-
- org.uberfire.preferences.shared.bean.mock.PortablePreferenceMock
-
- org.uberfire.preferences.shared.bean.mock.PortablePreferenceMockPortableGeneratedImpl
-
- All Implemented Interfaces:
BasePreference<PortablePreferenceMock>,BasePreferencePortable<PortablePreferenceMock>,Preference
@Portable(mapSuperTypes=true) public class PortablePreferenceMockPortableGeneratedImpl extends PortablePreferenceMock implements BasePreferencePortable<PortablePreferenceMock>
Created to be used in tests, and to avoid Errai errors due to unimplemented interfaces used in portable classes.
-
-
Constructor Summary
Constructors Constructor Description PortablePreferenceMockPortableGeneratedImpl()PortablePreferenceMockPortableGeneratedImpl(String property)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbundleKey()Returns the bundle key registered in theWorkbenchPreferenceannotation.booleanequals(Object o)Objectget(String property)Returns a property value by its name.Class<PortablePreferenceMock>getPojoClass()Returns the preference bean class.Map<String,PropertyFormType>getPropertiesTypes()Returns the form types of all simple (non-preference) properties by their field name.Map<String,List<PropertyValidator>>getPropertiesValidators()inthashCode()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.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.uberfire.preferences.shared.bean.BasePreference
defaultValue, load, load, load, load, load, load, save, save, save, save, save, save, save, save, save
-
Methods inherited from interface org.uberfire.preferences.shared.bean.BasePreferencePortable
getPropertyType, getPropertyValidators
-
-
-
-
Constructor Detail
-
PortablePreferenceMockPortableGeneratedImpl
public PortablePreferenceMockPortableGeneratedImpl()
-
PortablePreferenceMockPortableGeneratedImpl
public PortablePreferenceMockPortableGeneratedImpl(String property)
-
-
Method Detail
-
getPojoClass
public Class<PortablePreferenceMock> getPojoClass()
Description copied from interface:BasePreferencePortableReturns the preference bean class.- Specified by:
getPojoClassin interfaceBasePreferencePortable<PortablePreferenceMock>- Returns:
- The preference bean class.
-
identifier
public String identifier()
Description copied from interface:BasePreferencePortableUnique identifier, used by this preference children to determine their parents. Also used to name the file containing its value.- Specified by:
identifierin interfaceBasePreferencePortable<PortablePreferenceMock>- Returns:
- A unique identifier for the preference bean.
-
parents
public String[] parents()
Description copied from interface:BasePreferencePortableThe preferences which will have this preference as their child. All parents will share the same preference value.- Specified by:
parentsin interfaceBasePreferencePortable<PortablePreferenceMock>- Returns:
- The parents of this preference. Empty if there is not one.
-
bundleKey
public String bundleKey()
Description copied from interface:BasePreferencePortableReturns the bundle key registered in theWorkbenchPreferenceannotation.- Specified by:
bundleKeyin interfaceBasePreferencePortable<PortablePreferenceMock>- Returns:
- The preference bundle key.
-
set
public void set(String property, Object value)
Description copied from interface:BasePreferencePortableSets a property value by its name.- Specified by:
setin interfaceBasePreferencePortable<PortablePreferenceMock>- Parameters:
property- Name of the property field to be set.value- New value for the property.
-
get
public Object get(String property)
Description copied from interface:BasePreferencePortableReturns a property value by its name.- Specified by:
getin interfaceBasePreferencePortable<PortablePreferenceMock>- Parameters:
property- Name of the property field to be fetched.- Returns:
- The property value.
-
getPropertiesTypes
public Map<String,PropertyFormType> getPropertiesTypes()
Description copied from interface:BasePreferencePortableReturns the form types of all simple (non-preference) properties by their field name.- Specified by:
getPropertiesTypesin interfaceBasePreferencePortable<PortablePreferenceMock>- Returns:
- The properties form types by their field names.
-
getPropertiesValidators
public Map<String,List<PropertyValidator>> getPropertiesValidators()
- Specified by:
getPropertiesValidatorsin interfaceBasePreferencePortable<PortablePreferenceMock>
-
isPersistable
public boolean isPersistable()
Description copied from interface:BasePreferencePortableA preference is persistable when it has at least one non-shared property.- Specified by:
isPersistablein interfaceBasePreferencePortable<PortablePreferenceMock>- Returns:
- true if it is persistable and false otherwise.
-
-