Package de.uplanet.lucy.server.binding
Interface IBinding
-
public interface IBinding
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IBinding
asContextualBinding(Object p_contextObject)
Creates a binding object, that can used in a special context.boolean
canValueBindEarly(IBindingKey p_binding)
boolean
canValueBindLate(IBindingKey p_binding)
IBindingProcessor
getBindingProcessor()
IBindingContext
getCtx()
IIxValue
getValue(IBindingKey p_binding)
IIxValue
getValue(String p_strBinding)
boolean
hasValue(IBindingKey p_binding)
Checks if an value can resolved by the given binding and the value is not empty.boolean
hasValue(String p_strBinding)
Checks if an value can resolved by the given binding and the value is not empty.boolean
isValueAvailable(IBindingKey p_binding)
/** Checks if an value can resolved by the given binding.boolean
isValueAvailable(String p_strBinding)
Checks if an value can resolved by the given binding.Optional<IIxValue>
removeValue(IBindingKey p_binding)
Removes a value for the given binding.Optional<IIxValue>
removeValue(String p_strBinding)
Removes a value for the given binding.Optional<IIxValue>
setValue(IBindingKey p_binding, IIxValue p_value)
Adds or changed a value for the given binding.Optional<IIxValue>
setValue(String p_strBinding, IIxValue p_value)
Adds or changed a value for the given binding.
-
-
-
Method Detail
-
getBindingProcessor
IBindingProcessor getBindingProcessor()
- Returns:
- Returns the binding processor.
-
getCtx
IBindingContext getCtx()
- Returns:
- Returns the binding context.
-
getValue
IIxValue getValue(IBindingKey p_binding)
- Parameters:
p_binding
- The binding- Returns:
- Returns the value for the binding. If no value set for the binding an empty value will returned.
-
getValue
IIxValue getValue(String p_strBinding)
- Parameters:
p_strBinding
- The binding string- Returns:
- Returns the value for the binding. If no value set for the binding an empty value will returned.
- Throws:
de.uplanet.lucy.binding.InvalidBindingRuntimeException
- if the binding string has an invalid format.
-
isValueAvailable
boolean isValueAvailable(IBindingKey p_binding)
/** Checks if an value can resolved by the given binding. The value returned by thegetValue(IBindingKey)
could be empty (IIxValue.hasValue()
== false).- Parameters:
p_binding
- The binding to check (notnull
)- Returns:
- Returns
true
if a value for the given binding is available otherwisefalse
will returned.
-
isValueAvailable
boolean isValueAvailable(String p_strBinding)
Checks if an value can resolved by the given binding. The value returned by thegetValue(String)
could be empty (IIxValue.hasValue()
== false).- Parameters:
p_strBinding
- The binding to check (notnull
)- Returns:
- Returns
true
if a value for the given binding is available otherwisefalse
will returned.
-
hasValue
boolean hasValue(String p_strBinding)
Checks if an value can resolved by the given binding and the value is not empty. The value returned by thegetValue(String)
is not empty (IIxValue.hasValue()
== true).- Parameters:
p_strBinding
- The binding to check (notnull
)- Returns:
- Returns
true
if a value for the given binding is available otherwisefalse
will returned. - Throws:
de.uplanet.lucy.binding.InvalidBindingRuntimeException
- if the binding string has an invalid format.
-
hasValue
boolean hasValue(IBindingKey p_binding)
Checks if an value can resolved by the given binding and the value is not empty. The value returned by thegetValue(String)
is not empty (IIxValue.hasValue()
== true).- Parameters:
p_binding
- The binding to check (notnull
)- Returns:
- Returns
true
if a value for the given binding is available otherwisefalse
will returned. - Throws:
de.uplanet.lucy.binding.InvalidBindingRuntimeException
- if the binding string has an invalid format.
-
setValue
Optional<IIxValue> setValue(IBindingKey p_binding, IIxValue p_value)
Adds or changed a value for the given binding. On a read only binding type a exception will be thrown on trying to change a value.- Parameters:
p_binding
- The binding (notnull
)p_value
- The physical value, that would be set/changed for the binding.- Returns:
- Returns the old physical value or
null
if no physical value was set. - Throws:
RuntimeException
- if binding is not writable.
-
setValue
Optional<IIxValue> setValue(String p_strBinding, IIxValue p_value)
Adds or changed a value for the given binding. On a read only binding type a exception will be thrown on trying to change a value.- Parameters:
p_strBinding
- The binding (notnull
)p_value
- The physical value, that would be set/changed for the binding.- Returns:
- Returns the optional old physical value.
- Throws:
de.uplanet.lucy.binding.InvalidBindingRuntimeException
- if the binding string has an invalid format.RuntimeException
- if binding is not writable.
-
removeValue
Optional<IIxValue> removeValue(IBindingKey p_binding)
Removes a value for the given binding. On a read only binding type a exception will be thrown on trying to delete a existing value.- Parameters:
p_binding
- The binding (notnull
)- Returns:
- Returns the optional old physical value.
- Throws:
RuntimeException
- if binding is not writable.
-
removeValue
Optional<IIxValue> removeValue(String p_strBinding)
Removes a value for the given binding. On a read only binding type a exception will be thrown on trying to delete a existing value.- Parameters:
p_strBinding
- The binding string (notnull
)- Returns:
- Returns the optional old physical value.
- Throws:
de.uplanet.lucy.binding.InvalidBindingRuntimeException
- if the binding string has an invalid format.RuntimeException
- if binding is not writable.
-
canValueBindEarly
boolean canValueBindEarly(IBindingKey p_binding)
- Parameters:
p_binding
- The binding to check (notnull
)- Returns:
- Returns
true
if the given binding can be used for early binding otherwisefalse
.
-
canValueBindLate
boolean canValueBindLate(IBindingKey p_binding)
- Parameters:
p_binding
- The binding to check (notnull
)- Returns:
- Returns
true
if the given binding can be used for a late binding otherwisefalse
.
-
-