|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.parameters.core.ParameterHolder
org.specrunner.plugins.core.AbstractPlugin
org.specrunner.plugins.core.include.PluginInclude
public class PluginInclude
Allow a file inclusion.
Example:
Perform plugin as in login.html.
The CSS annotated version:
Perform plugin as in <a href="#" class="include">login.html</a>.
| Nested Class Summary | |
|---|---|
protected class |
PluginInclude.ResolverDefault
Basic resolver implementation. |
| Field Summary | |
|---|---|
static String |
CSS_INCLUDED
Style added to included file. |
static String |
CSS_INCLUDED_ARGS
Style added to args. |
static String |
CSS_INCLUDED_CONTENT
Style added to content file. |
static String |
CSS_INCLUDED_FILE
Style added to the header file. |
static Integer |
DEFAULT_DEPTH
Default value. |
static Boolean |
DEFAULT_EXPANDED
Default include expanded state. |
protected Integer |
depth
Max depth of inclusion. |
protected Boolean |
expanded
Expanded state. |
static String |
FEATURE_DEPTH
Max deep of includes. |
static String |
FEATURE_EXPANDED
Enable expanded mode for features. |
static String |
FEATURE_RESOLVER
Resolver of URIs. |
static String |
FEATURE_TRANSFORMER
Transformer type as feature. |
protected String |
href
Link to file. |
protected IResolver |
resolver
Relative URI resolver. |
protected String |
transformer
Transformer to be used after loading in addiction to the general transformer. |
| Fields inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
FEATURE_CONDITION, FEATURE_NORMALIZED, FEATURE_SLEEP, FEATURE_THREADSAFE, FEATURE_TIMEOUT, FEATURE_WAIT |
| Constructor Summary | |
|---|---|
PluginInclude()
|
|
| Method Summary | |
|---|---|
protected nu.xom.Node |
bindParameters(IContext context)
Normalize path removing parameters which are set as arguments. |
ENext |
doStart(IContext context,
IResultSet result)
Performs the start action. i.e. create a database schema. |
ActionType |
getActionType()
Get the plugin type. |
Integer |
getDepth()
The max depth allowed for inclusion files. |
String |
getDir()
The input directory. |
protected nu.xom.Document |
getDocument(ISource newSource)
Get document from source. |
Boolean |
getExpanded()
Gets the status expected for inclusion. |
String |
getHref()
The link reference. |
protected String |
getPath(IContext context)
Normalize path removing parameters. |
IResolver |
getResolver()
Resolver of relative links. |
protected ISource |
getSource(URI newHref)
Get source from a URI. |
String |
getTransformer()
Get the transformer field. |
void |
initialize(IContext context)
Initialize the plugin. |
void |
setDepth(Integer depth)
Set max depth. |
void |
setDir(String dir)
Output directory file. |
void |
setExpanded(Boolean expanded)
Set expanded mode. |
void |
setHref(String href)
Set link reference. |
void |
setResolver(IResolver resolver)
Change the resolver. |
void |
setTransformer(String transformer)
Set the transformer. |
protected StringBuilder |
toString(IContext context)
Cycle as string. |
protected ISource |
transform(ISource newSource)
Perform source transformation. |
| Methods inherited from class org.specrunner.plugins.core.AbstractPlugin |
|---|
copy, doEnd, getCondition, getConditionModel, getNormalized, getNormalized, getParent, getSleep, getSleepModel, getThreadsafe, getTimeout, getTimeoutModel, getWait, getWaitModel, setCondition, setConditionModel, setNormalized, setParent, setSleep, setSleepModel, setThreadsafe, setTimeout, setTimeoutModel, setWait, setWaitModel, toString |
| Methods inherited from class org.specrunner.parameters.core.ParameterHolder |
|---|
getParameters, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.specrunner.parameters.IParameterHolder |
|---|
getParameters, setParameters |
| Field Detail |
|---|
public static final String CSS_INCLUDED
public static final String CSS_INCLUDED_FILE
public static final String CSS_INCLUDED_ARGS
public static final String CSS_INCLUDED_CONTENT
protected String href
public static final String FEATURE_DEPTH
public static final Integer DEFAULT_DEPTH
protected Integer depth
public static final String FEATURE_EXPANDED
public static final Boolean DEFAULT_EXPANDED
protected Boolean expanded
public static final String FEATURE_TRANSFORMER
protected String transformer
public static final String FEATURE_RESOLVER
protected IResolver resolver
| Constructor Detail |
|---|
public PluginInclude()
| Method Detail |
|---|
public String getDir()
public void setDir(String dir)
dir - The directory.public String getHref()
public void setHref(String href)
href - The reference.public Integer getDepth()
public void setDepth(Integer depth)
depth - The depth.public Boolean getExpanded()
public void setExpanded(Boolean expanded)
expanded - The expanded value.public String getTransformer()
public void setTransformer(String transformer)
transformer - The transformer.public IResolver getResolver()
public void setResolver(IResolver resolver)
resolver - A resolver.public ActionType getActionType()
IActionType
public void initialize(IContext context)
throws PluginException
IPlugin
initialize in interface IPlugininitialize in class AbstractPlugincontext - The test context.
PluginException - On initialization errors.
public ENext doStart(IContext context,
IResultSet result)
throws PluginException
IPlugin
doStart in interface IPlugindoStart in class AbstractPlugincontext - The context.result - The result set.
PluginException - On execution errors.
protected ISource getSource(URI newHref)
throws PluginException
newHref - The URI.
PluginException - On reading errors.
protected nu.xom.Document getDocument(ISource newSource)
throws PluginException
newSource - The source.
PluginException - On load errors.
protected ISource transform(ISource newSource)
throws PluginException
newSource - Source to be transformed.
PluginException - On transform errors.
protected nu.xom.Node bindParameters(IContext context)
throws PluginException
context - The context.
PluginException - On plugin errors.
protected String getPath(IContext context)
throws PluginException
context - The context.
PluginException - On plugin errors.protected StringBuilder toString(IContext context)
context - The context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||