Class DefaultPropertyEditorBean
- java.lang.Object
-
- de.hybris.platform.cockpit.model.meta.impl.DefaultPropertyEditorBean
-
- All Implemented Interfaces:
PropertyEditorBean
- Direct Known Subclasses:
DefaultZKPropertyEditorBean
public class DefaultPropertyEditorBean extends java.lang.Object implements PropertyEditorBean
Base class for property editor backing beans. Provides original and current value, modification check and connection to parent descriptor.
-
-
Constructor Summary
Constructors Constructor Description DefaultPropertyEditorBean(PropertyEditorDescriptor meta)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyEditorDescriptorgetDescriptor()The descriptor which this beans belong to.java.lang.ObjectgetValue()Returns the current value.java.util.List<java.lang.Object>getValues()voidinitialize(java.lang.Object value)Initializes the editor bean by specifying the start value.booleanisEditable()Tells whether the editor allows changes.booleanisInvalid()Tells whether this editor shows invalid state.booleanisModified()Tells whether this bean contains a modified value compared to the start value.voidreset()Resets the editor to the initial value.voidsetEditable(boolean editable)Switches editing on and off.voidsetInvalid(boolean invalid)Switches invalid state of this editor bean.voidsetValue(java.lang.Object value)Changes the current value.voidsetValues(java.util.List<java.lang.Object> values)protected voidupdateEditable(boolean newEditable)Called each time the editable flag has been changed.protected voidupdateInvalid(boolean newInvalid)Called each time the invalid flag has been changed.
-
-
-
Constructor Detail
-
DefaultPropertyEditorBean
public DefaultPropertyEditorBean(PropertyEditorDescriptor meta)
-
-
Method Detail
-
updateEditable
protected void updateEditable(boolean newEditable)
Called each time the editable flag has been changed. The component should be modified to block or allow user input.- Parameters:
newEditable- the new editable flag value
-
setEditable
public final void setEditable(boolean editable)
Description copied from interface:PropertyEditorBeanSwitches editing on and off. This will not change the modification state!- Specified by:
setEditablein interfacePropertyEditorBean- Parameters:
editable- true if the component should be allow changes
-
isEditable
public boolean isEditable()
Description copied from interface:PropertyEditorBeanTells whether the editor allows changes.- Specified by:
isEditablein interfacePropertyEditorBean
-
getDescriptor
public final PropertyEditorDescriptor getDescriptor()
Description copied from interface:PropertyEditorBeanThe descriptor which this beans belong to.- Specified by:
getDescriptorin interfacePropertyEditorBean
-
getValue
public java.lang.Object getValue()
Description copied from interface:PropertyEditorBeanReturns the current value.- Specified by:
getValuein interfacePropertyEditorBean
-
getValues
public java.util.List<java.lang.Object> getValues()
-
setValues
public void setValues(java.util.List<java.lang.Object> values)
-
initialize
public void initialize(java.lang.Object value)
Description copied from interface:PropertyEditorBeanInitializes the editor bean by specifying the start value. This will reset all previous changes. Therefore the editor bean wont be modified any longer!- Specified by:
initializein interfacePropertyEditorBean- Parameters:
value- the start value
-
reset
public void reset()
Description copied from interface:PropertyEditorBeanResets the editor to the initial value. Also clears invalid flag. Editable flag remains untouched!- Specified by:
resetin interfacePropertyEditorBean
-
isModified
public boolean isModified()
Description copied from interface:PropertyEditorBeanTells whether this bean contains a modified value compared to the start value.- Specified by:
isModifiedin interfacePropertyEditorBean- See Also:
PropertyEditorBean.initialize(Object),PropertyEditorBean.setValue(Object)
-
setValue
public void setValue(java.lang.Object value)
Description copied from interface:PropertyEditorBeanChanges the current value. If the value is different from the start value the bean is marked modified.- Specified by:
setValuein interfacePropertyEditorBean
-
isInvalid
public boolean isInvalid()
Description copied from interface:PropertyEditorBeanTells whether this editor shows invalid state.- Specified by:
isInvalidin interfacePropertyEditorBean
-
updateInvalid
protected void updateInvalid(boolean newInvalid)
Called each time the invalid flag has been changed. The component may signal this fact accordingly.- Parameters:
newInvalid- the new invalid flag value
-
setInvalid
public void setInvalid(boolean invalid)
Description copied from interface:PropertyEditorBeanSwitches invalid state of this editor bean.- Specified by:
setInvalidin interfacePropertyEditorBean- Parameters:
invalid- true if the editor should show invalid state
-
-