My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
package org.concordion.api.extension;

import org.concordion.api.Command;
import org.concordion.api.Resource;
import org.concordion.api.Source;
import org.concordion.api.Target;
import org.concordion.api.listener.AssertEqualsListener;
import org.concordion.api.listener.AssertFalseListener;
import org.concordion.api.listener.AssertTrueListener;
import org.concordion.api.listener.ConcordionBuildListener;
import org.concordion.api.listener.DocumentParsingListener;
import org.concordion.api.listener.ExecuteListener;
import org.concordion.api.listener.RunListener;
import org.concordion.api.listener.SpecificationProcessingListener;
import org.concordion.api.listener.ThrowableCaughtListener;
import org.concordion.api.listener.VerifyRowsListener;

/**
* Allows {@link ConcordionExtension}s to add features to Concordion.
*/
public interface ConcordionExtender {
/**
* Adds a command to Concordion.
* @param namespaceURI the URI to be used for the namespace of the command. Must not be <code>concordion.org</code>.
* @param commandName the name to be used for the command. The fully qualified name composed of the <code>namespaceURI</code> and
* <code>commandName</code> must be used to reference the command in the Concordion specification.
* @param command the command to be executed
* @return this
*/
ConcordionExtender withCommand(String namespaceURI, String commandName, Command command);

/**
* Adds a listener to <code>concordion:assertEquals</code> commands.
* @param listener
* @return this
*/
ConcordionExtender withAssertEqualsListener(AssertEqualsListener listener);

/**
* Adds a listener to <code>concordion:assertTrue</code> commands.
* @param listener
* @return this
*/
ConcordionExtender withAssertTrueListener(AssertTrueListener listener);

/**
* Adds a listener to <code>concordion:assertFalse</code> commands.
* @param listener
* @return this
*/
ConcordionExtender withAssertFalseListener(AssertFalseListener listener);

/**
* Adds a listener to <code>concordion:execute</code> commands.
* @param listener
* @return this
*/
ConcordionExtender withExecuteListener(ExecuteListener executeListener);

/**
* Adds a listener to <code>concordion:run</code> commands.
* @param listener
* @return this
*/
ConcordionExtender withRunListener(RunListener listener);

/**
* Adds a listener to <code>concordion:verifyRows</code> commands.
* @param listener
* @return this
*/
ConcordionExtender withVerifyRowsListener(VerifyRowsListener listener);

/**
* Adds a listener that is invoked when an uncaught {@link Throwable} is thrown by a command,
* including commands that have been added using {@link #withCommand(String, String, Command)}.
* @param throwableListener
* @return this
*/
ConcordionExtender withThrowableListener(ThrowableCaughtListener throwableListener);

/**
* Adds a listener that is invoked when Concordion parses the specification document, providing
* access to the parsed document.
* @param listener
* @return this
*/
ConcordionExtender withDocumentParsingListener(DocumentParsingListener listener);

/**
* Adds a listener that is invoked before and after Concordion has processed the specification,
* providing access to the specification resource and root element.
* @param listener
* @return this
*/
ConcordionExtender withSpecificationProcessingListener(SpecificationProcessingListener listener);

/**
* Adds a listener that is invoked when a Concordion instance is built, providing access to the {@link Target}
* to which resources can be written.
* @param listener
* @return this
*/
ConcordionExtender withBuildListener(ConcordionBuildListener listener);

/**
* Copies a resource to the Concordion output.
* @param sourcePath
* @param targetResource
* @return this
*/
ConcordionExtender withResource(String sourcePath, Resource targetResource);

/**
* Embeds the given CSS in the Concordion output.
* @param css
* @return this
*/
ConcordionExtender withEmbeddedCSS(String css);

/**
* Copies the given CSS file to the Concordion output folder, and adds a link to the CSS in the &lt;head&gt; section of the Concordion HTML.
* @param cssPath
* @param targetResource
* @return this
*/
ConcordionExtender withLinkedCSS(String cssPath, Resource targetResource);

/**
* Embeds the given JavaScript in the Concordion output.
* @param javaScript
* @return this
*/
ConcordionExtender withEmbeddedJavaScript(String javaScript);

/**
* Copies the given JavaScript file to the Concordion output folder, and adds a link to the JavaScript in the &lt;head&gt; section of the Concordion HTML.
* @param jsPath
* @param targetResource
* @return this
*/
ConcordionExtender withLinkedJavaScript(String jsPath, Resource targetResource);

/**
* Overrides the source that the Concordion specifications are read from.
* @param source the new source
* @return this
*/
ConcordionExtender withSource(Source source);

/**
* Overrides the target that the Concordion specifications are written to.
* @param source the new target
* @return this
*/
ConcordionExtender withTarget(Target target);
}

Change log

r510 by peterson3 on Oct 30, 2011   Diff
Removed the dependency on
ConcordionBuilder from the interface
Go to: 
Project members, sign in to write a code review

Older revisions

r506 by nigel.charman.nz on Oct 29, 2011   Diff
FIXED - task 39: Expose withSource()
and withTarget() via the Concordion
Extension mechanism
http://code.google.com/p/concordion/is
sues/detail?id=39
r327 by nigel.charman.nz on Oct 14, 2010   Diff
Package changes:
* Renamed org.concordion.api.command
-> org.concordion.api.listener
* Moved AbstractCommand and
AbstractCommandDecorator ->
...
r326 by nigel.charman.nz on Oct 13, 2010   Diff
Moved DocumentParsingListener from
internal to public package
All revisions of this file

File info

Size: 5613 bytes, 157 lines
Powered by Google Project Hosting