Package de.businesscode.bcdui.binding
Interface BindingSet
-
- All Superinterfaces:
java.lang.Cloneable
,java.io.Serializable
- All Known Subinterfaces:
WrqBindingSet
- All Known Implementing Classes:
StandardBindingSet
,WrqBindingSetFromDerivedTable
,WrqBindingSetFromTableReference
,WrqBindingSetVirtual
public interface BindingSet extends java.lang.Cloneable, java.io.Serializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BindingSet.SECURITY_OPS
security operations supported
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_DATABASE_SOURCENAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addRelation(Relation p_relation)
adds a new relation into ArrayListvoid
assurePermissionDefined(BindingSet.SECURITY_OPS operation)
we check here if the application has set up the subjectSettings.void
assurePermitted(BindingSet.SECURITY_OPS operation)
check if given operation is permitted according to permissions set on subject in scopeBindingItem
get(java.lang.String key)
Gets a BindingItem by its unique name and throws an Exception if it is not present.java.util.Collection<BindingItem>
get(java.util.Collection<java.lang.String> keys)
Get binding items by ids.BindingItem
getBindingItemFromRelation(Relation pRelation, java.lang.String itemName)
Method getBindingItemFromRelationjava.util.Collection<java.lang.String>
getBindingItemNames()
getBindingItemNamesjava.lang.String
getJdbcResourceName()
Gets the database name the table of the BindingSet is located in.BindingItem[]
getKeyBindingItems()
Retrieves the list of key BindingItems for this binding set which may contain no entries.java.lang.String
getName()
Gets the unique name of the BindingSet.java.util.ArrayList<Relation>
getRelations()
java.util.Set<StandardBindingSet>
getResolvedBindingSets()
All non-virtual BindingSets that were used at the end, BindingGroups are being resolved to the actually used BindingSetsSecurity
getSecurity()
SQLStatementWithParams
getSQLStatementWithParams()
Returns a table expression and if it is a complex one (subselect with where for example) it may come with variables to be bound as host variablesSubjectFilters
getSubjectFilters()
Gets theSubjectFilters
definition for this BindingSet which may be null.java.lang.String
getTableReference()
Returns a table reference.WriteProcessing
getWriteProcessing()
java.util.List<java.lang.Class<? extends Modifier>>
getWrqModifiers()
A list of Wrq modifier classes to be applied on all requests for this BindingSet before generating the SQL This is completely transparent to the caller, the answer Wrs does show the original WrsRequestboolean
hasCustomItem()
boolean
hasItem(java.lang.String key)
tells if this binding-set contains an itemboolean
hasKeyBindingItems()
Tests if the BindingSet hat key BindingItems.boolean
hasSubjectFilters()
Tells if the binding set has subject filters.boolean
isAllowSelectAllColumns()
isAllowSelectAllColumnsboolean
isBackendCanBypassSubjectFilter()
isBackendCanBypassSubjectFilter
-
-
-
Field Detail
-
DEFAULT_DATABASE_SOURCENAME
static final java.lang.String DEFAULT_DATABASE_SOURCENAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
Gets the unique name of the BindingSet.- Returns:
- The unique BindingSet name.
-
getTableReference
java.lang.String getTableReference()
Returns a table reference. Can be a plain table name (with alias) or a join of tables- Returns:
-
getSQLStatementWithParams
SQLStatementWithParams getSQLStatementWithParams()
Returns a table expression and if it is a complex one (subselect with where for example) it may come with variables to be bound as host variables- Returns:
-
hasSubjectFilters
boolean hasSubjectFilters()
Tells if the binding set has subject filters.- Returns:
- True, if there is at least one SubjectFilter inside this BindingSet.
-
getSubjectFilters
SubjectFilters getSubjectFilters()
Gets theSubjectFilters
definition for this BindingSet which may be null.- Returns:
SubjectFilters
for given BindingSet or null
-
getJdbcResourceName
java.lang.String getJdbcResourceName()
Gets the database name the table of the BindingSet is located in.- Returns:
- The dbSourceName attribute of the BindingSet.
-
isBackendCanBypassSubjectFilter
boolean isBackendCanBypassSubjectFilter()
isBackendCanBypassSubjectFilter- Returns:
- true if it is allowed for the backend to bypass SubjectFilters
-
isAllowSelectAllColumns
boolean isAllowSelectAllColumns()
isAllowSelectAllColumns- Returns:
- true if it is allowed to select all columns from this BindingSet.
-
get
BindingItem get(java.lang.String key) throws BindingNotFoundException
Gets a BindingItem by its unique name and throws an Exception if it is not present.- Parameters:
key
- The name of the BindingItem.- Returns:
- A BindingItem with the specified name.
- Throws:
BindingNotFoundException
- If there is no BindingItem with the denoted name.
-
hasItem
boolean hasItem(java.lang.String key)
tells if this binding-set contains an item- Parameters:
key
-- Returns:
-
hasCustomItem
boolean hasCustomItem()
- Returns:
- TRUE if contains at least one custom element from
StandardNamespaceContext.CUST_NAMESPACE
-
get
java.util.Collection<BindingItem> get(java.util.Collection<java.lang.String> keys) throws BindingNotFoundException
Get binding items by ids.- Throws:
BindingNotFoundException
- See Also:
Bindings.get(String)
-
getBindingItemNames
java.util.Collection<java.lang.String> getBindingItemNames()
getBindingItemNames- Returns:
- names of all items defined in the bindingSet
-
getBindingItemFromRelation
BindingItem getBindingItemFromRelation(Relation pRelation, java.lang.String itemName) throws BindingException
Method getBindingItemFromRelation- Parameters:
pRelation
-itemName
- - requested binding item name- Returns:
- BindingItem object or null if not found
- Throws:
BindingException
-
hasKeyBindingItems
boolean hasKeyBindingItems()
Tests if the BindingSet hat key BindingItems.- Returns:
- True, if there is a BindingItem which is declared as key item.
-
getKeyBindingItems
BindingItem[] getKeyBindingItems()
Retrieves the list of key BindingItems for this binding set which may contain no entries.- Returns:
- An array of the BindingItems with the isKey attribute set to "true".
-
addRelation
void addRelation(Relation p_relation)
adds a new relation into ArrayList- Parameters:
p_relation
-
-
getRelations
java.util.ArrayList<Relation> getRelations()
-
getWriteProcessing
WriteProcessing getWriteProcessing()
-
assurePermissionDefined
void assurePermissionDefined(BindingSet.SECURITY_OPS operation) throws SecurityMissingForBindingException
we check here if the application has set up the subjectSettings. In case it is set up, the binding-set HAS TO define the Security context for given operation otherwise we throwSecurityMissingException
- Parameters:
operation
- - to assure the permission is defined for- Throws:
SecurityMissingException
- - in case subjectSettings are enabled, yet no explicit permission is provided for this BindingSet.SecurityMissingForBindingException
-
assurePermitted
void assurePermitted(BindingSet.SECURITY_OPS operation) throws SecurityException
check if given operation is permitted according to permissions set on subject in scope- Parameters:
operation
- - to assure permission for- Throws:
SecurityException
-
getSecurity
Security getSecurity()
- Returns:
- security context to this binding, may be NULL if no security configured
-
getWrqModifiers
java.util.List<java.lang.Class<? extends Modifier>> getWrqModifiers()
A list of Wrq modifier classes to be applied on all requests for this BindingSet before generating the SQL This is completely transparent to the caller, the answer Wrs does show the original WrsRequest- Returns:
-
getResolvedBindingSets
java.util.Set<StandardBindingSet> getResolvedBindingSets()
All non-virtual BindingSets that were used at the end, BindingGroups are being resolved to the actually used BindingSets- Returns:
-
-