|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OverviewContext
Interface that should be implemented by overview generating
classes. This interface defines service methods that overview
generating class to NodeLoader
:s and NodeValidator
:s
so that they can do their job.
Method Summary | ||
---|---|---|
Failure |
createFailure(Validator validator,
Node node,
String message,
Fix... fixes)
Register the failure of a validation rule. |
|
Object |
getCachedObject(Object cacheKey)
Retreive an object stored in the overview cache. |
|
NodeCache<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. |
|
|
initQuery(ItemQuery<I> query,
Order... sortby)
Initialise a query with "global options" and optionally a sort order. |
|
|
initQuery(ItemQuery<I> query,
String sortby)
Same as initQuery(ItemQuery, Order...) but easier to use when
sorting the items in ascending order by a single column. |
|
void |
setCachedObject(Object cacheKey,
Object value)
Store an auxilliary object in the overview cache. |
Method Detail |
---|
NodeLoaderFactory getNodeLoaderFactory()
NodeValidatorFactory getNodeValidatorFactory()
SnapshotManager getSnapshotManager()
Project getProject()
ValidationOptions getValidationOptions()
void setCachedObject(Object cacheKey, 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)
Object getCachedObject(Object cacheKey)
cacheKey
- The key to use for cache lookup
setCachedObject(Object, Object)
Failure createFailure(Validator validator, Node node, 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, 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<Object> getNodeCache()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |