|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IContext
Stands for the plugin/test runtime environment.
| Field Summary | |
|---|---|
static String |
UPACCESS
String to label variable up context access. |
| Method Summary | |
|---|---|
void |
addMetadata()
Add metadata from block context. |
void |
clearGlobal(String global)
Removes a variable name from global context. |
void |
clearLocal(String local)
Removes a variable name from local context. |
void |
clearScoped(String scope,
String local)
Removes a scoped variable. |
void |
clearStrict(String name)
Clear the context peek mapping from name. |
IBlock |
getByElement(Class<? extends nu.xom.Node> type)
Search a block by element type. |
Object |
getByName(String name)
Search a value by its name, from the most restricted block to the outermost (i.e. the root XML element). |
IBlock |
getByPlugin(Class<? extends IPlugin> type)
Search a block by plugin type. |
ISource |
getCurrentSource()
Get current source. |
Map<String,Object> |
getObjects()
A map of all objects in context. |
IBlock |
getParentByElement(Class<? extends nu.xom.Node> type)
Strict parent search by element type. |
Object |
getParentByName(String name)
A strict parent search a value by its name, from the most restricted block to the outermost (i.e. the root XML element). |
IBlock |
getParentByPlugin(Class<? extends IPlugin> type)
Strict parent search by plugin type. |
IRunner |
getRunner()
The runner related to the context. |
Deque<ISource> |
getSources()
Queue of sources. |
void |
saveGlobal(String global,
Object obj)
Saves a variable with the given name to the global context (outermost block). |
void |
saveLocal(String local,
Object obj)
Saves a variable with the given name to the local context. |
void |
saveScoped(String scope,
String local,
Object obj)
Saves a variable to the given scope. |
void |
saveStrict(String name,
Object value)
Save the value to the current context peek, no matter what type of node it is. |
| Methods inherited from interface java.util.Deque |
|---|
add, addFirst, addLast, contains, descendingIterator, element, getFirst, getLast, iterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size |
| Methods inherited from interface java.util.Collection |
|---|
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray |
| Methods inherited from interface org.specrunner.context.IBlock |
|---|
getMap, getNode, getPlugin, hasChildren, hasMap, hasNode, hasPlugin, isChanged, isValid, setChanged, setMap, setNode, setPlugin |
| Methods inherited from interface org.specrunner.context.IBlockFactory |
|---|
newBlock, newBlock |
| Field Detail |
|---|
static final String UPACCESS
_$index,
look for first index access, if found, move context down an look for the
occurrence.
| Method Detail |
|---|
Deque<ISource> getSources()
ISource getCurrentSource()
IRunner getRunner()
void saveGlobal(String global,
Object obj)
global - The variable name.obj - The value.void clearGlobal(String global)
global - The variable name.
void saveLocal(String local,
Object obj)
local - The variable name.obj - The value.void clearLocal(String local)
local - The variable name.
void saveStrict(String name,
Object value)
name - The name.value - The value.void clearStrict(String name)
name - The name.
void saveScoped(String scope,
String local,
Object obj)
scope - Indicates where to bind the value, i.e. when
saveScope("body","name","value") is used in a "span" tag, this
method searches for the "body" backward tag to add variable.local - The variable name.obj - The value.
void clearScoped(String scope,
String local)
scope - The scope to unbound.local - The variable name.IBlock getByElement(Class<? extends nu.xom.Node> type)
type - The type.
IBlock getParentByElement(Class<? extends nu.xom.Node> type)
type - The type.
IBlock getByPlugin(Class<? extends IPlugin> type)
type - The type.
IBlock getParentByPlugin(Class<? extends IPlugin> type)
type - The type.
Object getByName(String name)
name - The name.
Object getParentByName(String name)
name - The name.
Map<String,Object> getObjects()
void addMetadata()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||