public interface OverviewContext
NodeLoader
:s and NodeValidator
:s
so that they can do their job.Modifier and Type | Method and Description |
---|---|
Failure |
createFailure(Validator validator,
Node node,
java.lang.String message,
Fix... fixes)
Register the failure of a validation rule.
|
java.lang.Object |
getCachedObject(java.lang.Object cacheKey)
Retreive an object stored in the overview cache.
|
NodeCache<java.lang.Object> |
getNodeCache()
Get the current node cache.
|
NodeLoaderFactory |
getNodeLoaderFactory()
Get the node loader factory that is used to create node loaders.
|
NodeValidatorFactory |
getNodeValidatorFactory()
Get the node validator factory that is used to create node validators.
|
Project |
getProject()
Get the project the overview is using as the "current" project.
|
SnapshotManager |
getSnapshotManager()
Get the snapshot manager that is used to load annotation
values.
|
ValidationOptions |
getValidationOptions()
Get the validation options that are currently in effect.
|
<I extends BasicItem> |
initQuery(ItemQuery<I> query,
Order... sortby)
Initialise a query with "global options" and optionally a sort
order.
|
<I extends BasicItem> |
initQuery(ItemQuery<I> query,
java.lang.String sortby)
Same as
initQuery(ItemQuery, Order...) but easier to use when
sorting the items in ascending order by a single column. |
void |
setCachedObject(java.lang.Object cacheKey,
java.lang.Object value)
Store an auxilliary object in the overview cache.
|
NodeLoaderFactory getNodeLoaderFactory()
NodeValidatorFactory getNodeValidatorFactory()
SnapshotManager getSnapshotManager()
Project getProject()
ValidationOptions getValidationOptions()
void setCachedObject(java.lang.Object cacheKey, java.lang.Object value)
Note! The overview impementation is not forced to implement a cache, or it may optionally decide to disable the cache. Node loaders and validators should not depend on the cache for correct functionality.
cacheKey
- The key to store the value undervalue
- The value to store in the cache, or null to
remove the entrygetCachedObject(Object)
java.lang.Object getCachedObject(java.lang.Object cacheKey)
cacheKey
- The key to use for cache lookupsetCachedObject(Object, Object)
Failure createFailure(Validator validator, Node node, java.lang.String message, Fix... fixes)
Note! The overview implementation is not forced to register the failure, or it may optioanlly only register certain types of failures.
validator
- The validation rule that failsnode
- The node that was validatedmessage
- An optional message, if null the message from
Validator.getFailureSummary()
is usedfixes
- Optional fixes that may be used to correct the problem<I extends BasicItem> ItemQuery<I> initQuery(ItemQuery<I> query, java.lang.String sortby)
initQuery(ItemQuery, Order...)
but easier to use when
sorting the items in ascending order by a single column.query
- The query that should be initialisedsortby
- The property name to sort by (may be null)<I extends BasicItem> ItemQuery<I> initQuery(ItemQuery<I> query, Order... sortby)
Note! The "global options" can differ between overview implementation,
but typically include settings some restrictions base on Include
options, or permissions on the query.
query
- The query that should be initialisedsortby
- An array with Order objects (may be null)initQuery(ItemQuery, Order...)
NodeCache<java.lang.Object> getNodeCache()