Package de.businesscode.bcdui.binding
Class Bindings
java.lang.Object
de.businesscode.bcdui.binding.Bindings
A singleton container class for all the bindings defined in the application. These
bindings are defined in static XML files under "/WEB-INF/bcdui/bindings" and read
as soon as the first access to the getInstance method occurs. In non-debug mode
the bindings are cached so that the files are read only once.
Don't use de.businesscode.bcdui.toolbox.Configuration instance here to avoid cyclic dependencies (Configuration itself uses Bindings to get parameters from database, etc), Instead use the static BareConfiguration.getInstance() to read static configuration
bindings are defined in static XML files under "/WEB-INF/bcdui/bindings" and read
as soon as the first access to the getInstance method occurs. In non-debug mode
the bindings are cached so that the files are read only once.
Don't use de.businesscode.bcdui.toolbox.Configuration instance here to avoid cyclic dependencies (Configuration itself uses Bindings to get parameters from database, etc), Instead use the static BareConfiguration.getInstance() to read static configuration
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
protected static Bindings
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected static final int
protected static final int
static final String
protected Map<String,
Collection<StandardBindingSet>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
clears the bindings so that getInstance() would return a new instance, reading BindingSets freshDeprecated.This getter is deprecated because it prevents the BindingSetGroup feature from being totally transparent to the user.get
(String bindingSetId, Collection<String> items) EnterpriseEdition allows us to search for a "best-match" BindingSet here, which allows for deep optimizations at runtimeprotected Collection<StandardBindingSet>
getBindingSetUnchecked
(String bindingSetId) Allows overwriting if there are multiple sources for BindingSetsstatic Bindings
to use the method - Bindings must be first loaded by calling getInstance(String directory) or getInstance(HttpServletRequest request).getWrqModifiers
(String bindingSetId) Potential extension pointboolean
hasBindingSet
(String bindingSetId) tells silently if one or more BindingSet exists, this method can be used for classes which feature availability depends on a Binding.protected void
/* EnterpriseEdition has a more powerful BindingSet readerstatic boolean
a special method for internal usage to resolve cyclic dependencies, if your class is using Bindings (i.e. to write to database) and the Binding itself directly or transitively depends on your class.void
Optional extension pointprotected Map<String,
Collection<StandardBindingSet>> readBindings
(Class<? extends ReadBindingSet> rbs) Start of folder recursionvoid
Optional extension point
-
Field Details
-
MAX_PARALLEL_THREADS
protected static final int MAX_PARALLEL_THREADS- See Also:
-
MAX_WAIT_MINS
protected static final int MAX_WAIT_MINS- See Also:
-
bindings
-
warBindingMap
-
escapeXmlAttributeName
- See Also:
-
keyAttributeName
- See Also:
-
jdbcDataTypeCodeAttribute
- See Also:
-
jdbcDataTypeNameAttribute
- See Also:
-
jdbcColumnDisplaySizeAttribute
- See Also:
-
jdbcColumnScaleAttribute
- See Also:
-
jdbcSignedAttribute
- See Also:
-
jdbcNullableAttribute
- See Also:
-
readOnlyAttributeName
- See Also:
-
aggrAttribute
- See Also:
-
-
Constructor Details
-
Bindings
Bindings- Throws:
BindingException
-
-
Method Details
-
isInitialized
public static boolean isInitialized()a special method for internal usage to resolve cyclic dependencies, if your class is using Bindings (i.e. to write to database) and the Binding itself directly or transitively depends on your class. If this method returns FALSE, then callinggetInstance()
will end-up in a dead-lock in case your class is also used during Binding initialization process.- Returns:
-
initWarMap
/* EnterpriseEdition has a more powerful BindingSet reader- Throws:
BindingException
-
getInstance
to use the method - Bindings must be first loaded by calling getInstance(String directory) or getInstance(HttpServletRequest request). Method getInstance- Returns:
- Throws:
BindingException
-
readBindings
protected Map<String,Collection<StandardBindingSet>> readBindings(Class<? extends ReadBindingSet> rbs) throws BindingException Start of folder recursion- Parameters:
rbs
-- Returns:
- Throws:
BindingException
-
getBindingSetUnchecked
Allows overwriting if there are multiple sources for BindingSets- Parameters:
bindingSetId
-- Returns:
-
get
Deprecated.This getter is deprecated because it prevents the BindingSetGroup feature from being totally transparent to the user.Fetches the specified BindingSet. This method does not work with BindingSetGroups therefore it should not be used anymore.- Parameters:
bindingSetId
- The id of the BindingSet to be returned.- Returns:
- The BindingSet registered under the id.
- Throws:
BindingException
-
hasBindingSet
tells silently if one or more BindingSet exists, this method can be used for classes which feature availability depends on a Binding.- Parameters:
bindingSetId
-- Returns:
- true if at least one binding-set exists which such name, false otherwise.
-
get
public StandardBindingSet get(String bindingSetId, Collection<String> items) throws BindingException EnterpriseEdition allows us to search for a "best-match" BindingSet here, which allows for deep optimizations at runtime- Parameters:
bindingSetId
-items
-- Returns:
- Throws:
BindingException
-
clear
public static void clear()clears the bindings so that getInstance() would return a new instance, reading BindingSets fresh -
getWrqModifiers
Potential extension point- Throws:
BindingException
-
readDependentBindings
Optional extension point- Throws:
BindingException
-
readAdditionalBindings
Optional extension point- Throws:
BindingException
-