org.specrunner.context
Interface IBlock

All Known Subinterfaces:
IContext
All Known Implementing Classes:
BlockImpl, ContextImpl

public interface IBlock

Block of information on context stack.

Author:
Thiago Santos

Method Summary
 Map<String,Object> getMap()
          Mapping of elements related to the block.
 nu.xom.Node getNode()
          Returns the specification node object related to the block.
 IPlugin getPlugin()
          The plugin related to the block.
 boolean hasChildren()
          Indicates if the block node has children.
 boolean hasMap()
          Indicates if block has a mapping or not.
 boolean hasNode()
          Indicates if block has been created form a specification or not.
 boolean hasPlugin()
          Indicates if block has a plugin or not.
 boolean isChanged()
          Indicates if a given block has changed.
 boolean isValid()
          A valid block has node (hasNode) or plugin ( hasPlugin).
 void setChanged(boolean changed)
          Sets the changed status.
 void setMap(Map<String,Object> map)
          Sets the block mapping of object.
 void setNode(nu.xom.Node node)
          Change block node.
 void setPlugin(IPlugin plugin)
          Sets the block plugin.
 

Method Detail

isValid

boolean isValid()
A valid block has node (hasNode) or plugin ( hasPlugin). They cannot be both 'null'.

Returns:
true, if valid, false otherwise.

hasChildren

boolean hasChildren()
Indicates if the block node has children.

Returns:
true, if is not terminal in the specification, false, otherwise.

isChanged

boolean isChanged()
Indicates if a given block has changed.

Returns:
true, if the content of block has changed, false, otherwise.

setChanged

void setChanged(boolean changed)
Sets the changed status.

Parameters:
changed - The new status.

hasNode

boolean hasNode()
Indicates if block has been created form a specification or not.

Returns:
True, if it has node attached to it, false, otherwise.

getNode

nu.xom.Node getNode()
Returns the specification node object related to the block.

Returns:
The block node.

setNode

void setNode(nu.xom.Node node)
Change block node.

Parameters:
node - The new node.

hasPlugin

boolean hasPlugin()
Indicates if block has a plugin or not.

Returns:
True, if it has a plugin attached to it, false, otherwise.

getPlugin

IPlugin getPlugin()
The plugin related to the block.

Returns:
The block plugin.

setPlugin

void setPlugin(IPlugin plugin)
Sets the block plugin.

Parameters:
plugin - The new plugin.

hasMap

boolean hasMap()
Indicates if block has a mapping or not.

Returns:
True, if it has a map attached to it, false, otherwise.

getMap

Map<String,Object> getMap()
Mapping of elements related to the block. This mapping is responsible for the storage of variables and elements that are expected to be shared between plugins.

Returns:
An object mapping.

setMap

void setMap(Map<String,Object> map)
Sets the block mapping of object.

Parameters:
map - The new mapping.


Copyright © 2014. All rights reserved.