Package org.zkoss.bind.impl
Class BindContextImpl
- java.lang.Object
-
- org.zkoss.bind.impl.BindContextImpl
-
- All Implemented Interfaces:
java.io.Serializable,BindContext
public class BindContextImpl extends java.lang.Object implements BindContext, java.io.Serializable
Implementation ofBindContext.- Since:
- 6.0.0
- Author:
- henrichen
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBINDING_ARGSstatic java.lang.StringCOMMAND_ARGSstatic java.lang.StringCONVERTER_ARGSstatic java.lang.StringVALIDATOR_ARGS
-
Constructor Summary
Constructors Constructor Description BindContextImpl(Binder binder, Binding binding, boolean save, java.lang.String command, org.zkoss.zk.ui.Component comp, org.zkoss.zk.ui.event.Event event)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAttribute(java.lang.Object key)Returns value of the given key in this Bind Context.java.util.Map<java.lang.Object,java.lang.Object>getAttributes()Returns a copy of all attributes in this Bind context.BindergetBinder()Returns associated Binder of this Bind context.BindinggetBinding()Returns associated Binding of this Bind context.java.lang.ObjectgetBindingArg(java.lang.String key)Returns binding arg value of the given key in this Bind Context.java.util.Map<java.lang.String,java.lang.Object>getBindingArgs()java.lang.ObjectgetCommandArg(java.lang.String key)Returns command arg value of the given key in this Bind Context.java.util.Map<java.lang.String,java.lang.Object>getCommandArgs()java.lang.StringgetCommandName()Returns associated command name of this Bind Context; null if not involved.org.zkoss.zk.ui.ComponentgetComponent()Returns the associated component context.java.lang.ObjectgetConverterArg(java.lang.String key)Returns converter arg value of the given key in this Bind Context.java.util.Map<java.lang.String,java.lang.Object>getConverterArgs()org.zkoss.zk.ui.event.EventgetTriggerEvent()Returns associated event that trigger the associated command; null if not involved.java.lang.ObjectgetValidatorArg(java.lang.String key)Returns validator arg value of the given key in this Bind Context.java.util.Map<java.lang.String,java.lang.Object>getValidatorArgs()booleanisSave()Returns whether currently is doing save operation.java.lang.ObjectsetAttribute(java.lang.Object key, java.lang.Object value)Sets given value to the given key in this Bind context.
-
-
-
Field Detail
-
COMMAND_ARGS
public static final java.lang.String COMMAND_ARGS
- See Also:
- Constant Field Values
-
BINDING_ARGS
public static final java.lang.String BINDING_ARGS
- See Also:
- Constant Field Values
-
VALIDATOR_ARGS
public static final java.lang.String VALIDATOR_ARGS
- See Also:
- Constant Field Values
-
CONVERTER_ARGS
public static final java.lang.String CONVERTER_ARGS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBinder
public Binder getBinder()
Description copied from interface:BindContextReturns associated Binder of this Bind context.- Specified by:
getBinderin interfaceBindContext- Returns:
- associated Binder of this Bind context.
-
getBinding
public Binding getBinding()
Description copied from interface:BindContextReturns associated Binding of this Bind context.- Specified by:
getBindingin interfaceBindContext- Returns:
- associated Binding of this Bind context.
-
getAttribute
public java.lang.Object getAttribute(java.lang.Object key)
Description copied from interface:BindContextReturns value of the given key in this Bind Context.- Specified by:
getAttributein interfaceBindContext- Parameters:
key- the key to the value.- Returns:
- value of the given key in this Bind Context.
-
setAttribute
public java.lang.Object setAttribute(java.lang.Object key, java.lang.Object value)Description copied from interface:BindContextSets given value to the given key in this Bind context.- Specified by:
setAttributein interfaceBindContext- Parameters:
key- the key to the valuevalue- the value- Returns:
- previous value that associated with the given key.
-
getAttributes
public java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
Description copied from interface:BindContextReturns a copy of all attributes in this Bind context.- Specified by:
getAttributesin interfaceBindContext- Returns:
- a copy of all attributes in this Bind context.
-
getCommandArg
public java.lang.Object getCommandArg(java.lang.String key)
Description copied from interface:BindContextReturns command arg value of the given key in this Bind Context.- Specified by:
getCommandArgin interfaceBindContext- Parameters:
key- the key to the value.- Returns:
- value of command arg of the given key in this Bind Context.
-
getBindingArg
public java.lang.Object getBindingArg(java.lang.String key)
Description copied from interface:BindContextReturns binding arg value of the given key in this Bind Context.- Specified by:
getBindingArgin interfaceBindContext- Parameters:
key- the key to the value.- Returns:
- value of binding arg of the given key in this Bind Context.
-
getConverterArg
public java.lang.Object getConverterArg(java.lang.String key)
Description copied from interface:BindContextReturns converter arg value of the given key in this Bind Context.- Specified by:
getConverterArgin interfaceBindContext- Parameters:
key- the key to the value.- Returns:
- value of converter arg of the given key in this Bind Context.
-
getValidatorArg
public java.lang.Object getValidatorArg(java.lang.String key)
Description copied from interface:BindContextReturns validator arg value of the given key in this Bind Context.- Specified by:
getValidatorArgin interfaceBindContext- Parameters:
key- the key to the value.- Returns:
- value of validator arg of the given key in this Bind Context.
-
getCommandArgs
public java.util.Map<java.lang.String,java.lang.Object> getCommandArgs()
-
getBindingArgs
public java.util.Map<java.lang.String,java.lang.Object> getBindingArgs()
-
getConverterArgs
public java.util.Map<java.lang.String,java.lang.Object> getConverterArgs()
-
getValidatorArgs
public java.util.Map<java.lang.String,java.lang.Object> getValidatorArgs()
-
isSave
public boolean isSave()
Description copied from interface:BindContextReturns whether currently is doing save operation.- Specified by:
isSavein interfaceBindContext- Returns:
- whether currently is doing save operation.
-
getCommandName
public java.lang.String getCommandName()
Description copied from interface:BindContextReturns associated command name of this Bind Context; null if not involved.- Specified by:
getCommandNamein interfaceBindContext- Returns:
- associated command name of this Bind Context; null if not involved.
-
getComponent
public org.zkoss.zk.ui.Component getComponent()
Description copied from interface:BindContextReturns the associated component context.- Specified by:
getComponentin interfaceBindContext- Returns:
- the associated component context.
-
getTriggerEvent
public org.zkoss.zk.ui.event.Event getTriggerEvent()
Description copied from interface:BindContextReturns associated event that trigger the associated command; null if not involved.- Specified by:
getTriggerEventin interfaceBindContext- Returns:
- associated event that trigger the associated command; null if not involved.
-
-