Package org.apache.pivot.beans
Class NamespaceBinding
- java.lang.Object
-
- org.apache.pivot.beans.NamespaceBinding
-
public class NamespaceBinding extends java.lang.Object
Represents a binding relationship between a source property and a target property within a namespace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
NamespaceBinding.BindMapping
Namespace bind mapping interface.
-
Constructor Summary
Constructors Constructor Description NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath)
NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath, NamespaceBinding.BindMapping bindMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind()
Binds the source property to the target property.boolean
equals(java.lang.Object o)
NamespaceBinding.BindMapping
getBindMapping()
Returns the bind mapping.Map<java.lang.String,java.lang.Object>
getNamespace()
java.lang.Object
getSource()
java.lang.String
getSourceKey()
java.lang.String
getSourcePath()
java.lang.Object
getTarget()
java.lang.String
getTargetKey()
java.lang.String
getTargetPath()
java.lang.Object
getTransformedSourceValue()
Returns the current source value with any bind mapping applied.int
hashCode()
void
unbind()
Unbinds the source property from the target property.
-
-
-
Constructor Detail
-
NamespaceBinding
public NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath)
-
NamespaceBinding
public NamespaceBinding(Map<java.lang.String,java.lang.Object> namespace, java.lang.String sourcePath, java.lang.String targetPath, NamespaceBinding.BindMapping bindMapping)
-
-
Method Detail
-
getNamespace
public Map<java.lang.String,java.lang.Object> getNamespace()
- Returns:
- The namespace.
-
getSourcePath
public java.lang.String getSourcePath()
- Returns:
- The path to the source property.
-
getSource
public java.lang.Object getSource()
- Returns:
- The source object.
-
getSourceKey
public java.lang.String getSourceKey()
- Returns:
- The name of the source property.
-
getTargetPath
public java.lang.String getTargetPath()
- Returns:
- The path to the target property.
-
getTarget
public java.lang.Object getTarget()
- Returns:
- The target object.
-
getTargetKey
public java.lang.String getTargetKey()
- Returns:
- The name of the target property.
-
getBindMapping
public NamespaceBinding.BindMapping getBindMapping()
Returns the bind mapping.- Returns:
- The bind mapping to use during binding, or
null
if no bind mapping is specified.
-
getTransformedSourceValue
public java.lang.Object getTransformedSourceValue()
Returns the current source value with any bind mapping applied.- Returns:
- The source value transformed by the bind mapping (if any), or if none, the source value itself.
-
bind
public void bind()
Binds the source property to the target property. That is, add the already set listeners to the source object's listener lists.
-
unbind
public void unbind()
Unbinds the source property from the target property. That is, remove the listeners from the source object's listener lists.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-