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 PropertyEditorDescriptor
getDescriptor()
The descriptor which this beans belong to.java.lang.Object
getValue()
Returns the current value.java.util.List<java.lang.Object>
getValues()
void
initialize(java.lang.Object value)
Initializes the editor bean by specifying the start value.boolean
isEditable()
Tells whether the editor allows changes.boolean
isInvalid()
Tells whether this editor shows invalid state.boolean
isModified()
Tells whether this bean contains a modified value compared to the start value.void
reset()
Resets the editor to the initial value.void
setEditable(boolean editable)
Switches editing on and off.void
setInvalid(boolean invalid)
Switches invalid state of this editor bean.void
setValue(java.lang.Object value)
Changes the current value.void
setValues(java.util.List<java.lang.Object> values)
protected void
updateEditable(boolean newEditable)
Called each time the editable flag has been changed.protected void
updateInvalid(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:PropertyEditorBean
Switches editing on and off. This will not change the modification state!- Specified by:
setEditable
in interfacePropertyEditorBean
- Parameters:
editable
- true if the component should be allow changes
-
isEditable
public boolean isEditable()
Description copied from interface:PropertyEditorBean
Tells whether the editor allows changes.- Specified by:
isEditable
in interfacePropertyEditorBean
-
getDescriptor
public final PropertyEditorDescriptor getDescriptor()
Description copied from interface:PropertyEditorBean
The descriptor which this beans belong to.- Specified by:
getDescriptor
in interfacePropertyEditorBean
-
getValue
public java.lang.Object getValue()
Description copied from interface:PropertyEditorBean
Returns the current value.- Specified by:
getValue
in 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:PropertyEditorBean
Initializes 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:
initialize
in interfacePropertyEditorBean
- Parameters:
value
- the start value
-
reset
public void reset()
Description copied from interface:PropertyEditorBean
Resets the editor to the initial value. Also clears invalid flag. Editable flag remains untouched!- Specified by:
reset
in interfacePropertyEditorBean
-
isModified
public boolean isModified()
Description copied from interface:PropertyEditorBean
Tells whether this bean contains a modified value compared to the start value.- Specified by:
isModified
in interfacePropertyEditorBean
- See Also:
PropertyEditorBean.initialize(Object)
,PropertyEditorBean.setValue(Object)
-
setValue
public void setValue(java.lang.Object value)
Description copied from interface:PropertyEditorBean
Changes the current value. If the value is different from the start value the bean is marked modified.- Specified by:
setValue
in interfacePropertyEditorBean
-
isInvalid
public boolean isInvalid()
Description copied from interface:PropertyEditorBean
Tells whether this editor shows invalid state.- Specified by:
isInvalid
in 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:PropertyEditorBean
Switches invalid state of this editor bean.- Specified by:
setInvalid
in interfacePropertyEditorBean
- Parameters:
invalid
- true if the editor should show invalid state
-
-