Commit 78af9475a6856d1e7c69266a04508266436ee37d
0 parents
created trunk directory and moved whole repo to it
Showing
96 changed files
with
7083 additions
and
0 deletions
ear/pom.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project | ||
3 | + xmlns="http://maven.apache.org/POM/4.0.0" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
6 | + | ||
7 | + <modelVersion>4.0.0</modelVersion> | ||
8 | + <parent> | ||
9 | + <groupId>no.knowit.seam</groupId> | ||
10 | + <artifactId>seam-refimpl</artifactId> | ||
11 | + <version>1.0-SNAPSHOT</version> | ||
12 | + <relativePath>../pom.xml</relativePath> | ||
13 | + </parent> | ||
14 | + | ||
15 | + <artifactId>seam-refimpl-ear</artifactId> <!-- m2eclipse does not like: ${app.context}-ear --> | ||
16 | + <name>${project.artifactId} : ${project.version}</name> | ||
17 | + <description>The Seam Maven reference implementation EAR module</description> | ||
18 | + <packaging>ear</packaging> | ||
19 | + | ||
20 | + <profiles> | ||
21 | + <!-- | ||
22 | + More than one profile can be active at once. Since profiles can contain the same types of | ||
23 | + configuration there can be clashes. If two profiles clash the last to be activated will | ||
24 | + override configurations in those activated earlier. | ||
25 | + Note: Any activeByDefault profile will be deactivated if you activate another profile. | ||
26 | + E.g. running "mvn install -Penv-dev" deactivates the "prod" profile. | ||
27 | + --> | ||
28 | + <profile> | ||
29 | + <id>env-dev</id> | ||
30 | + <properties> | ||
31 | + <env>dev</env> | ||
32 | + </properties> | ||
33 | + </profile> | ||
34 | + | ||
35 | + <profile> | ||
36 | + <id>env-prod</id> | ||
37 | + <activation> | ||
38 | + <activeByDefault>true</activeByDefault> | ||
39 | + </activation> | ||
40 | + <properties> | ||
41 | + <env>prod</env> | ||
42 | + </properties> | ||
43 | + </profile> | ||
44 | + | ||
45 | + <profile> | ||
46 | + <!-- | ||
47 | + Explode ear to appserver deploy folder. | ||
48 | + Execute e.g."mvn package -Pexplode" | ||
49 | + --> | ||
50 | + <id>explode</id> | ||
51 | + <build> | ||
52 | + <plugins> | ||
53 | + <plugin> | ||
54 | + <artifactId>maven-antrun-plugin</artifactId> | ||
55 | + <executions> | ||
56 | + <execution> | ||
57 | + <id>package</id> | ||
58 | + <phase>package</phase> | ||
59 | + <configuration> | ||
60 | + <tasks> | ||
61 | + <property name="deploy-path" value="${as.deploy}/${app.context}-ear.ear" /> | ||
62 | + <echo>Exploding to ${deploy-path}</echo> | ||
63 | + <delete file="${deploy-path}" quiet="true" /> | ||
64 | + <mkdir dir="${deploy-path}" /> | ||
65 | + <sync todir="${deploy-path}" verbose="true" > | ||
66 | + <fileset dir="${project.build.directory}/${project.build.finalName}" /> | ||
67 | + </sync> | ||
68 | + <!-- | ||
69 | + Uncomment this tag if you want to deploy the *-ds.xml file to the appserver's deploy folder | ||
70 | + <copy todir="${as.deploy}" file="${project.build.directory}/${ds.xml}" verbose="true" /> | ||
71 | + --> | ||
72 | + </tasks> | ||
73 | + </configuration> | ||
74 | + <goals> | ||
75 | + <goal>run</goal> | ||
76 | + </goals> | ||
77 | + </execution> | ||
78 | + </executions> | ||
79 | + </plugin> | ||
80 | + </plugins> | ||
81 | + </build> | ||
82 | + </profile> | ||
83 | + | ||
84 | + <profile> | ||
85 | + <!-- | ||
86 | + Unexplode ear. Remove project from appserver deploy folder. | ||
87 | + Execute e.g. "mvn clean -Punexplode" | ||
88 | + --> | ||
89 | + <id>unexplode</id> | ||
90 | + <build> | ||
91 | + <plugins> | ||
92 | + <plugin> | ||
93 | + <artifactId>maven-antrun-plugin</artifactId> | ||
94 | + <executions> | ||
95 | + <execution> | ||
96 | + <id>clean</id> | ||
97 | + <phase>clean</phase> | ||
98 | + <configuration> | ||
99 | + <tasks> | ||
100 | + <property name="deploy-path" value="${as.deploy}/${app.context}-ear.ear" /> | ||
101 | + | ||
102 | + <echo>Unexploding: ${deploy-path}</echo> | ||
103 | + | ||
104 | + <delete file="${deploy-path}" quiet="true" /> | ||
105 | + <delete dir="${deploy-path}" quiet="true" /> | ||
106 | + <!-- | ||
107 | + Uncomment this tag if you have deployed the *-ds.xml file to the appserver's deploy folder | ||
108 | + <delete file="${as.deploy}/${ds.xml}" quiet="true" /> | ||
109 | + --> | ||
110 | + </tasks> | ||
111 | + </configuration> | ||
112 | + <goals> | ||
113 | + <goal>run</goal> | ||
114 | + </goals> | ||
115 | + </execution> | ||
116 | + </executions> | ||
117 | + </plugin> | ||
118 | + </plugins> | ||
119 | + </build> | ||
120 | + </profile> | ||
121 | + </profiles> | ||
122 | + | ||
123 | + <dependencies> | ||
124 | + <!-- project modules --> | ||
125 | + <dependency> | ||
126 | + <groupId>${project.groupId}</groupId> | ||
127 | + <artifactId>${app.context}-war</artifactId> | ||
128 | + <type>war</type> | ||
129 | + </dependency> | ||
130 | + | ||
131 | + <dependency> | ||
132 | + <groupId>${project.groupId}</groupId> | ||
133 | + <artifactId>${app.context}-ejb</artifactId> | ||
134 | + <type>ejb</type> | ||
135 | + </dependency> | ||
136 | + | ||
137 | + <!-- other project modules | ||
138 | + <dependency> | ||
139 | + <groupId>${project.groupId}</groupId> | ||
140 | + <artifactId>${app.context}-jar</artifactId> | ||
141 | + </dependency> | ||
142 | + --> | ||
143 | + | ||
144 | + <!-- seam --> | ||
145 | + <dependency> | ||
146 | + <groupId>org.jboss.seam</groupId> | ||
147 | + <artifactId>jboss-seam</artifactId> | ||
148 | + <type>ejb</type> | ||
149 | + </dependency> | ||
150 | + | ||
151 | + <dependency> | ||
152 | + <groupId>org.jboss.el</groupId> | ||
153 | + <artifactId>jboss-el</artifactId> | ||
154 | + <type>jar</type> | ||
155 | + </dependency> | ||
156 | + | ||
157 | + <!-- richfaces --> | ||
158 | + <dependency> | ||
159 | + <groupId>org.richfaces.framework</groupId> | ||
160 | + <artifactId>richfaces-api</artifactId> | ||
161 | + <type>jar</type> | ||
162 | + </dependency> | ||
163 | + | ||
164 | + <!-- hibernate --> | ||
165 | + <!-- | ||
166 | + <dependency> | ||
167 | + <groupId>org.hibernate</groupId> | ||
168 | + <artifactId>hibernate-commons-annotations</artifactId> | ||
169 | + <scope>provided</scope> | ||
170 | + </dependency> | ||
171 | + --> | ||
172 | + | ||
173 | + <!-- commons --> | ||
174 | + <dependency> | ||
175 | + <groupId>commons-beanutils</groupId> | ||
176 | + <artifactId>commons-beanutils</artifactId> | ||
177 | + <type>jar</type> | ||
178 | + </dependency> | ||
179 | + | ||
180 | + <dependency> | ||
181 | + <groupId>commons-digester</groupId> | ||
182 | + <artifactId>commons-digester</artifactId> | ||
183 | + <type>jar</type> | ||
184 | + </dependency> | ||
185 | + | ||
186 | + <!-- | ||
187 | + JBoss Rules. Needed if you implement drools functionality, e.g. Seam Idendity | ||
188 | + see: samples/jboss-seam/examlpes/seamspace | ||
189 | + --> | ||
190 | + <!-- | ||
191 | + <dependency> | ||
192 | + <groupId>org.drools</groupId> | ||
193 | + <artifactId>drools-core</artifactId> | ||
194 | + </dependency> | ||
195 | + | ||
196 | + <dependency> | ||
197 | + <groupId>org.drools</groupId> | ||
198 | + <artifactId>drools-compiler</artifactId> | ||
199 | + </dependency> | ||
200 | + | ||
201 | + <dependency> | ||
202 | + <groupId>org.drools</groupId> | ||
203 | + <artifactId>drools-api</artifactId> | ||
204 | + </dependency> | ||
205 | + | ||
206 | + <dependency> | ||
207 | + <groupId>org.drools</groupId> | ||
208 | + <artifactId>drools-decisiontables</artifactId> | ||
209 | + </dependency> | ||
210 | + | ||
211 | + <dependency> | ||
212 | + <groupId>org.drools</groupId> | ||
213 | + <artifactId>drools-templates</artifactId> | ||
214 | + </dependency> | ||
215 | + | ||
216 | + <dependency> | ||
217 | + <groupId>com.thoughtworks.xstream</groupId> | ||
218 | + <artifactId>xstream</artifactId> | ||
219 | + </dependency> | ||
220 | + | ||
221 | + <dependency> | ||
222 | + <groupId>xpp3</groupId> | ||
223 | + <artifactId>xpp3_min</artifactId> | ||
224 | + </dependency> | ||
225 | + --> | ||
226 | + | ||
227 | + <!-- rules + groovy --> | ||
228 | + <!-- | ||
229 | + <dependency> | ||
230 | + <groupId>org.antlr</groupId> | ||
231 | + <artifactId>antlr-runtime</artifactId> | ||
232 | + </dependency> | ||
233 | + --> | ||
234 | + | ||
235 | + <!-- Added transient by JBoss Rules | ||
236 | + <dependency> | ||
237 | + <groupId>org.mvel</groupId> | ||
238 | + <artifactId>mvel2</artifactId> | ||
239 | + </dependency> | ||
240 | + | ||
241 | + <dependency> | ||
242 | + <groupId>janino</groupId> | ||
243 | + <artifactId>janino</artifactId> | ||
244 | + </dependency> | ||
245 | + | ||
246 | + <dependency> | ||
247 | + <groupId>org.eclipse.jdt</groupId> | ||
248 | + <artifactId>core</artifactId> | ||
249 | + </dependency> | ||
250 | + --> | ||
251 | + | ||
252 | + <!-- JBoss jBPM --> | ||
253 | + <!-- | ||
254 | + <dependency> | ||
255 | + <groupId>org.jbpm</groupId> | ||
256 | + <artifactId>jbpm-jpdl</artifactId> | ||
257 | + </dependency> | ||
258 | + --> | ||
259 | + </dependencies> | ||
260 | + | ||
261 | + <build> | ||
262 | + <!-- | ||
263 | + Maven filter properties are ony visible to | ||
264 | + resources and can not be accessed from the POM. | ||
265 | + | ||
266 | + <filters> | ||
267 | + <filter>../src/main/filters/filter-${env}.properties</filter> | ||
268 | + </filters> | ||
269 | + --> | ||
270 | + | ||
271 | + <plugins> | ||
272 | + <!-- | ||
273 | + Maven filter properties are ony visible to resources and can not be | ||
274 | + accessed from the POM. This is where the Properties Maven Plugin makes | ||
275 | + our life a little easier when dealing with properties that we need to | ||
276 | + access inside our POM. It provides goals to read and write properties | ||
277 | + from and to files, and also to set system properties. It's main use-case | ||
278 | + is loading properties from files instead of declaring them in pom.xml, | ||
279 | + something that comes in handy when dealing with different environments. | ||
280 | + The plugin is configured to read properties during the "validate" phase | ||
281 | + and the properties are then accessible from the pom. | ||
282 | + --> | ||
283 | + <plugin> | ||
284 | + <groupId>org.codehaus.mojo</groupId> | ||
285 | + <artifactId>properties-maven-plugin</artifactId> | ||
286 | + <executions> | ||
287 | + <execution> | ||
288 | + <configuration> | ||
289 | + <files> | ||
290 | + <file>${basedir}/../src/main/filters/filter-${env}.properties</file> | ||
291 | + </files> | ||
292 | + </configuration> | ||
293 | + </execution> | ||
294 | + <execution> | ||
295 | + <!-- Properties needed by unexplode profile --> | ||
296 | + <id>pre-clean</id> | ||
297 | + <phase>pre-clean</phase> | ||
298 | + <goals> | ||
299 | + <goal>read-project-properties</goal> | ||
300 | + </goals> | ||
301 | + <configuration> | ||
302 | + <files> | ||
303 | + <file>${basedir}/../src/main/filters/filter-${env}.properties</file> | ||
304 | + </files> | ||
305 | + </configuration> | ||
306 | + </execution> | ||
307 | + </executions> | ||
308 | + </plugin> | ||
309 | + | ||
310 | + <!-- | ||
311 | + Maven resources plugin The default resources folder for ear is the | ||
312 | + src/main/application folder. Stuff in this folder will go into the | ||
313 | + target ear folder. The projects *-ds.xml file is placed in the | ||
314 | + src/main/resources folder, so we'll have to use the | ||
315 | + maven-resources-plugin to copy the *-ds.xml file. The reason for | ||
316 | + this is that we need to control where to copy the *-ds.xml is in | ||
317 | + the target build. If we want to deploy the *-ds.xml file embedded | ||
318 | + into the ear project then the file is located in the target/ear root | ||
319 | + folder. If the *-ds.xml file should be deployed as a separate service, | ||
320 | + then the file is located the target folder. The explode profile | ||
321 | + will then copy the *-ds.xml file to the application server's deploy | ||
322 | + folder. | ||
323 | + --> | ||
324 | + <plugin> | ||
325 | + <groupId>org.apache.maven.plugins</groupId> | ||
326 | + <artifactId>maven-resources-plugin</artifactId> | ||
327 | + <executions> | ||
328 | + <execution> | ||
329 | + <id>copy-app-ds-xml</id> | ||
330 | + <phase>initialize</phase> | ||
331 | + <goals> | ||
332 | + <goal>copy-resources</goal> | ||
333 | + </goals> | ||
334 | + <configuration> | ||
335 | + | ||
336 | + <!-- | ||
337 | + Comment out this tag if you have deployed the *-ds.xml file to the appserver's deploy folder | ||
338 | + --> | ||
339 | + <outputDirectory>${project.build.directory}/${project.build.finalName}/META-INF/ds</outputDirectory> | ||
340 | + | ||
341 | + <!-- | ||
342 | + Uncomment this tag if you have deployed the *-ds.xml file to the appserver's deploy folder | ||
343 | + <outputDirectory>${project.build.directory}</outputDirectory> | ||
344 | + --> | ||
345 | + <resources> | ||
346 | + <resource> | ||
347 | + <directory>src/main/resources</directory> | ||
348 | + <filtering>true</filtering> | ||
349 | + <includes> | ||
350 | + <include>${ds.xml}</include> | ||
351 | + </includes> | ||
352 | + </resource> | ||
353 | + </resources> | ||
354 | + </configuration> | ||
355 | + </execution> | ||
356 | + </executions> | ||
357 | + </plugin> | ||
358 | + | ||
359 | + <!-- Maven EAR plugin --> | ||
360 | + <plugin> | ||
361 | + <groupId>org.apache.maven.plugins</groupId> | ||
362 | + <artifactId>maven-ear-plugin</artifactId> | ||
363 | + <configuration> | ||
364 | + <finalName>${app.context}-ear</finalName> | ||
365 | + <displayName>${app.display.name}</displayName> | ||
366 | + <description>${app.description}</description> | ||
367 | + <jboss> | ||
368 | + <!-- | ||
369 | + To trigger the generation of the jboss-app.xml file you need to | ||
370 | + configure the 'jboss' element. see: | ||
371 | + http://maven.apache.org/plugins/maven-ear-plugin/usage.html and: | ||
372 | + http://maven.apache.org/plugins/maven-ear-plugin/examples/generating-jboss-app.html | ||
373 | + --> | ||
374 | + <version>${as.version}</version> | ||
375 | + | ||
376 | + <loader-repository> | ||
377 | + <!-- | ||
378 | + seam.jboss.org is a Seam-specific scoped classloader. It acts as | ||
379 | + a way for Seam to disassociate artifacts bundled with the | ||
380 | + application from those that exist within the JBoss application | ||
381 | + server's shared artifacts or JARs (for example, those that | ||
382 | + reside in the default server's lib directory or in JBoss's | ||
383 | + general lib directory). | ||
384 | + The classloader is referenced in jboss-app.xml for EAR deployment and and in | ||
385 | + jboss-web.xml for WAR deployment (SiA-2.5.3-p63). | ||
386 | + see: http://www.jboss.org/community/wiki/classloadingconfiguration | ||
387 | + see: http://www.mastertheboss.com/en/jboss-application-server/141-jboss-classloader.html | ||
388 | + --> | ||
389 | + seam.jboss.org:loader=${app.context}-ear | ||
390 | + </loader-repository> | ||
391 | + | ||
392 | + <!-- | ||
393 | + Comment out this tag if you have deployed the *-ds.xml file to the appserver's deploy folder | ||
394 | + --> | ||
395 | + <data-sources> | ||
396 | + <data-source>META-INF/ds/${ds.xml}</data-source> | ||
397 | + </data-sources> | ||
398 | + </jboss> | ||
399 | + | ||
400 | + <archive> | ||
401 | + <manifestEntries> | ||
402 | + <Build-Date>${timestamp}</Build-Date> | ||
403 | + <Build-Revision>${buildNumber}</Build-Revision> | ||
404 | + <Mode>${env}</Mode> | ||
405 | + </manifestEntries> | ||
406 | + </archive> | ||
407 | + | ||
408 | + <modules> | ||
409 | + <webModule> | ||
410 | + <groupId>${project.groupId}</groupId> | ||
411 | + <artifactId>${app.context}-war</artifactId> | ||
412 | + <contextRoot>/${app.web.context}</contextRoot> | ||
413 | + <unpack>${app.unpack.modules}</unpack> | ||
414 | + </webModule> | ||
415 | + | ||
416 | + <ejbModule> | ||
417 | + <groupId>${project.groupId}</groupId> | ||
418 | + <artifactId>${app.context}-ejb</artifactId> | ||
419 | + <unpack>${app.unpack.modules}</unpack> | ||
420 | + </ejbModule> | ||
421 | + | ||
422 | + <!-- | ||
423 | + <jarModule> | ||
424 | + <groupId>${project.groupId}</groupId> | ||
425 | + <artifactId>${app.context}-jar</artifactId> | ||
426 | + <unpack>${app.unpack.modules}</unpack> | ||
427 | + <includeInApplicationXml>true</includeInApplicationXml> | ||
428 | + </jarModule> | ||
429 | + --> | ||
430 | + | ||
431 | + <ejbModule> | ||
432 | + <groupId>org.jboss.seam</groupId> | ||
433 | + <artifactId>jboss-seam</artifactId> | ||
434 | + </ejbModule> | ||
435 | + | ||
436 | + </modules> | ||
437 | + </configuration> | ||
438 | + </plugin> | ||
439 | + </plugins> | ||
440 | + | ||
441 | + </build> | ||
442 | + | ||
443 | +</project> |
ear/src/main/resources/seam-refimpl-ds.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | + | ||
3 | +<!DOCTYPE datasources | ||
4 | + PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN" | ||
5 | + "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"> | ||
6 | + | ||
7 | +<datasources> | ||
8 | + <local-tx-datasource> | ||
9 | + <jndi-name>${ds.jndi.name}</jndi-name> | ||
10 | + <use-java-context>true</use-java-context> | ||
11 | + <connection-url>${ds.connection.url}</connection-url> | ||
12 | + <driver-class>${ds.driver.class}</driver-class> | ||
13 | + <user-name>${ds.user.name}</user-name> | ||
14 | + <password>${ds.password}</password> | ||
15 | + </local-tx-datasource> | ||
16 | +</datasources> | ||
17 | + | ||
18 | + | ||
19 | +<!-- | ||
20 | +The three transaction types you can use are: | ||
21 | + | ||
22 | + local-tx-datasource : Identifies a data source that uses transactions, even distributed | ||
23 | + transactions within the local application server, but does not use | ||
24 | + distributed transactions among multiple application servers. | ||
25 | + | ||
26 | + no-tx-datasource : Identifies a data source that does not use transactions. This option is not | ||
27 | + shown in the example, but would appear in place of the <local-tx-datasource> | ||
28 | + tag. | ||
29 | + | ||
30 | + xa-datasource : Identifies a data source that uses distributed transaction among multiple | ||
31 | + application servers. This option is not shown in the example, but would | ||
32 | + appear in place of the <local-tx-datasource> tag. | ||
33 | + | ||
34 | + So which transaction type should you use? In most cases you will use | ||
35 | + <local-tx-datasource> because it handles transactions within a single | ||
36 | + application server. If you are clustering your application servers, or want | ||
37 | + to use distributed transactions among multiple application servers, then you | ||
38 | + should use <xa-datasource>. Note that both <local-tx-datasource> and | ||
39 | + <xa-datasource> handle distributed transactions which involve multiple | ||
40 | + datasources. The difference is that <local-tx-datasource> handles them only | ||
41 | + within a single running application server, while <xa-datasource> handles | ||
42 | + them among many running application servers. On the other end of the | ||
43 | + spectrum, if your applications only read from the database, then using | ||
44 | + <no-tx-datasource> would be appropriate. | ||
45 | + | ||
46 | + WHAT IS XA? | ||
47 | + XA is an API defined by The Open Group's Distributed Transaction Processing | ||
48 | + model. This model provides communications mechanisms between a Transaction | ||
49 | + Monitor and several resource managers which perform updates against | ||
50 | + databases. The Transaction Monitor is responsible for coordinating the | ||
51 | + individual transactions handled by the resource managers to ensure | ||
52 | + transactional semantics when multiple resource managers are involved in a | ||
53 | + single transaction. | ||
54 | + | ||
55 | + | ||
56 | +Within the transaction type, you can specify a wide variety of configuration options. The following | ||
57 | +describes the various configuration options in the *-ds.xml file. A complete set of configuration | ||
58 | +options, along with a description of each option, can be found in the docs/dtd/jboss-ds_1_5.dtd file. | ||
59 | + | ||
60 | + jndi-name : The name used to reference the data source in your application configurations. | ||
61 | + The name is used to look up the data source in the JNDI namespace. The | ||
62 | + "java:" prefix is automatically added to this name, so datasources are not | ||
63 | + available outside the virtual machine. | ||
64 | + | ||
65 | + use-java-context : When the value of this element is false, you don't use the java:/ prefix on | ||
66 | + the JNDI name. | ||
67 | + <use-java-context>true</use-java-context> => JNDI name is java:/dataSourceName | ||
68 | + <use-java-context>false</use-java-context> => JNDI name is dataSourceName | ||
69 | + Note that when this element is excluded, the default value is true | ||
70 | + (in which case you use the java:/ prefix). | ||
71 | + | ||
72 | + connection-url : The database-specific URL to the server. | ||
73 | + | ||
74 | + driver-class : The driver you are using for your database. | ||
75 | + | ||
76 | + xa-datasource-class : The class name for the distributed transaction data source. | ||
77 | + Valid only for xa-datasource | ||
78 | + | ||
79 | + user-name : The username that is defined to access this data source. In general, | ||
80 | + do not use the root username. | ||
81 | + | ||
82 | + password : The password for the corresponding username. | ||
83 | + | ||
84 | + min-pool-size : The starting pool size for the number of database connections to be allowed | ||
85 | + by the application server, default=0. Note that the application server does | ||
86 | + not open any connections until the first request for a connection, at which | ||
87 | + time it opens this many connections. One way of forcing the connections to be | ||
88 | + established when the application server is started is to write a simple | ||
89 | + service that does nothing but ask for a connection. | ||
90 | + | ||
91 | + max-pool-size : The maximum number of open connections maintained by the application server, | ||
92 | + default=20. If the application server runs out of connections, it allocates | ||
93 | + a new connection to fulfill that request, until it hits the maximum number of | ||
94 | + connections. At that point it queues the requests until connections are freed. | ||
95 | + Therefore, it is very important that applications close any connections that | ||
96 | + they obtain. | ||
97 | + NOTE: The max-pool-zize value must not exceed the max-connections porperty | ||
98 | + value in MySql. | ||
99 | + | ||
100 | + idle-timeout-minutes: The amount of time before the connection times out. | ||
101 | + If a surplus connection is not in use for this many minutes, then that | ||
102 | + connection is closed. Note that the number of open connections never goes | ||
103 | + below the <min-pool-size>, default=0 | ||
104 | + blocking-timeout- | ||
105 | + millis : The amount of time a thread waits on a connection, if all of the connections | ||
106 | + are in use and the maximum connections have been allocated. On a timeout | ||
107 | + the requestor will gett an exception. | ||
108 | + | ||
109 | + track-statements : A Boolean (true/false) that has the data source monitor for unclosed | ||
110 | + Statements or ResultSets when the connection is returned to the pool, this | ||
111 | + is a debugging feature that should be turned off in production. | ||
112 | + | ||
113 | + new-connection-sql : An sql statement that is executed against each new connection. | ||
114 | + This can be used to set the connection schema, etc. | ||
115 | + check-valid- | ||
116 | + connection-sql : Identifies a SQL to be executed when the connection is established to | ||
117 | + verify that the connection is valid, e.g. SELECT 1 | ||
118 | + JBoss will run the SQL statement before handing out the connection from | ||
119 | + the pool. If the SQL fails, the connection will be destroyed/closed and | ||
120 | + new ones will be created. | ||
121 | + MySQLValidConnectionChecker is preferred for newer drivers. This will be run | ||
122 | + before a managed connection is removed from the pool for use by a client. | ||
123 | + See: valid-connection-checker-class-name | ||
124 | + valid-connection- | ||
125 | + checker-class-name : A class that determines if a connection is valid before it is handed out | ||
126 | + from the pool. Should only be used on drivers after 3.22.1 with "ping" | ||
127 | + support. The class specified must implement the | ||
128 | + org.jboss.resource.adapter.jdbc.ValidConnectionChecker interface. Use this | ||
129 | + option instead of check-valid-connection-sql when you want to use more than | ||
130 | + a single SQL statement to check the validity of the connection. Be aware | ||
131 | + that any application making a connection request that causes a connection to | ||
132 | + be established must wait until the connection checker is finished | ||
133 | + For MySql the class name is: | ||
134 | + org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker | ||
135 | + exception-sorter- | ||
136 | + class-name : Identifies a class used to determine if an error number returned by the | ||
137 | + database is fatal. For MySql the class name is: | ||
138 | + org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter | ||
139 | + | ||
140 | + type-mapping : Used by the container-managed persistence (CMP) code to identify the | ||
141 | + database and adjust its database handling accordingly. The name use | ||
142 | + must match one of the names in the standardjbosscmp-jdbc.xml file. | ||
143 | + Additionally, you can add new entries to the standardjbosscmp-jdbc.xml | ||
144 | + to customize the database interaction. | ||
145 | + NOTE that this is used ONLY for EJB 2.1, NOT for EJB 3. | ||
146 | + | ||
147 | + config-property: Identifies a property to pass to the java.sql.Driver when establishing a | ||
148 | + database connection. Refer to the documentation for your JDBC driver for the | ||
149 | + valid properties. You can provide multiple config-property entries. Valid | ||
150 | + only for local-tx-datasource and no-tx-datasource. | ||
151 | + xa-datasource- | ||
152 | + property : Identifies a property to pass to the javax.sql.DataSource when establishing | ||
153 | + a database connection. Refer to the documentation for the JDBC driver for | ||
154 | + the valid properties. You can provide multiple xa-datasource-property | ||
155 | + entries. Valid only for xa-datasource. | ||
156 | + prepared-statement- | ||
157 | + cache-size : The number of prepared statements to hold in the cache, default=0 | ||
158 | + | ||
159 | + share-prepared- | ||
160 | + statements : If a request creates the same prepared statement more than once in a | ||
161 | + given request, should the same prepared statement object be used. Note | ||
162 | + that reusing the prepared statement in this case could cause the | ||
163 | + application to get unintended results if the application requested the result | ||
164 | + set from the first prepared statement after creating the second prepared | ||
165 | + statement, default=false | ||
166 | + transaction- | ||
167 | + isolation : Specifies the java.sql.Connection transaction isolation level to use, | ||
168 | + unspecified means use the default provided by the database. | ||
169 | + The constants defined in the Connection interface are the possible element | ||
170 | + content values and include: | ||
171 | + TRANSACTION_READ_UNCOMMITTED | ||
172 | + TRANSACTION_READ_COMMITTED | ||
173 | + TRANSACTION_REPEATABLE_READ | ||
174 | + TRANSACTION_SERIALIZABLE | ||
175 | + TRANSACTION_NONE | ||
176 | + | ||
177 | + Refer to your database JDBC documentation for a description of each level | ||
178 | + and which levels your database supports. | ||
179 | + | ||
180 | + Notes for MySql: | ||
181 | + * Use UTF8 charset when creating the database: | ||
182 | + CREATE DATABASE my_database CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT CHARSET utf8; | ||
183 | + | ||
184 | + * Use InnoDb for tables | ||
185 | + In persistence.xml add this property for hbm2ddl: | ||
186 | + <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/> | ||
187 | + | ||
188 | + or if you creates the tables by writing the SQL DDL by hand (you little machocist:): | ||
189 | + CREATE TABLE `my_database`.`my_table` ( | ||
190 | + `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, | ||
191 | + `text` VARCHAR(256) NOT NULL DEFAULT '', | ||
192 | + PRIMARY KEY (`id`) | ||
193 | + ) ENGINE = InnoDB; | ||
194 | + | ||
195 | + | ||
196 | + MySql example: | ||
197 | + | ||
198 | + <local-tx-datasource> | ||
199 | + | ||
200 | + <jndi-name>seam-refimplDatasource</jndi-name> | ||
201 | + <connection-url>jdbc:mysql://localhost/refimpl_db?characterEncoding=UTF-8</connection-url> | ||
202 | + <driver-class>com.mysql.jdbc.Driver</driver-class> | ||
203 | + <user-name>root</user-name> | ||
204 | + <password></password> | ||
205 | + | ||
206 | + <min-pool-size>20</min-pool-size> | ||
207 | + | ||
208 | + // Make sure your MySQL config has that many max_connections! | ||
209 | + This is the max_threads in default Tomcat server.xml on JBoss AS. // | ||
210 | + <max-pool-size>250</max-pool-size> | ||
211 | + | ||
212 | + <blocking-timeout-millis>5000</blocking-timeout-millis> | ||
213 | + | ||
214 | + // Needs to be smaller than wait_timeout (which is in seconds) in /etc/my.cnf! // | ||
215 | + <idle-timeout-minutes>2</idle-timeout-minutes> | ||
216 | + | ||
217 | + // These are the secret ingredients that make it stable! A simple check-valid-connection-sql won't be enough! // | ||
218 | + <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name> | ||
219 | + <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name> | ||
220 | + | ||
221 | + </local-tx-datasource> | ||
222 | + | ||
223 | +--> |
ejb/pom.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project | ||
3 | + xmlns="http://maven.apache.org/POM/4.0.0" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
6 | + | ||
7 | + <modelVersion>4.0.0</modelVersion> | ||
8 | + <parent> | ||
9 | + <groupId>no.knowit.seam</groupId> | ||
10 | + <artifactId>seam-refimpl</artifactId> | ||
11 | + <version>1.0-SNAPSHOT</version> | ||
12 | + <relativePath>../pom.xml</relativePath> | ||
13 | + </parent> | ||
14 | + | ||
15 | + <artifactId>seam-refimpl-ejb</artifactId> <!-- m2eclipse does not like: ${app.context}-ear --> | ||
16 | + <name>${project.artifactId} : ${project.version}</name> | ||
17 | + <description>The Seam Maven reference implementation EJB module</description> | ||
18 | + <packaging>ejb</packaging> | ||
19 | + | ||
20 | + <profiles> | ||
21 | + <!-- | ||
22 | + More than one profile can be active at once. Since profiles can contain the same types of | ||
23 | + configuration there can be clashes. If two profiles clash the last to be activated will | ||
24 | + override configurations in those activated earlier. | ||
25 | + Note: Any activeByDefault profile will be deactivated if you activate another profile. | ||
26 | + E.g. running "mvn install -Penv-dev" deactivates the "prod" profile. | ||
27 | + --> | ||
28 | + <profile> | ||
29 | + <id>env-dev</id> | ||
30 | + <properties> | ||
31 | + <env>dev</env> | ||
32 | + </properties> | ||
33 | + </profile> | ||
34 | + | ||
35 | + <profile> | ||
36 | + <id>env-prod</id> | ||
37 | + <activation> | ||
38 | + <activeByDefault>true</activeByDefault> | ||
39 | + </activation> | ||
40 | + <properties> | ||
41 | + <env>prod</env> | ||
42 | + </properties> | ||
43 | + </profile> | ||
44 | + | ||
45 | + <profile> | ||
46 | + <id>explode</id> | ||
47 | + <build> | ||
48 | + <plugins> | ||
49 | + <plugin> | ||
50 | + <artifactId>maven-antrun-plugin</artifactId> | ||
51 | + <executions> | ||
52 | + <execution> | ||
53 | + <id>ejb-process-classes</id> | ||
54 | + <phase>process-classes</phase> | ||
55 | + <goals> | ||
56 | + <goal>run</goal> | ||
57 | + </goals> | ||
58 | + <configuration> | ||
59 | + <tasks> | ||
60 | + <property | ||
61 | + name="deploy-path" | ||
62 | + value="${as.deploy}/${app.context}-ear.ear" /> | ||
63 | + <copy | ||
64 | + todir="${deploy-path}/${project.build.finalName}.jar" | ||
65 | + verbose="true"> | ||
66 | + <fileset dir="${project.build.outputDirectory}"> | ||
67 | + <include name="**/*.class" /> | ||
68 | + </fileset> | ||
69 | + </copy> | ||
70 | + </tasks> | ||
71 | + </configuration> | ||
72 | + </execution> | ||
73 | + </executions> | ||
74 | + </plugin> | ||
75 | + </plugins> | ||
76 | + </build> | ||
77 | + </profile> | ||
78 | + </profiles> | ||
79 | + | ||
80 | + <dependencies> | ||
81 | + <dependency> | ||
82 | + <groupId>no.knowit.seam</groupId> | ||
83 | + <artifactId>seam-utils-ejb</artifactId> | ||
84 | + <type>ejb</type> | ||
85 | + <scope>test</scope> | ||
86 | + </dependency> | ||
87 | + <dependency> | ||
88 | + <groupId>no.knowit.seam</groupId> | ||
89 | + <artifactId>seam-utils-openejb</artifactId> | ||
90 | + <type>ejb</type> | ||
91 | + <scope>test</scope> | ||
92 | + </dependency> | ||
93 | + </dependencies> | ||
94 | + | ||
95 | + <build> | ||
96 | + <!-- | ||
97 | + Maven filter properties are ony visible to | ||
98 | + resources and can not be accessed from the POM. | ||
99 | + | ||
100 | + <filters> | ||
101 | + <filter>../src/main/filters/filter-${env}.properties</filter> | ||
102 | + </filters> | ||
103 | + --> | ||
104 | + | ||
105 | + <resources> | ||
106 | + <resource> | ||
107 | + <directory>src/main/resources</directory> | ||
108 | + <filtering>true</filtering> <!-- filtering persistence.xml --> | ||
109 | + </resource> | ||
110 | + </resources> | ||
111 | + | ||
112 | + <testResources> | ||
113 | + <testResource> | ||
114 | + <directory>src/test/resources</directory> | ||
115 | + <filtering>true</filtering> | ||
116 | + </testResource> | ||
117 | + <testResource> | ||
118 | + <directory>src/test/resources-openejb</directory> | ||
119 | + <filtering>true</filtering> | ||
120 | + </testResource> | ||
121 | + </testResources> | ||
122 | + | ||
123 | + <plugins> | ||
124 | + <!-- | ||
125 | + Maven filter properties are ony visible to resources and can not be | ||
126 | + accessed from the POM. This is where the Properties Maven Plugin makes | ||
127 | + our life a little easier when dealing with properties that we need to | ||
128 | + access inside our POM. It provides goals to read and write properties | ||
129 | + from and to files, and also to set system properties. It's main use-case | ||
130 | + is loading properties from files instead of declaring them in pom.xml, | ||
131 | + something that comes in handy when dealing with different environments. | ||
132 | + The plugin is configured to read properties during the "validate" phase | ||
133 | + and the properties are then accessible from the pom. | ||
134 | + --> | ||
135 | + <plugin> | ||
136 | + <groupId>org.codehaus.mojo</groupId> | ||
137 | + <artifactId>properties-maven-plugin</artifactId> | ||
138 | + <executions> | ||
139 | + <execution> | ||
140 | + <configuration> | ||
141 | + <files> | ||
142 | + <file>${basedir}/../src/main/filters/filter-${env}.properties</file> | ||
143 | + </files> | ||
144 | + </configuration> | ||
145 | + </execution> | ||
146 | + </executions> | ||
147 | + </plugin> | ||
148 | + | ||
149 | + <plugin> | ||
150 | + <groupId>org.apache.maven.plugins</groupId> | ||
151 | + <artifactId>maven-surefire-plugin</artifactId> | ||
152 | + <configuration> | ||
153 | + <suiteXmlFiles> | ||
154 | + <suiteXmlFile> | ||
155 | + testng.xml | ||
156 | + </suiteXmlFile> | ||
157 | + </suiteXmlFiles> | ||
158 | + </configuration> | ||
159 | + </plugin> | ||
160 | + | ||
161 | + <plugin> | ||
162 | + <groupId>org.apache.maven.plugins</groupId> | ||
163 | + <artifactId>maven-ejb-plugin</artifactId> | ||
164 | + <configuration> | ||
165 | + <archive> | ||
166 | + <manifestEntries> | ||
167 | + <Build-Date>${timestamp}</Build-Date> | ||
168 | + <Build-Revision>${buildNumber}</Build-Revision> | ||
169 | + <Mode>${env}</Mode> | ||
170 | + </manifestEntries> | ||
171 | + </archive> | ||
172 | + </configuration> | ||
173 | + </plugin> | ||
174 | + </plugins> | ||
175 | + </build> | ||
176 | + | ||
177 | +</project> |
1 | +package no.knowit.seam.example.action; | ||
2 | + | ||
3 | +import no.knowit.seam.example.model.Movie; | ||
4 | + | ||
5 | +import org.jboss.seam.annotations.Name; | ||
6 | +import org.jboss.seam.annotations.security.Restrict; | ||
7 | +import org.jboss.seam.framework.EntityHome; | ||
8 | + | ||
9 | +@Name("movieHome") | ||
10 | +public class MovieHome extends EntityHome<Movie> { | ||
11 | + | ||
12 | + private static final long serialVersionUID = 1L; | ||
13 | + | ||
14 | + public void setMovieId(Integer id) { | ||
15 | + setId(id); | ||
16 | + } | ||
17 | + | ||
18 | + public Integer getMovieId() { | ||
19 | + return (Integer) getId(); | ||
20 | + } | ||
21 | + | ||
22 | + @Override | ||
23 | + protected Movie createInstance() { | ||
24 | + Movie movie = new Movie(); | ||
25 | + return movie; | ||
26 | + } | ||
27 | + | ||
28 | + public void load() { | ||
29 | + if (isIdDefined()) { | ||
30 | + wire(); | ||
31 | + } | ||
32 | + } | ||
33 | + | ||
34 | + public void wire() { | ||
35 | + getInstance(); | ||
36 | + } | ||
37 | + | ||
38 | + public boolean isWired() { | ||
39 | + return true; | ||
40 | + } | ||
41 | + | ||
42 | + public Movie getDefinedInstance() { | ||
43 | + return isIdDefined() ? getInstance() : null; | ||
44 | + } | ||
45 | + | ||
46 | + @Override | ||
47 | + @Restrict("#{identity.loggedIn}") | ||
48 | + public String persist() { | ||
49 | + return super.persist(); | ||
50 | + } | ||
51 | + | ||
52 | + @Override | ||
53 | + @Restrict("#{identity.loggedIn}") | ||
54 | + public String update() { | ||
55 | + return super.update(); | ||
56 | + } | ||
57 | + | ||
58 | + @Override | ||
59 | + @Restrict("#{identity.loggedIn}") | ||
60 | + public String remove() { | ||
61 | + return super.remove(); | ||
62 | + } | ||
63 | +} |
1 | +package no.knowit.seam.example.action; | ||
2 | + | ||
3 | +import java.util.Arrays; | ||
4 | + | ||
5 | +import no.knowit.seam.example.model.Movie; | ||
6 | + | ||
7 | +import org.jboss.seam.annotations.Name; | ||
8 | +import org.jboss.seam.framework.EntityQuery; | ||
9 | + | ||
10 | +@Name("movieList") | ||
11 | +public class MovieList extends EntityQuery<Movie> { | ||
12 | + | ||
13 | + private static final long serialVersionUID = 1L; | ||
14 | + private static final String EJBQL = "select movie from Movie movie"; | ||
15 | + | ||
16 | + private static final String[] RESTRICTIONS = { | ||
17 | + "lower(movie.title) like lower(concat(#{movieList.movie.title},'%'))", | ||
18 | + "lower(movie.director) like lower(concat(#{movieList.movie.director},'%'))", }; | ||
19 | + | ||
20 | + private Movie movie = new Movie(); | ||
21 | + | ||
22 | + public MovieList() { | ||
23 | + setEjbql(EJBQL); | ||
24 | + setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS)); | ||
25 | + setMaxResults(25); | ||
26 | + } | ||
27 | + | ||
28 | + public Movie getMovie() { | ||
29 | + return movie; | ||
30 | + } | ||
31 | +} |
1 | +package no.knowit.seam.example.model; | ||
2 | + | ||
3 | +import static javax.persistence.GenerationType.IDENTITY; | ||
4 | + | ||
5 | +import javax.persistence.Column; | ||
6 | +import javax.persistence.Entity; | ||
7 | +import javax.persistence.GeneratedValue; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Lob; | ||
10 | +import javax.persistence.Version; | ||
11 | + | ||
12 | +import org.hibernate.validator.Length; | ||
13 | +import org.hibernate.validator.NotNull; | ||
14 | + | ||
15 | +@Entity | ||
16 | +public class Movie implements java.io.Serializable { | ||
17 | + | ||
18 | + private static final long serialVersionUID = 1L; | ||
19 | + | ||
20 | + @Id | ||
21 | + @GeneratedValue(strategy = IDENTITY) | ||
22 | + private Integer id; | ||
23 | + | ||
24 | + @Version | ||
25 | + private Long version; | ||
26 | + | ||
27 | + @org.hibernate.annotations.Index(name="idx_director") | ||
28 | + @Column(nullable = false, length = 50) | ||
29 | + @NotNull | ||
30 | + @Length(max = 50) | ||
31 | + private String director; | ||
32 | + | ||
33 | + @Column(unique = true, nullable = false, length = 60) | ||
34 | + @NotNull | ||
35 | + @Length(max = 60) | ||
36 | + private String title; | ||
37 | + | ||
38 | + @Column(nullable = false) | ||
39 | + @NotNull | ||
40 | + private Integer year; | ||
41 | + | ||
42 | + @Lob | ||
43 | + private String plot; | ||
44 | + | ||
45 | + public Movie() { | ||
46 | + } | ||
47 | + | ||
48 | + public Movie(final String director, final String title, Integer year) { | ||
49 | + this.director = director; | ||
50 | + this.title = title; | ||
51 | + this.year = year; | ||
52 | + } | ||
53 | + | ||
54 | + public Movie(final String director, final String title, Integer year, final String plot) { | ||
55 | + this.director = director; | ||
56 | + this.title = title; | ||
57 | + this.year = year; | ||
58 | + this.plot = plot; | ||
59 | + } | ||
60 | + | ||
61 | + public Integer getId() { | ||
62 | + return this.id; | ||
63 | + } | ||
64 | + | ||
65 | + public void setId(Integer id) { | ||
66 | + this.id = id; | ||
67 | + } | ||
68 | + | ||
69 | + public Long getVersion() { | ||
70 | + return this.version; | ||
71 | + } | ||
72 | + | ||
73 | + public void setVersion(Long version) { | ||
74 | + this.version = version; | ||
75 | + } | ||
76 | + | ||
77 | + public String getDirector() { | ||
78 | + return this.director; | ||
79 | + } | ||
80 | + | ||
81 | + public void setDirector(final String director) { | ||
82 | + this.director = director; | ||
83 | + } | ||
84 | + | ||
85 | + public String getTitle() { | ||
86 | + return this.title; | ||
87 | + } | ||
88 | + | ||
89 | + public void setTitle(final String title) { | ||
90 | + this.title = title; | ||
91 | + } | ||
92 | + | ||
93 | + public Integer getYear() { | ||
94 | + return this.year; | ||
95 | + } | ||
96 | + | ||
97 | + public void setYear(Integer year) { | ||
98 | + this.year = year; | ||
99 | + } | ||
100 | + | ||
101 | + public String getPlot() { | ||
102 | + return this.plot; | ||
103 | + } | ||
104 | + | ||
105 | + public void setPlot(final String plot) { | ||
106 | + this.plot = plot; | ||
107 | + } | ||
108 | + | ||
109 | +} |
1 | +package no.knowit.seam.example.security; | ||
2 | + | ||
3 | +import javax.ejb.Stateless; | ||
4 | + | ||
5 | + | ||
6 | +import org.jboss.seam.annotations.In; | ||
7 | +import org.jboss.seam.annotations.Logger; | ||
8 | +import org.jboss.seam.annotations.Name; | ||
9 | +import org.jboss.seam.log.Log; | ||
10 | +import org.jboss.seam.security.Credentials; | ||
11 | +import org.jboss.seam.security.Identity; | ||
12 | + | ||
13 | +@Stateless | ||
14 | +@Name("authenticator") | ||
15 | +public class AuthenticatorBean implements Authenticator { | ||
16 | + @Logger | ||
17 | + private Log log; | ||
18 | + @In | ||
19 | + Identity identity; | ||
20 | + @In | ||
21 | + Credentials credentials; | ||
22 | + | ||
23 | + public boolean authenticate() { | ||
24 | + log.info("Authenticating '{0}'", credentials.getUsername()); | ||
25 | + | ||
26 | + // write your authentication logic here, | ||
27 | + // return true if the authentication was | ||
28 | + // successful, false otherwise | ||
29 | + if ("admin".equals(credentials.getUsername())) { | ||
30 | + identity.addRole("admin"); | ||
31 | + return true; | ||
32 | + } | ||
33 | + return false; | ||
34 | + } | ||
35 | +} |
ejb/src/main/resources/META-INF/MANIFEST.MF
0 → 100644
ejb/src/main/resources/META-INF/ejb-jar.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<ejb-jar version="3.0" | ||
3 | + xmlns="http://java.sun.com/xml/ns/javaee" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" | ||
6 | +> | ||
7 | + | ||
8 | + <interceptors> | ||
9 | + <interceptor> | ||
10 | + <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> | ||
11 | + </interceptor> | ||
12 | + </interceptors> | ||
13 | + | ||
14 | + <assembly-descriptor> | ||
15 | + <interceptor-binding> | ||
16 | + <ejb-name>*</ejb-name> | ||
17 | + <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class> | ||
18 | + </interceptor-binding> | ||
19 | + </assembly-descriptor> | ||
20 | + | ||
21 | +</ejb-jar> |
ejb/src/main/resources/META-INF/orm.xml
0 → 100644
1 | +<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" | ||
2 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | + xsi:schemaLocation=" | ||
4 | + http://java.sun.com/xml/ns/persistence/orm | ||
5 | + http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" | ||
6 | + version="1.0"> | ||
7 | + | ||
8 | + <!-- Enable for security checks on entity CRUD operations --> | ||
9 | + <!-- | ||
10 | + <persistence-unit-metadata> | ||
11 | + <persistence-unit-defaults> | ||
12 | + <entity-listeners> | ||
13 | + <entity-listener class="org.jboss.seam.security.EntitySecurityListener"/> | ||
14 | + </entity-listeners> | ||
15 | + </persistence-unit-defaults> | ||
16 | + </persistence-unit-metadata> | ||
17 | + --> | ||
18 | +</entity-mappings> | ||
19 | + |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<persistence version="1.0" | ||
3 | + xmlns="http://java.sun.com/xml/ns/persistence" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | ||
6 | + http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" | ||
7 | +> | ||
8 | + | ||
9 | + <persistence-unit name="${pu.name}" transaction-type="JTA"> | ||
10 | + <provider>org.hibernate.ejb.HibernatePersistence</provider> | ||
11 | + <jta-data-source>${pu.jta.data.source}</jta-data-source> | ||
12 | + <!-- <non-jta-data-source>${pu.jta.data.source}Unmanaged</non-jta-data-source> --> | ||
13 | + | ||
14 | + <properties> | ||
15 | + <property name="hibernate.dialect" value="${pu.hibernate.dialect}" /> | ||
16 | + <property name="hibernate.hbm2ddl.auto" value="${pu.hibernate.hbm2ddl.auto}" /> | ||
17 | + <property name="hibernate.default_batch_fetch_size" value="${pu.hibernate.default_batch_fetch_size}" /> | ||
18 | + <property name="hibernate.show_sql" value="${pu.hibernate.show_sql}" /> | ||
19 | + <property name="hibernate.format_sql" value="true" /> | ||
20 | + | ||
21 | + <!-- Encoding --> | ||
22 | + <property name="hibernate.connection.useUnicode" value="true" /> | ||
23 | + <property name="hibernate.connection.characterEncoding" value="UTF-8" /> | ||
24 | + | ||
25 | + <!-- These are the default for JBoss EJB3, but not for HEM: --> | ||
26 | + <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" /> | ||
27 | + <property name="hibernate.transaction.manager_lookup_class" value="${pu.hibernate.transaction.manager_lookup_class}" /> | ||
28 | + | ||
29 | + <!-- | ||
30 | + Binds the EntityManagerFactory to JNDI where Seam can look it up. | ||
31 | + This is only relevant when the container automatically loads the persistence unit, | ||
32 | + as is the case in JBoss AS 5. | ||
33 | + --> | ||
34 | + <property name="jboss.entity.manager.factory.jndi.name" value="${pu.jboss.entity.manager.factory.jndi.name}" /> | ||
35 | + </properties> | ||
36 | + | ||
37 | + <!-- | ||
38 | + If the persistence.xml file is not under the same root directory or jar than your domain | ||
39 | + model then use the <jar-file> element to point to the jar containing your domain model. | ||
40 | + <jar-file>../../vehicles.jar</jar-file> | ||
41 | + --> | ||
42 | + </persistence-unit> | ||
43 | + | ||
44 | +</persistence> | ||
45 | + | ||
46 | +<!-- | ||
47 | + The persistence.xml file configures the back-end database source for the EntityManager and is the | ||
48 | + standard deployment descriptor used to configure a JPA persistence context. | ||
49 | + see: http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/configuration.html | ||
50 | + see: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html | ||
51 | + | ||
52 | + persistence-unit : | ||
53 | + name : Every entity manager must have a name. | ||
54 | + transaction-type : Transaction type used. Either JTA or RESOURCE_LOCAL (default to JTA in a | ||
55 | + JavaEE environment and to RESOURCE_LOCAL in a JavaSE environment). | ||
56 | + When a jta-datasource is used, the default is JTA, if non-jta-datasource is | ||
57 | + used, RESOURCE_LOCAL is used. | ||
58 | + | ||
59 | + provider : The provider only needs to be set if you use several JPA providers, eg. | ||
60 | + org.hibernate.ejb.HibernatePersistence | ||
61 | + | ||
62 | + jta-data-source, | ||
63 | + non-jta-data-source : This is the JNDI name of where the javax.sql.DataSource is located. When | ||
64 | + running without a JNDI available Datasource, you must specify JDBC | ||
65 | + connections with Hibernate specific properties (see below). | ||
66 | + | ||
67 | + mapping-file : The class element specifies a EJB3 compliant XML mapping file that you will | ||
68 | + map. The file has to be in the classpath. As per the EJB3 specification, | ||
69 | + Hibernate EntityManager will try to load the mapping file located in the jar | ||
70 | + file at META_INF/orm.xml. Of course any explicit mapping file will be loaded | ||
71 | + too. As a matter of fact, you can provides any XML file in the mapping file | ||
72 | + element ie. either hbm files or EJB3 deployment descriptor. | ||
73 | + | ||
74 | + jar-file : The jar-file elements specifies a jar to analyse. All properly annotated | ||
75 | + classes, annotated packages and all hbm.xml files part of this jar file will | ||
76 | + be added to the persistence unit configuration. This element is mainly used | ||
77 | + in Java EE environment. Use of this one in Java SE should be considered as | ||
78 | + non portable, in this case a absolute url is needed. You can alternatively | ||
79 | + point to a directory (This is especially useful when in your test | ||
80 | + environment, the persistence.xml file is not under the same root directory | ||
81 | + or jar than your domain model). | ||
82 | + <jar-file>file:/home/turin/work/local/lab8/build/classes</jar-file> | ||
83 | + | ||
84 | + exclude-unlisted- | ||
85 | + classes : Do not check the main jar file for annotated classes. Only explicit classes | ||
86 | + will be part of the persistence unit. | ||
87 | + | ||
88 | + class : The class element specifies a fully qualified class name that you will map. | ||
89 | + By default all properly annotated classes and all hbm.xml files found inside | ||
90 | + the archive are added to the persistence unit configuration. You can add | ||
91 | + some external entity through the class element though. As an extension to | ||
92 | + the specification, you can add a package name in the <class> element | ||
93 | + (eg <class>org.hibernate.eg</class>). Caution, the package will include the | ||
94 | + metadata defined at the package level (ie in package-info.java), it will not | ||
95 | + include all the classes of a given package. This is required to be spec | ||
96 | + compliant, Hibernate however supports auto-detection even in JSE. | ||
97 | + | ||
98 | + properties : The properties element is used to specify vendor specific properties. This | ||
99 | + is where you will define your Hibernate specific configurations. This is | ||
100 | + also where you will have to specify JDBC connection information as well. | ||
101 | + see: http://www.hibernate.org/hib_docs/reference/en/html/configuration-optional.html | ||
102 | + | ||
103 | + | ||
104 | + Hibernate Configuration Properties: | ||
105 | + see: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html | ||
106 | + =================================== | ||
107 | + hibernate-dialect : The classname of a Hibernate org.hibernate.dialect.Dialect which | ||
108 | + allows Hibernate to generate SQL optimized for a particular relational | ||
109 | + database. You should always set the hibernate.dialect property to the | ||
110 | + correct org.hibernate.dialect.Dialect subclass for your database. If | ||
111 | + you specify a dialect, Hibernate will use sensible defaults for some | ||
112 | + of the other properties listed here, saving you the effort of | ||
113 | + specifying them manually. | ||
114 | + For MySql use one of the following: | ||
115 | + MySQL org.hibernate.dialect.MySQLDialect | ||
116 | + MySQL5 org.hibernate.dialect.MySQL5Dialect | ||
117 | + MySQL with InnoDB org.hibernate.dialect.MySQLInnoDBDialect | ||
118 | + MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect | ||
119 | + | ||
120 | + hibernate.show_sql : Write all SQL statements to console. This is an alternative to setting | ||
121 | + the log category org.hibernate.SQL to debug. eg. true | false | ||
122 | + | ||
123 | + hibernate.format_sql : Pretty print the SQL in the log and console. eg. true | false | ||
124 | + | ||
125 | + hibernate.default_schema: Qualify unqualified table names with the given schema/tablespace in | ||
126 | + generated SQL. eg. SCHEMA_NAME | ||
127 | + hibernate. | ||
128 | + default_catalog : Qualify unqualified table names with the given catalog in generated | ||
129 | + SQL. eg. CATALOG_NAME | ||
130 | + hibernate. | ||
131 | + session_factory_name : The org.hibernate.SessionFactory will be automatically bound to this | ||
132 | + name in JNDI after it has been created. | ||
133 | + e.g. jndi/composite/name | ||
134 | + hibernate. | ||
135 | + generate_statistics : If enabled, Hibernate will collect statistics useful for performance | ||
136 | + tuning. eg. true | false | ||
137 | + hibernate. | ||
138 | + use_sql_comments : If turned on, Hibernate will generate comments inside the SQL, for | ||
139 | + easier debugging, defaults to false. eg. true | false | ||
140 | + hibernate.archive. | ||
141 | + autodetection : Scan for annotated classes and Hibernate mapping XML files, | ||
142 | + eg. class, hbm | ||
143 | + | ||
144 | + | ||
145 | + Hibernate JDBC and Connection Properties: | ||
146 | + ========================================= | ||
147 | + hibernate. | ||
148 | + default_batch_fetch_size: Sets a default size for Hibernate batch fetching of associations. | ||
149 | + e.g. recommended values 4, 8, 16 (SiA-p417). | ||
150 | + | ||
151 | + hibernate.jdbc.charSet : e.g. utf-8 | ||
152 | + | ||
153 | + hibernate.jdbc. | ||
154 | + fetch_size : A non-zero value determines the JDBC fetch size | ||
155 | + (calls Statement.setFetchSize()). | ||
156 | + hibernate.jdbc. | ||
157 | + batch_size : A non-zero value enables use of JDBC2 batch updates by Hibernate. | ||
158 | + eg. recommended values between 5 and 30 | ||
159 | + | ||
160 | + | ||
161 | + hibernate.jdbc. | ||
162 | + batch_versioned_data : Set this property to true if your JDBC driver returns correct row | ||
163 | + counts from executeBatch() (it is usually safe to turn this option on). | ||
164 | + Hibernate will then use batched DML for automatically versioned data. | ||
165 | + Defaults to false. eg. true | false | ||
166 | + | ||
167 | + | ||
168 | + Hibernate Cache Properties: | ||
169 | + =========================== | ||
170 | + The properties prefixed by hibernate.cache allow you to use a process or cluster scoped | ||
171 | + second-level cache system with Hibernate. see: | ||
172 | + http://www.hibernate.org/hib_docs/reference/en/html/performance-cache.html for more details. | ||
173 | + | ||
174 | + hibernate.cache. | ||
175 | + provider_class : The classname of a custom CacheProvider. Default for JBoss EJB3 is: | ||
176 | + org.hibernate.cache.HashtableCacheProvider | ||
177 | + The property needs to be set for running outside of JBoss for testing | ||
178 | + hibernate.cache. | ||
179 | + use_minimal_puts : Optimize second-level cache operation to minimize writes, at the cost | ||
180 | + of more frequent reads. This setting is most useful for clustered | ||
181 | + caches and, in Hibernate3, is enabled by default for clustered cache | ||
182 | + implementations. eg. true|false | ||
183 | + hibernate.cache. | ||
184 | + use_query_cache : Enable the query cache, individual queries still have to be set | ||
185 | + cachable. eg. true|false | ||
186 | + hibernate.cache. | ||
187 | + use_second_level_cache : May be used to completely disable the second level cache, which is | ||
188 | + enabled by default for classes which specify a <cache> mapping. | ||
189 | + eg. true|false | ||
190 | + hibernate.cache. | ||
191 | + query_cache_factory : The classname of a custom QueryCache interface, defaults to the | ||
192 | + built-in StandardQueryCache. eg. classname.of.QueryCache | ||
193 | + hibernate.cache. | ||
194 | + region_prefix : A prefix to use for second-level cache region names. eg. prefix | ||
195 | + | ||
196 | + hibernate.cache. | ||
197 | + use_structured_entries : Forces Hibernate to store data in the second-level cache in a more | ||
198 | + human-friendly format. eg. true|false | ||
199 | + | ||
200 | + hibernate.cache. | ||
201 | + provider_configuration : | ||
202 | + | ||
203 | + | ||
204 | + Hibernate Transaction Properties: | ||
205 | + ================================= | ||
206 | + hibernate.transaction. | ||
207 | + factory_class : The classname of a TransactionFactory to use with Hibernate | ||
208 | + Transaction API (defaults to JDBCTransactionFactory). | ||
209 | + eg. classname.of.TransactionFactory | ||
210 | + hibernate.transaction. | ||
211 | + manager_lookup_class : The classname of a TransactionManagerLookup - required when JVM-level | ||
212 | + caching is enabled or when using hilo generator in a JTA environment. | ||
213 | + eg. classname.of.TransactionManagerLookup. Default for JBoss EJB3 is: | ||
214 | + org.hibernate.transaction.JBossTransactionManagerLookup | ||
215 | + The property needs to be set for running outside of JBoss for testing | ||
216 | + | ||
217 | + hibernate.transaction. | ||
218 | + flush_before_completion : If enabled, the session will be automatically flushed during the | ||
219 | + before completion phase of the transaction. Built-in and automatic | ||
220 | + session context management is preferred, see: | ||
221 | + http://www.hibernate.org/hib_docs/reference/en/html/architecture-current-session.html | ||
222 | + hibernate.transaction. | ||
223 | + auto_close_session : If enabled, the session will be automatically closed during the after | ||
224 | + completion phase of the transaction. Built-in and utomatic session | ||
225 | + context management is preferred, see: | ||
226 | + http://www.hibernate.org/hib_docs/reference/en/html/architecture-current-session.html | ||
227 | + | ||
228 | + Hibernate Search: | ||
229 | + ================= | ||
230 | + @TODO: Document Hibernate Search properties here | ||
231 | + | ||
232 | + | ||
233 | + Miscellaneous Properties: | ||
234 | + ========================= | ||
235 | + hibernate. | ||
236 | + hbm2ddl.auto : Automatically validate or export schema DDL to the database when the | ||
237 | + SessionFactory is created. With create-drop, the database schema will be | ||
238 | + dropped when the SessionFactory is closed explicitly. | ||
239 | + eg. validate | update | create | create-drop | ||
240 | + | ||
241 | + hibernate.ejb.cfgfile : alternatively to <class> and <property> declarations, you can use a | ||
242 | + regular hibernate.cfg.xml file, eg. | ||
243 | + <property name="hibernate.ejb.cfgfile" | ||
244 | + value="/org/hibernate/ejb/test/hibernate.cfg.xml"/> | ||
245 | + | ||
246 | + | ||
247 | + JBoss Configuration Properties: | ||
248 | + =============================== | ||
249 | + jboss.entity.manager. | ||
250 | + factory.jndi.name : Binds the EntityManagerFactory to JNDI where Seam can look it up. | ||
251 | + This is only relevant when the container automatically loads the | ||
252 | + persistence unit, as is the case in JBoss AS 5. | ||
253 | + | ||
254 | + Put the EntityManagerFactory into JNDI so we can use it manually in | ||
255 | + tests, eg. java:/jpaBookingEntityManagerFactory. | ||
256 | + | ||
257 | + (This is an alternative to using the property | ||
258 | + hibernate.transaction.manager_lookup_class ) | ||
259 | +--> |
ejb/src/main/resources/META-INF/security.drl
0 → 100644
1 | +package Permissions; | ||
2 | + | ||
3 | +import java.security.Principal; | ||
4 | + | ||
5 | +import org.jboss.seam.security.permission.PermissionCheck; | ||
6 | +import org.jboss.seam.security.Role; | ||
7 | +/****************************************************************************************** | ||
8 | + This rule supports the administration of users and roles using Seam's identity management. | ||
9 | + ******************************************************************************************/ | ||
10 | +rule ManageAccount | ||
11 | + no-loop | ||
12 | + // The first rule in an activation-group to fire will cancel the | ||
13 | + // other rules activations (stop them from firing). The activation | ||
14 | + // group can be any string, as long as the string is identical for | ||
15 | + // all the rules you need to be in the one group. | ||
16 | + activation-group "permissions" | ||
17 | +when | ||
18 | + $perm: PermissionCheck(name == "seam.user" || == "seam.role", granted == false) | ||
19 | + Role(name == "admin") | ||
20 | +then | ||
21 | + $perm.grant(); | ||
22 | +end | ||
23 | +/****************************************************************************************** | ||
24 | + This rules supports the administration of users and roles using Seam's identity management. | ||
25 | + ******************************************************************************************/ |
ejb/src/main/resources/import.sql
0 → 100644
1 | +-- SQL statements which are executed at application startup if hibernate.hbm2ddl.auto is 'create' or 'create-drop' | ||
2 | + | ||
3 | +insert into Movie (version, director, title, year, plot) values (0, 'Joel Coen', 'The Big Lebowski', 1998, '"Dude" Lebowski, mistaken for a millionaire Lebowski, seeks restitution for his ruined rug and enlists his bowling buddies to help get it.') | ||
4 | +insert into Movie (version, director, title, year, plot) values (0, 'Quentin Tarantino', 'Reservoir Dogs', 1992, 'After a simple jewelery heist goes terribly wrong, the surviving criminals begin to suspect that one of them is a police informant.') | ||
5 | +insert into Movie (version, director, title, year, plot) values (0, 'Joel Coen', 'Fargo', 1996, 'Jerry Lundegaard''s inept crime falls apart due to his and his henchmen''s bungling and the persistent police work of pregnant Marge Gunderson.') | ||
6 | +--insert into Movie (version, director, title, year, plot) values (0, 'Alan Parker', 'The Wall', 1992, 'A troubled rock star descends into madness in the midst of his physical and social isolation from everyone.') |
ejb/src/main/resources/seam.properties
0 → 100644
1 | + |
1 | +package no.knowit.seam.example.action; | ||
2 | + | ||
3 | +import java.util.ArrayList; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +import no.knowit.crud.CrudService; | ||
7 | +import no.knowit.seam.example.model.Movie; | ||
8 | +import no.knowit.seam.openejb.mock.SeamOpenEjbTest; | ||
9 | + | ||
10 | +import org.jboss.seam.Component; | ||
11 | +import org.jboss.seam.core.Conversation; | ||
12 | +import org.jboss.seam.log.LogProvider; | ||
13 | +import org.jboss.seam.log.Logging; | ||
14 | +import org.jboss.seam.security.Credentials; | ||
15 | +import org.jboss.seam.security.Identity; | ||
16 | +import org.testng.Assert; | ||
17 | +import org.testng.annotations.BeforeClass; | ||
18 | +import org.testng.annotations.BeforeSuite; | ||
19 | +import org.testng.annotations.Test; | ||
20 | + | ||
21 | +public class MovieTest extends SeamOpenEjbTest { | ||
22 | + | ||
23 | + private static final String DIRECTOR_JOEL_COEN = "Joel Coen"; | ||
24 | + private static final String THE_BIG_LEBOWSKI_TITLE = "The Big Lebowski"; | ||
25 | + private static final Integer THE_BIG_LEBOWSKI_YEAR = 1992; | ||
26 | + private static final String THE_BIG_LEBOWSKI_PLOT = | ||
27 | + "\"Dude\" Lebowski, mistaken for a millionaire Lebowski, seeks restitution for his " + | ||
28 | + "ruined rug and enlists his bowling buddies to help get it."; | ||
29 | + | ||
30 | + private static final String THE_WALL_DIRECTOR = "Alan Parker"; | ||
31 | + private static final String THE_WALL_TITLE = "The Wall"; | ||
32 | + private static final Integer THE_WALL_YEAR = 1999; | ||
33 | + private static final String THE_WALL_PLOT = | ||
34 | + "A troubled rock star descends into madness " + | ||
35 | + "in the midst of his physical and social isolation from everyone."; | ||
36 | + | ||
37 | + private Integer theBigLebowskiId; | ||
38 | + private Integer reservoirDogsId; | ||
39 | + private Integer theWallId; | ||
40 | + | ||
41 | + private static final LogProvider log = Logging.getLogProvider(MovieTest.class); | ||
42 | + | ||
43 | + private boolean mockLogin() { | ||
44 | + Credentials credentials = (Credentials)Component.getInstance("org.jboss.seam.security.credentials"); | ||
45 | + Identity identity = (Identity)Component.getInstance("org.jboss.seam.security.identity"); | ||
46 | + credentials.setUsername("admin"); | ||
47 | + identity.addRole("admin"); | ||
48 | + return identity.login().equals("loggedIn"); | ||
49 | + } | ||
50 | + | ||
51 | + @Override | ||
52 | + @BeforeSuite | ||
53 | + public void beforeSuite() throws Exception { | ||
54 | + //System.out.println("**** MovieTest.beforeSuite()"); | ||
55 | + | ||
56 | + // Change some logging, INFO|DEBUG|WARN|ERROR|FATAL | ||
57 | + contextProperties.put("log4j.category.org.jboss.seam.Component", "DEBUG"); | ||
58 | + contextProperties.put("log4j.category.org.jboss.seam.transaction", "DEBUG"); | ||
59 | + contextProperties.put("log4j.category.org.jboss.seam.mock", "DEBUG"); | ||
60 | + contextProperties.put("log4j.category.no.knowit.seam.openejb.mock", "DEBUG"); | ||
61 | + contextProperties.put("log4j.category.no.knowit.seam.example", "debug"); | ||
62 | + | ||
63 | + super.beforeSuite(); | ||
64 | + } | ||
65 | + | ||
66 | + @Override | ||
67 | + @BeforeClass | ||
68 | + public void setupClass() throws Exception { | ||
69 | + super.setupClass(); | ||
70 | + | ||
71 | + // Delete all movies | ||
72 | + CrudService crudService = doJndiLookup("crudService"); | ||
73 | + crudService.remove(new Movie(), true); | ||
74 | + assert crudService.find(Movie.class).size() == 0 : "List.size():"; | ||
75 | + | ||
76 | + // Persist 3 movies | ||
77 | + ArrayList<Movie> movies = new ArrayList<Movie>(); | ||
78 | + movies.add(new Movie(DIRECTOR_JOEL_COEN, THE_BIG_LEBOWSKI_TITLE, THE_BIG_LEBOWSKI_YEAR, "...")); | ||
79 | + | ||
80 | + movies.add(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992, | ||
81 | + "After a simple jewelery heist goes terribly wrong, the surviving criminals begin " + | ||
82 | + "to suspect that one of them is a police informant.")); | ||
83 | + | ||
84 | + movies.add(new Movie(DIRECTOR_JOEL_COEN, "Fargo", 1996, | ||
85 | + "Jerry Lundegaard's inept crime falls apart due to his and his henchmen's bungling " + | ||
86 | + "and the persistent police work of pregnant Marge Gunderson.")); | ||
87 | + | ||
88 | + movies = (ArrayList<Movie>) crudService.persist(movies); | ||
89 | + assert crudService.find(Movie.class).size() == 3 : "List.size():"; | ||
90 | + | ||
91 | + theBigLebowskiId = movies.get(0).getId(); | ||
92 | + reservoirDogsId = movies.get(1).getId(); | ||
93 | + } | ||
94 | + | ||
95 | + @Test | ||
96 | + public void newMovie() throws Exception { | ||
97 | + | ||
98 | + new NonFacesRequest("/view/example/MovieList.xhtml") { | ||
99 | + @Override | ||
100 | + protected void renderResponse() throws Exception { | ||
101 | + int actual = (Integer)getValue("#{movieList.resultList.size}"); | ||
102 | + Assert.assertTrue(actual > 0, "movieList.size should be gt. 0"); | ||
103 | + } | ||
104 | + }.run(); | ||
105 | + | ||
106 | + new FacesRequest("/login.xhtml") { | ||
107 | + @Override | ||
108 | + protected void updateModelValues() throws Exception { | ||
109 | + assert !isSessionInvalid() : "Invalid session"; | ||
110 | + setValue("#{credentials.username}", "admin"); | ||
111 | + } | ||
112 | + | ||
113 | + @Override | ||
114 | + protected void invokeApplication() throws Exception { | ||
115 | + assert invokeMethod("#{authenticator.authenticate}").equals(true) : "Authentication failed"; | ||
116 | + assert invokeMethod("#{identity.login}").equals("loggedIn") : "Login failed"; | ||
117 | + setOutcome("/view/example/MovieEdit.xhtml"); | ||
118 | + } | ||
119 | + }.run(); | ||
120 | + | ||
121 | + new FacesRequest("/view/example/MovieEdit.xhtml") { | ||
122 | + @Override | ||
123 | + protected void updateModelValues() throws Exception { | ||
124 | + invokeMethod( "#{movieHome.clearInstance}" ); | ||
125 | + setValue("#{movieHome.instance.director}", THE_WALL_DIRECTOR); | ||
126 | + setValue("#{movieHome.instance.title}", THE_WALL_TITLE); | ||
127 | + setValue("#{movieHome.instance.year}", THE_WALL_YEAR); | ||
128 | + setValue("#{movieHome.instance.plot}", THE_WALL_PLOT); | ||
129 | + } | ||
130 | + | ||
131 | + @Override | ||
132 | + protected void invokeApplication() { | ||
133 | + assert invokeMethod("#{movieHome.persist}").equals("persisted"); | ||
134 | + theWallId = (Integer)getValue("#{movieHome.movieId}"); | ||
135 | + setOutcome("/view/example/Movie.xhtml"); | ||
136 | + } | ||
137 | + | ||
138 | + @Override | ||
139 | + protected void afterRequest() { | ||
140 | + assert isInvokeApplicationComplete(); | ||
141 | + assert !isRenderResponseBegun(); | ||
142 | + } | ||
143 | + }.run(); | ||
144 | + | ||
145 | + new NonFacesRequest("/view/example/Movie.xhtml") { | ||
146 | + @Override | ||
147 | + protected void renderResponse() { | ||
148 | + setValue("#{movieHome.movieId}", theWallId); | ||
149 | + invokeMethod("#{movieHome.wire}"); | ||
150 | + assert getValue("#{movieHome.instance.director}").equals(THE_WALL_DIRECTOR); | ||
151 | + assert getValue("#{movieHome.instance.title}").equals(THE_WALL_TITLE); | ||
152 | + assert getValue("#{movieHome.instance.year}").equals(THE_WALL_YEAR); | ||
153 | + assert getValue("#{movieHome.instance.plot}").equals(THE_WALL_PLOT); | ||
154 | + } | ||
155 | + }.run(); | ||
156 | + | ||
157 | + new FacesRequest() { | ||
158 | + @Override | ||
159 | + protected void invokeApplication() throws Exception { | ||
160 | + assert getValue("#{identity.loggedIn}").equals(true) : "Not logged in"; | ||
161 | + assert invokeAction("#{identity.logout}") == null; | ||
162 | + assert getValue("#{identity.loggedIn}").equals(false) : "Logout failed"; | ||
163 | + } | ||
164 | + }.run(); | ||
165 | + } | ||
166 | + | ||
167 | + @Test | ||
168 | + public void editMovie() throws Exception { | ||
169 | + new FacesRequest("/view/example/MovieEdit.xhtml") { | ||
170 | + @Override | ||
171 | + protected void invokeApplication() throws Exception { | ||
172 | + Conversation.instance().begin(); | ||
173 | + assert !isSessionInvalid() : "Invalid session"; | ||
174 | + assert mockLogin() : "Login failed"; | ||
175 | + setValue("#{movieHome.movieId}", theBigLebowskiId); | ||
176 | + invokeMethod( "#{movieHome.wire}" ); | ||
177 | + setValue("#{movieHome.instance.plot}", THE_BIG_LEBOWSKI_PLOT); | ||
178 | + Object result = invokeMethod( "#{movieHome.update}" ); | ||
179 | + Assert.assertEquals(result, "updated", "#{movieHome.update}"); | ||
180 | + Conversation.instance().end(); | ||
181 | + } | ||
182 | + }.run(); | ||
183 | + } | ||
184 | + | ||
185 | + @Test | ||
186 | + public void unauthorizedAccess() throws Exception { | ||
187 | + new FacesRequest("/view/example/MovieEdit.xhtml") { | ||
188 | + @Override | ||
189 | + protected void invokeApplication() throws Exception { | ||
190 | + Conversation.instance().begin(); | ||
191 | + assert !isSessionInvalid() : "Invalid session"; | ||
192 | + setValue("#{movieHome.movieId}", theBigLebowskiId); | ||
193 | + invokeMethod( "#{movieHome.wire}" ); | ||
194 | + setValue("#{movieHome.instance.plot}", "Not allowed to edit"); | ||
195 | + | ||
196 | + try { | ||
197 | + invokeMethod( "#{movieHome.update}" ); | ||
198 | + assert false : "Expected authentication failed!"; | ||
199 | + } | ||
200 | + catch (javax.el.ELException e) { | ||
201 | + assert e.getCause() instanceof org.jboss.seam.security.NotLoggedInException : | ||
202 | + "Expected to fail with: 'org.jboss.seam.security.NotLoggedInException'"; | ||
203 | + | ||
204 | + log.debug("Passed expected unauthorized access failure: " + e.getMessage()); | ||
205 | + } | ||
206 | + finally { | ||
207 | + Conversation.instance().end(); | ||
208 | + } | ||
209 | + } | ||
210 | + }.run(); | ||
211 | + } | ||
212 | + | ||
213 | + @Test | ||
214 | + public void persistWithMissingRequiredFieldValue() throws Exception { | ||
215 | + new FacesRequest("/view/example/MovieEdit.xhtml") { | ||
216 | + @Override | ||
217 | + protected void invokeApplication() throws Exception { | ||
218 | + Conversation.instance().begin(); | ||
219 | + assert !isSessionInvalid() : "Invalid session"; | ||
220 | + assert mockLogin() : "Login failed"; | ||
221 | + invokeMethod("#{movieHome.clearInstance}"); | ||
222 | + setValue("#{movieHome.instance.director}", DIRECTOR_JOEL_COEN); | ||
223 | + setValue("#{movieHome.instance.year}", THE_BIG_LEBOWSKI_YEAR); | ||
224 | + // The title field value is missing | ||
225 | + | ||
226 | + try { | ||
227 | + invokeMethod( "#{movieHome.persist}" ); | ||
228 | + assert false : "Movie with missing field value persisted!"; | ||
229 | + } | ||
230 | + catch (javax.el.ELException e) { | ||
231 | + assert e.getCause() instanceof javax.persistence.PersistenceException : | ||
232 | + "Expected to fail with: 'javax.persistence.PersistenceException'"; | ||
233 | + | ||
234 | + log.debug("Passed expected missing required field value failure: " + e.getMessage()); | ||
235 | + } | ||
236 | + finally { | ||
237 | + Conversation.instance().end(); | ||
238 | + } | ||
239 | + } | ||
240 | + }.run(); | ||
241 | + } | ||
242 | + | ||
243 | + @Test | ||
244 | + public void duplicateUniqueSecondaryIndex() throws Exception { | ||
245 | + new FacesRequest("/view/example/MovieEdit.xhtml") { | ||
246 | + @Override | ||
247 | + protected void invokeApplication() throws Exception { | ||
248 | + Conversation.instance().begin(); | ||
249 | + assert !isSessionInvalid() : "Invalid session"; | ||
250 | + assert mockLogin() : "Login failed"; | ||
251 | + invokeMethod("#{movieHome.clearInstance}"); | ||
252 | + setValue("#{movieHome.instance.director}", DIRECTOR_JOEL_COEN); | ||
253 | + setValue("#{movieHome.instance.title}", THE_BIG_LEBOWSKI_TITLE); | ||
254 | + setValue("#{movieHome.instance.year}", THE_BIG_LEBOWSKI_YEAR); | ||
255 | + // The title field value must be unique | ||
256 | + | ||
257 | + try { | ||
258 | + invokeMethod( "#{movieHome.persist}" ); | ||
259 | + assert false : "Expected to persist a movie with a duplicate unique secondary index!"; | ||
260 | + } | ||
261 | + catch (javax.el.ELException e) { | ||
262 | + assert e.getCause() instanceof javax.persistence.PersistenceException : | ||
263 | + "Expected to fail with: 'javax.persistence.PersistenceException'"; | ||
264 | + | ||
265 | + log.debug("Passed expected duplicate unique secondary index failure: " + e.getMessage()); | ||
266 | + } | ||
267 | + finally { | ||
268 | + Conversation.instance().end(); | ||
269 | + } | ||
270 | + } | ||
271 | + }.run(); | ||
272 | + } | ||
273 | + | ||
274 | + @Test | ||
275 | + public void deleteMovie() throws Exception { | ||
276 | + new FacesRequest("/view/example/MovieEdit.xhtml") { | ||
277 | + @Override | ||
278 | + protected void invokeApplication() throws Exception { | ||
279 | + Conversation.instance().begin(); | ||
280 | + assert !isSessionInvalid() : "Invalid session"; | ||
281 | + assert mockLogin() : "Login failed"; | ||
282 | + setValue("#{movieHome.movieId}", reservoirDogsId); | ||
283 | + invokeMethod( "#{movieHome.wire}" ); | ||
284 | + Assert.assertEquals(invokeMethod( "#{movieHome.remove}" ), "removed", "#{movieHome.remove}"); | ||
285 | + Conversation.instance().end(); | ||
286 | + } | ||
287 | + }.run(); | ||
288 | + } | ||
289 | + | ||
290 | + @Test | ||
291 | + public void findMoviesDirectedByJoelCoen() throws Exception { | ||
292 | + | ||
293 | + new FacesRequest("/view/example/MovieList.xhtml") { | ||
294 | + @Override | ||
295 | + protected void updateModelValues() throws Exception { | ||
296 | + setValue("#{movieList.movie.director}", DIRECTOR_JOEL_COEN); | ||
297 | + } | ||
298 | + | ||
299 | + @SuppressWarnings("unchecked") | ||
300 | + @Override | ||
301 | + protected void renderResponse() throws Exception { | ||
302 | + List<Movie> list= (List<Movie>) invokeMethod( "#{movieList.getResultList()}" ); | ||
303 | + Assert.assertEquals(list.size(), 2, "#{movieList.getResultList()}"); | ||
304 | + Movie movie = list.get(0); | ||
305 | + Assert.assertEquals(movie.getDirector(), DIRECTOR_JOEL_COEN, "movie.getDirector()"); | ||
306 | + } | ||
307 | + }.run(); | ||
308 | + } | ||
309 | +} |
1 | +package no.knowit.seam.example.security; | ||
2 | + | ||
3 | +import no.knowit.seam.openejb.mock.SeamOpenEjbTest; | ||
4 | + | ||
5 | +import org.jboss.seam.core.Manager; | ||
6 | +import org.testng.annotations.BeforeSuite; | ||
7 | +import org.testng.annotations.Test; | ||
8 | + | ||
9 | +public class AuthenticatorTest extends SeamOpenEjbTest { | ||
10 | + | ||
11 | + @Override | ||
12 | + @BeforeSuite | ||
13 | + public void beforeSuite() throws Exception { | ||
14 | + | ||
15 | + //System.out.println("**** AuthenticatorTest.beforeSuite()"); | ||
16 | + | ||
17 | + // Change some logging, INFO|DEBUG|WARN|ERROR|FATAL contextProperties.put("log4j.category.org.jboss.seam.Component", "DEBUG"); | ||
18 | + contextProperties.put("log4j.category.org.jboss.seam.transaction", "DEBUG"); | ||
19 | + contextProperties.put("log4j.category.org.jboss.seam.mock", "DEBUG"); | ||
20 | + contextProperties.put("log4j.category.no.knowit.seam.openejb.mock", "DEBUG"); | ||
21 | + contextProperties.put("log4j.category.no.knowit.seam.example", "debug"); | ||
22 | + super.beforeSuite(); | ||
23 | + } | ||
24 | + | ||
25 | + | ||
26 | + @Test | ||
27 | + public void shouldAuthenticate() throws Exception { | ||
28 | + new ComponentTest() { | ||
29 | + | ||
30 | + @Override | ||
31 | + protected void testComponents() throws Exception { | ||
32 | + assert getValue("#{identity.loggedIn}").equals(false); | ||
33 | + | ||
34 | + setValue("#{identity.username}", "admin"); | ||
35 | + setValue("#{identity.password}", ""); | ||
36 | + invokeMethod("#{identity.login}"); | ||
37 | + assert getValue("#{identity.loggedIn}").equals(true) : "Login failed"; | ||
38 | + | ||
39 | + invokeMethod("#{identity.logout}"); | ||
40 | + assert getValue("#{identity.loggedIn}").equals(false) : "Logout failed"; | ||
41 | + } | ||
42 | + }.run(); | ||
43 | + } | ||
44 | + | ||
45 | + @Test | ||
46 | + public void shouldLoginThenLogout() throws Exception { | ||
47 | + | ||
48 | + new NonFacesRequest() { | ||
49 | + | ||
50 | + @Override | ||
51 | + protected void renderResponse() { | ||
52 | + assert getValue("#{identity.loggedIn}").equals(false) : "Already logged in"; | ||
53 | + } | ||
54 | + }.run(); | ||
55 | + | ||
56 | + new FacesRequest("/login.xhtml") { | ||
57 | + @Override | ||
58 | + protected void updateModelValues() throws Exception { | ||
59 | + assert !isSessionInvalid() : "Invalid session"; | ||
60 | + setValue("#{credentials.username}", "admin"); | ||
61 | + } | ||
62 | + | ||
63 | + @Override | ||
64 | + protected void invokeApplication() throws Exception { | ||
65 | + assert invokeMethod("#{authenticator.authenticate}").equals(true) : "Authentication failed"; | ||
66 | + assert invokeMethod("#{identity.login}").equals("loggedIn") : "Login failed"; | ||
67 | + } | ||
68 | + | ||
69 | + @Override | ||
70 | + protected void renderResponse() { | ||
71 | + assert getValue("#{credentials.username}").equals("admin") : "Wrong user name"; | ||
72 | + assert !Manager.instance().isLongRunningConversation() : "!Manager.instance().isLongRunningConversation()"; | ||
73 | + assert getValue("#{identity.loggedIn}").equals(true) : "Login failed"; | ||
74 | + } | ||
75 | + }.run(); | ||
76 | + | ||
77 | + new FacesRequest() { | ||
78 | + @Override | ||
79 | + protected void invokeApplication() throws Exception { | ||
80 | + assert getValue("#{identity.loggedIn}").equals(true) : "Not logged in"; | ||
81 | + invokeMethod("#{identity.logout}"); | ||
82 | + assert getValue("#{identity.loggedIn}").equals(false) : "Logout failed"; | ||
83 | + } | ||
84 | + }.run(); | ||
85 | + | ||
86 | + } | ||
87 | + | ||
88 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<components | ||
3 | + xmlns:core="http://jboss.com/products/seam/core" | ||
4 | + xmlns="http://jboss.com/products/seam/components" | ||
5 | + xmlns:persistence="http://jboss.com/products/seam/persistence" | ||
6 | + xmlns:drools="http://jboss.com/products/seam/drools" | ||
7 | + xmlns:bpm="http://jboss.com/products/seam/bpm" | ||
8 | + xmlns:security="http://jboss.com/products/seam/security" | ||
9 | + xmlns:mail="http://jboss.com/products/seam/mail" | ||
10 | + xmlns:web="http://jboss.com/products/seam/web" | ||
11 | + xmlns:transaction="http://jboss.com/products/seam/transaction" | ||
12 | + xmlns:jms="http://jboss.com/products/seam/jms" | ||
13 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
14 | + xsi:schemaLocation=" | ||
15 | + http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd | ||
16 | + http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd | ||
17 | + http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd | ||
18 | + http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd | ||
19 | + http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd | ||
20 | + http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd | ||
21 | + http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd | ||
22 | + http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd | ||
23 | + http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd | ||
24 | + http://jboss.com/products/seam/transaction http://jboss.com/products/seam/jms-2.2.xsd | ||
25 | +"> | ||
26 | + | ||
27 | + <core:init | ||
28 | + jndi-pattern="${app.jndi.pattern.test}" | ||
29 | + debug="${app.debug}" | ||
30 | + transaction-management-enabled="true" /> | ||
31 | + | ||
32 | + <!-- JPA --> | ||
33 | + <transaction:ejb-transaction /> | ||
34 | + | ||
35 | + <!-- TODO: How do we define OpenEjb entity manager factory here??? | ||
36 | + <persistence:entity-manager-factory | ||
37 | + name="entityManagerFactory" | ||
38 | + class="no.knowit.seam.openejb.mock.SeamManagedEntityManagerFactoryBean" | ||
39 | + persistence-unit-name="${pu.name}" | ||
40 | + installed="true" | ||
41 | + startup="true" /> | ||
42 | + --> | ||
43 | + | ||
44 | + <persistence:managed-persistence-context | ||
45 | + name="entityManager" | ||
46 | + auto-create="true" | ||
47 | + scope="conversation" | ||
48 | + entity-manager-factory="#{entityManagerFactory}" | ||
49 | + persistence-unit-jndi-name="${pu.jboss.entity.manager.factory.jndi.name}" /> | ||
50 | + | ||
51 | + <security:identity | ||
52 | + authenticate-method="#{authenticator.authenticate}" | ||
53 | + remember-me="true" /> | ||
54 | + | ||
55 | +</components> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | + xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | ||
4 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | ||
5 | + version="2.5"> | ||
6 | + | ||
7 | + <listener> | ||
8 | + <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> | ||
9 | + </listener> | ||
10 | + | ||
11 | + <filter> | ||
12 | + <filter-name>Seam Filter</filter-name> | ||
13 | + <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> | ||
14 | + </filter> | ||
15 | + | ||
16 | + <filter-mapping> | ||
17 | + <filter-name>Seam Filter</filter-name> | ||
18 | + <url-pattern>/*</url-pattern> | ||
19 | + </filter-mapping> | ||
20 | + | ||
21 | +</web-app> |
1 | +# OpenEJB jndi properties | ||
2 | +# see: http://openejb.apache.org/3.0/embedded-configuration.html | ||
3 | +# see: https://blogs.apache.org/openejb/entry/example_common_troubleshooting_flags | ||
4 | + | ||
5 | +# set the initial context factory | ||
6 | +# NOTE: It is important that this line is present in the jndi.properties file. | ||
7 | +# Seam does not work without this line! | ||
8 | +java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory | ||
9 | + | ||
10 | +# Corresponds to JBoss JNDI lookup format in ${app.jndi.pattern.test} property | ||
11 | +# see: http://openejb.apache.org/3.0/jndi-names.html | ||
12 | +openejb.jndiname.format={deploymentId}/{interfaceType.annotationName} | ||
13 | + | ||
14 | +# Multiple ejb's in classpath, | ||
15 | +# see: http://openejb.apache.org/3.0/system-properties.html | ||
16 | +openejb.deployments.classpath.ear=true | ||
17 | + | ||
18 | +# Prefixing configuration files, e.g. persistence.xml ==> openejb.persistence.xml, | ||
19 | +# see: http://openejb.apache.org/3.0/alternate-descriptors.html | ||
20 | +openejb.altdd.prefix=openejb | ||
21 | + | ||
22 | +# Uncomment next two lines to get a more detailed log output, see: http://openejb.apache.org/logging.html | ||
23 | +#log4j.appender.C.layout=org.apache.log4j.PatternLayout | ||
24 | +#log4j.appender.C.layout.ConversionPattern=[%d{HH:mm:ss,SSS}] %5p (%F:%L) - %m%n | ||
25 | + | ||
26 | +# Database connection (same as *-ds.xml in JBoss), filtered using properties from filter-*.properties during build | ||
27 | +${ds.jndi.name} = new://Resource?type=DataSource | ||
28 | +${ds.jndi.name}.JdbcDriver=${ds.driver.class.test} | ||
29 | +${ds.jndi.name}.JdbcUrl=${ds.connection.url.test} | ||
30 | +${ds.jndi.name}.username=${ds.user.name.test} | ||
31 | +${ds.jndi.name}.password=${ds.password.test} | ||
32 | +${ds.jndi.name}.JtaManaged=true | ||
33 | + | ||
34 | +${ds.jndi.name}Unmanaged = new://Resource?type=DataSource | ||
35 | +${ds.jndi.name}Unmanaged.JdbcDriver=${ds.driver.class.test} | ||
36 | +${ds.jndi.name}Unmanaged.JdbcUrl=${ds.connection.url.test} | ||
37 | +${ds.jndi.name}Unmanaged.username=${ds.user.name.test} | ||
38 | +${ds.jndi.name}Unmanaged.password=${ds.password.test} | ||
39 | +${ds.jndi.name}Unmanaged.JtaManaged=false | ||
40 | + | ||
41 | +# Overriding Persistence Unit (as an alternative to maintaining two persistence units) | ||
42 | +# see: http://cwiki.apache.org/OPENEJBx30/configuring-persistenceunits-in-tests.html | ||
43 | +${pu.name}.hibernate.dialect=${ds.hibernate.dialect.test} | ||
44 | +${pu.name}.hibernate.hbm2ddl.auto=${pu.hibernate.hbm2ddl.auto.test} | ||
45 | +${pu.name}.hibernate.default_batch_fetch_size=${pu.hibernate.default_batch_fetch_size.test} | ||
46 | +${pu.name}.hibernate.show_sql=${pu.hibernate.show_sql.test} | ||
47 | +${pu.name}.hibernate.transaction.manager_lookup_class=${pu.hibernate.transaction.manager_lookup_class.test} |
ejb/src/test/resources/import.sql
0 → 100644
ejb/src/test/resources/log4j.properties
0 → 100644
1 | +# Set root category priority to INFO and its only appender to CONSOLE. | ||
2 | +log4j.rootCategory=INFO, CONSOLE | ||
3 | + | ||
4 | +# CONSOLE is set to be a ConsoleAppender using a PatternLayout. | ||
5 | +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender | ||
6 | +log4j.appender.CONSOLE.Threshold=DEBUG | ||
7 | +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout | ||
8 | +log4j.appender.CONSOLE.layout.ConversionPattern=[%d{HH:mm:ss,SSS}] %5p (%F:%L) - %m%n | ||
9 | + | ||
10 | +# TODO: Add some properties to filter-*.properties to control log output | ||
11 | + | ||
12 | +### Project logging ### | ||
13 | +#log4j.category.no.knowit=debug | ||
14 | + | ||
15 | +### Hibernate logging ### | ||
16 | + | ||
17 | +#log4j.logger.org.hibernate=info | ||
18 | +#log4j.logger.org.hibernate=debug | ||
19 | + | ||
20 | +### log HQL query parser activity | ||
21 | +#log4j.logger.org.hibernate.hql.ast.AST=debug | ||
22 | + | ||
23 | +### log just the SQL | ||
24 | +#log4j.logger.org.hibernate.SQL=debug | ||
25 | + | ||
26 | +### log JDBC bind parameters ### | ||
27 | +#log4j.logger.org.hibernate.type=info | ||
28 | + | ||
29 | +### log schema export/update ### | ||
30 | +#log4j.logger.org.hibernate.tool.hbm2ddl=info | ||
31 | + | ||
32 | +### log HQL parse trees | ||
33 | +#log4j.logger.org.hibernate.hql=debug | ||
34 | + | ||
35 | +### log cache activity ### | ||
36 | +#log4j.logger.org.hibernate.cache=info | ||
37 | + | ||
38 | +### log transaction activity | ||
39 | +#log4j.logger.org.hibernate.transaction=debug | ||
40 | + | ||
41 | +### log JDBC resource acquisition | ||
42 | +#log4j.logger.org.hibernate.jdbc=debug | ||
43 | + | ||
44 | +### enable the following line if you want to track down connection ### | ||
45 | +### leakages when using DriverManagerConnectionProvider ### | ||
46 | +#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace |
ejb/testng.xml
0 → 100644
1 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | ||
2 | + | ||
3 | +<suite name="SeamRefimpl" verbose="2" parallel="false"> | ||
4 | + | ||
5 | + <test name="Authenticator"> | ||
6 | + <classes> | ||
7 | + <class name="no.knowit.seam.example.security.AuthenticatorTest"/> | ||
8 | + </classes> | ||
9 | + </test> | ||
10 | + | ||
11 | + <test name="Movie"> | ||
12 | + <classes> | ||
13 | + <class name="no.knowit.seam.example.action.MovieTest"/> | ||
14 | + </classes> | ||
15 | + </test> | ||
16 | + | ||
17 | +</suite> |
pom.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
4 | + | ||
5 | + <modelVersion>4.0.0</modelVersion> | ||
6 | + <parent> | ||
7 | + <groupId>no.knowit.seam</groupId> | ||
8 | + <artifactId>root</artifactId> | ||
9 | + <version>2.2.0-SNAPSHOT</version> | ||
10 | + <relativePath></relativePath> | ||
11 | + <!-- To avoid m3 warning --> | ||
12 | + </parent> | ||
13 | + | ||
14 | + <groupId>no.knowit.seam</groupId> | ||
15 | + <artifactId>seam-refimpl</artifactId> | ||
16 | + <!-- m2eclipse does not like: ${app.context} --> | ||
17 | + <version>1.0-SNAPSHOT</version> | ||
18 | + <name>${project.artifactId} : ${project.version}</name> | ||
19 | + <description>The Seam Maven reference implementation project</description> | ||
20 | + <url>http://code.google.com/p/seam-maven-refimpl/</url> | ||
21 | + <packaging>pom</packaging> | ||
22 | + | ||
23 | + <modules> | ||
24 | + <module>ejb</module> | ||
25 | + <module>war</module> | ||
26 | + <module>ear</module> | ||
27 | + </modules> | ||
28 | + | ||
29 | + <properties> | ||
30 | + <env>dev</env> | ||
31 | + <!-- The default setting if no profile is specified --> | ||
32 | + | ||
33 | + <app>refimpl</app> | ||
34 | + <app.context>seam-refimpl</app.context> | ||
35 | + <!-- hint: same value as artifactId --> | ||
36 | + <app.web.context>${app.context}</app.web.context> | ||
37 | + <app.display.name>Seam Reference Implementation</app.display.name> | ||
38 | + <app.description> | ||
39 | + The Seam Reference Implementation is a Maven multi module project you can use as a template for your own JBoss Seam project | ||
40 | + </app.description> | ||
41 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
42 | + <project.build.outputEncoding>UTF-8</project.build.outputEncoding> | ||
43 | + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
44 | + <app.distributable>false</app.distributable> | ||
45 | + <app.jndi.pattern>${app.context}-ear/#{ejbName}/local</app.jndi.pattern> | ||
46 | + <!-- JBoss JNDI Pattern --> | ||
47 | + <app.jndi.pattern.test>/#{ejbName}/Local</app.jndi.pattern.test> | ||
48 | + <!-- OpenEJB JNDI Pattern --> | ||
49 | + | ||
50 | + <!-- | ||
51 | + Properties for production are located in src/main/filters/filter-prod.properties | ||
52 | + Properties to be modified by developer are located in src/main/filters/filter-dev.properties | ||
53 | + | ||
54 | + To set up your own dev profile: | ||
55 | + * Copy filter-prod.properties to filter-dev.properties and add filter-dev.properties to svn:ignore | ||
56 | + * Execute maven commands with the dev profile, e.g. mvn install -Penv-dev | ||
57 | + --> | ||
58 | + <jdbc.driver.groupId>postgresql</jdbc.driver.groupId> | ||
59 | + <jdbc.driver.artifactId>postgresql</jdbc.driver.artifactId> | ||
60 | + <jdbc.driver.version>8.3-606.jdbc4</jdbc.driver.version> | ||
61 | + </properties> | ||
62 | + | ||
63 | + <dependencyManagement> | ||
64 | + <dependencies> | ||
65 | + <!-- project modules --> | ||
66 | + <dependency> | ||
67 | + <groupId>${project.groupId}</groupId> | ||
68 | + <artifactId>${app.context}-ear</artifactId> | ||
69 | + <version>${project.version}</version> | ||
70 | + <type>ear</type> | ||
71 | + </dependency> | ||
72 | + | ||
73 | + <dependency> | ||
74 | + <groupId>${project.groupId}</groupId> | ||
75 | + <artifactId>${app.context}-war</artifactId> | ||
76 | + <version>${project.version}</version> | ||
77 | + <type>war</type> | ||
78 | + </dependency> | ||
79 | + | ||
80 | + <dependency> | ||
81 | + <groupId>${project.groupId}</groupId> | ||
82 | + <artifactId>${app.context}-ejb</artifactId> | ||
83 | + <version>${project.version}</version> | ||
84 | + <type>ejb</type> | ||
85 | + </dependency> | ||
86 | + | ||
87 | + <!-- other project modules | ||
88 | + <dependency> | ||
89 | + <groupId>${project.groupId}</groupId> | ||
90 | + <artifactId>${app.context}-jar</artifactId> | ||
91 | + <version>${project.version}</version> | ||
92 | + <type>jar</type> | ||
93 | + </dependency> | ||
94 | + --> | ||
95 | + | ||
96 | + <!-- | ||
97 | + "Useful" utilities. If you find anything of interest | ||
98 | + in this module just refactor it into your own project. | ||
99 | + --> | ||
100 | + <dependency> | ||
101 | + <groupId>no.knowit.seam</groupId> | ||
102 | + <artifactId>seam-utils-ejb</artifactId> | ||
103 | + <version>1.0-SNAPSHOT</version> | ||
104 | + <type>ejb</type> | ||
105 | + </dependency> | ||
106 | + | ||
107 | + <!-- For running Seam tests with OpenEJB embedded container --> | ||
108 | + <dependency> | ||
109 | + <groupId>no.knowit.seam</groupId> | ||
110 | + <artifactId>seam-utils-openejb</artifactId> | ||
111 | + <version>1.0-SNAPSHOT</version> | ||
112 | + <type>ejb</type> | ||
113 | + </dependency> | ||
114 | + | ||
115 | + <dependency> | ||
116 | + <groupId>org.jboss.jsfunit</groupId> | ||
117 | + <artifactId>jboss-jsfunit-core</artifactId> | ||
118 | + <version>1.3.0.Final</version> | ||
119 | + </dependency> | ||
120 | + | ||
121 | + <dependency> | ||
122 | + <groupId>org.jboss.jsfunit</groupId> | ||
123 | + <artifactId>jboss-jsfunit-core</artifactId> | ||
124 | + <version>1.3.0.Final</version> | ||
125 | + </dependency> | ||
126 | + | ||
127 | + <dependency> | ||
128 | + <groupId>org.unitils</groupId> | ||
129 | + <artifactId>unitils-core</artifactId> | ||
130 | + <version>3.1</version> | ||
131 | + <exclusions> | ||
132 | + <exclusion> | ||
133 | + <groupId>junit</groupId> | ||
134 | + <artifactId>junit</artifactId> | ||
135 | + </exclusion> | ||
136 | + </exclusions> | ||
137 | + </dependency> | ||
138 | + | ||
139 | + <dependency> | ||
140 | + <groupId>org.unitils</groupId> | ||
141 | + <artifactId>unitils-dbmaintainer</artifactId> | ||
142 | + <version>3.1</version> | ||
143 | + </dependency> | ||
144 | + | ||
145 | + <dependency> | ||
146 | + <groupId>org.unitils</groupId> | ||
147 | + <artifactId>unitils-dbunit</artifactId> | ||
148 | + <version>3.1</version> | ||
149 | + </dependency> | ||
150 | + | ||
151 | + <dependency> | ||
152 | + <groupId>org.dbmaintain</groupId> | ||
153 | + <artifactId>dbmaintain</artifactId> | ||
154 | + <version>2.1</version> | ||
155 | + </dependency> | ||
156 | + | ||
157 | + <dependency> | ||
158 | + <groupId>${jdbc.driver.groupId}</groupId> | ||
159 | + <artifactId>${jdbc.driver.artifactId}</artifactId> | ||
160 | + <version>${jdbc.driver.version}</version> | ||
161 | + </dependency> | ||
162 | + | ||
163 | + </dependencies> | ||
164 | + </dependencyManagement> | ||
165 | + | ||
166 | + <!-- All provided, shared and test dependencies goes into parent pom --> | ||
167 | + <dependencies> | ||
168 | + | ||
169 | + <!-- seam --> | ||
170 | + <dependency> | ||
171 | + <groupId>org.jboss.seam</groupId> | ||
172 | + <artifactId>jboss-seam</artifactId> | ||
173 | + <scope>provided</scope> | ||
174 | + <type>ejb</type> | ||
175 | + </dependency> | ||
176 | + | ||
177 | + <dependency> | ||
178 | + <groupId>org.jboss.el</groupId> | ||
179 | + <artifactId>jboss-el</artifactId> | ||
180 | + <scope>provided</scope> | ||
181 | + </dependency> | ||
182 | + | ||
183 | + <!-- richfaces --> | ||
184 | + <dependency> | ||
185 | + <groupId>org.richfaces.framework</groupId> | ||
186 | + <artifactId>richfaces-api</artifactId> | ||
187 | + <scope>provided</scope> | ||
188 | + </dependency> | ||
189 | + | ||
190 | + <!-- hibernate --> | ||
191 | + <dependency> | ||
192 | + <groupId>org.hibernate</groupId> | ||
193 | + <artifactId>hibernate-core</artifactId> | ||
194 | + <scope>provided</scope> | ||
195 | + </dependency> | ||
196 | + | ||
197 | + <dependency> | ||
198 | + <groupId>org.hibernate</groupId> | ||
199 | + <artifactId>hibernate-annotations</artifactId> | ||
200 | + <scope>provided</scope> | ||
201 | + </dependency> | ||
202 | + | ||
203 | + <dependency> | ||
204 | + <groupId>org.hibernate</groupId> | ||
205 | + <artifactId>hibernate-validator</artifactId> | ||
206 | + <scope>provided</scope> | ||
207 | + </dependency> | ||
208 | + | ||
209 | + <dependency> | ||
210 | + <groupId>org.hibernate</groupId> | ||
211 | + <artifactId>hibernate-commons-annotations</artifactId> | ||
212 | + <scope>provided</scope> | ||
213 | + </dependency> | ||
214 | + | ||
215 | + <!-- jee --> | ||
216 | + <dependency> | ||
217 | + <groupId>javax.ejb</groupId> | ||
218 | + <artifactId>ejb-api</artifactId> | ||
219 | + <scope>provided</scope> | ||
220 | + </dependency> | ||
221 | + | ||
222 | + <dependency> | ||
223 | + <groupId>javax.el</groupId> | ||
224 | + <artifactId>el-api</artifactId> | ||
225 | + <scope>provided</scope> | ||
226 | + </dependency> | ||
227 | + | ||
228 | + <dependency> | ||
229 | + <groupId>javax.faces</groupId> | ||
230 | + <artifactId>jsf-api</artifactId> | ||
231 | + <scope>provided</scope> | ||
232 | + </dependency> | ||
233 | + | ||
234 | + <dependency> | ||
235 | + <groupId>javax.faces</groupId> | ||
236 | + <artifactId>jsf-impl</artifactId> | ||
237 | + <scope>provided</scope> | ||
238 | + </dependency> | ||
239 | + | ||
240 | + <dependency> | ||
241 | + <groupId>javax.persistence</groupId> | ||
242 | + <artifactId>persistence-api</artifactId> | ||
243 | + <scope>provided</scope> | ||
244 | + </dependency> | ||
245 | + | ||
246 | + <dependency> | ||
247 | + <groupId>javax.servlet</groupId> | ||
248 | + <artifactId>servlet-api</artifactId> | ||
249 | + <scope>provided</scope> | ||
250 | + </dependency> | ||
251 | + | ||
252 | + <dependency> | ||
253 | + <groupId>javax.transaction</groupId> | ||
254 | + <artifactId>jta</artifactId> | ||
255 | + <scope>provided</scope> | ||
256 | + </dependency> | ||
257 | + | ||
258 | + <dependency> | ||
259 | + <groupId>javax.jms</groupId> | ||
260 | + <artifactId>jms</artifactId> | ||
261 | + <scope>provided</scope> | ||
262 | + </dependency> | ||
263 | + | ||
264 | + <!-- commons --> | ||
265 | + <dependency> | ||
266 | + <groupId>commons-collections</groupId> | ||
267 | + <artifactId>commons-collections</artifactId> | ||
268 | + <scope>provided</scope> | ||
269 | + </dependency> | ||
270 | + | ||
271 | + <dependency> | ||
272 | + <groupId>commons-logging</groupId> | ||
273 | + <artifactId>commons-logging</artifactId> | ||
274 | + <scope>provided</scope> | ||
275 | + </dependency> | ||
276 | + | ||
277 | + | ||
278 | + <!-- | ||
279 | + JBoss Rules. Needed to be listed here if you have drools integration tests, e.g. Seam Identity | ||
280 | + see: samples/jboss-seam/examples/seamspace | ||
281 | + --> | ||
282 | + <dependency> | ||
283 | + <groupId>org.drools</groupId> | ||
284 | + <artifactId>drools-core</artifactId> | ||
285 | + <scope>provided</scope> | ||
286 | + </dependency> | ||
287 | + | ||
288 | + <dependency> | ||
289 | + <groupId>org.drools</groupId> | ||
290 | + <artifactId>drools-compiler</artifactId> | ||
291 | + <scope>provided</scope> | ||
292 | + </dependency> | ||
293 | + | ||
294 | + <dependency> | ||
295 | + <groupId>org.drools</groupId> | ||
296 | + <artifactId>drools-api</artifactId> | ||
297 | + <scope>provided</scope> | ||
298 | + </dependency> | ||
299 | + | ||
300 | + <dependency> | ||
301 | + <groupId>org.drools</groupId> | ||
302 | + <artifactId>drools-decisiontables</artifactId> | ||
303 | + <scope>provided</scope> | ||
304 | + </dependency> | ||
305 | + | ||
306 | + <dependency> | ||
307 | + <groupId>org.drools</groupId> | ||
308 | + <artifactId>drools-templates</artifactId> | ||
309 | + <scope>provided</scope> | ||
310 | + </dependency> | ||
311 | + | ||
312 | + <dependency> | ||
313 | + <groupId>com.thoughtworks.xstream</groupId> | ||
314 | + <artifactId>xstream</artifactId> | ||
315 | + <scope>provided</scope> | ||
316 | + </dependency> | ||
317 | + | ||
318 | + <dependency> | ||
319 | + <groupId>xpp3</groupId> | ||
320 | + <artifactId>xpp3_min</artifactId> | ||
321 | + <scope>provided</scope> | ||
322 | + </dependency> | ||
323 | + | ||
324 | + <!-- rules + groovy --> | ||
325 | + <dependency> | ||
326 | + <groupId>org.antlr</groupId> | ||
327 | + <artifactId>antlr-runtime</artifactId> | ||
328 | + <scope>provided</scope> | ||
329 | + </dependency> | ||
330 | + | ||
331 | + <!-- JBoss jBPM --> | ||
332 | + <dependency> | ||
333 | + <groupId>org.jbpm</groupId> | ||
334 | + <artifactId>jbpm-jpdl</artifactId> | ||
335 | + <scope>provided</scope> | ||
336 | + </dependency> | ||
337 | + | ||
338 | + <!-- log4j --> | ||
339 | + <dependency> | ||
340 | + <groupId>log4j</groupId> | ||
341 | + <artifactId>log4j</artifactId> | ||
342 | + <scope>provided</scope> | ||
343 | + </dependency> | ||
344 | + | ||
345 | + | ||
346 | + <!-- ******** TEST DEPENDECIES ******** --> | ||
347 | + | ||
348 | + <!--No more such testing--><!-- openejb embedded container for running tests --><!--<dependency>--><!--<groupId>org.apache.openejb</groupId>--><!--<artifactId>openejb-core</artifactId>--><!--<scope>test</scope>--><!--</dependency>--> | ||
349 | + | ||
350 | + <dependency> | ||
351 | + <groupId>org.hibernate</groupId> | ||
352 | + <artifactId>hibernate-entitymanager</artifactId> | ||
353 | + <scope>test</scope> | ||
354 | + <exclusions> | ||
355 | + <exclusion> | ||
356 | + <groupId>javax.persistence</groupId> | ||
357 | + <artifactId>persistence-api</artifactId> | ||
358 | + </exclusion> | ||
359 | + <exclusion> | ||
360 | + <groupId>javax.transaction</groupId> | ||
361 | + <artifactId>jta</artifactId> | ||
362 | + </exclusion> | ||
363 | + </exclusions> | ||
364 | + </dependency> | ||
365 | + | ||
366 | + <!-- databases --> | ||
367 | + <dependency> | ||
368 | + <groupId>com.h2database</groupId> | ||
369 | + <artifactId>h2</artifactId> | ||
370 | + <scope>test</scope> | ||
371 | + </dependency> | ||
372 | + | ||
373 | + <!-- | ||
374 | + <dependency> | ||
375 | + <groupId>hsqldb</groupId> | ||
376 | + <artifactId>hsqldb</artifactId> | ||
377 | + <scope>test</scope> | ||
378 | + </dependency> | ||
379 | + --> | ||
380 | + | ||
381 | + <!-- | ||
382 | + <dependency> | ||
383 | + <groupId>mysql</groupId> | ||
384 | + <artifactId>mysql-connector-java</artifactId> | ||
385 | + <scope>test</scope> | ||
386 | + </dependency> | ||
387 | + --> | ||
388 | + | ||
389 | + <!-- unit test --> | ||
390 | + <dependency> | ||
391 | + <groupId>junit</groupId> | ||
392 | + <artifactId>junit</artifactId> | ||
393 | + <scope>test</scope> | ||
394 | + </dependency> | ||
395 | + | ||
396 | + <!--JSFUnit cannot work with TestNG and its presence messes up maven output--><!--<dependency>--><!--<groupId>org.testng</groupId>--><!--<artifactId>testng</artifactId>--><!--<scope>test</scope>--><!--</dependency>--> | ||
397 | + | ||
398 | + <!-- logging --> | ||
399 | + <dependency> | ||
400 | + <groupId>org.slf4j</groupId> | ||
401 | + <artifactId>slf4j-log4j12</artifactId> | ||
402 | + <scope>test</scope> | ||
403 | + </dependency> | ||
404 | + | ||
405 | + <!-- --> | ||
406 | + <dependency> | ||
407 | + <groupId>javassist</groupId> | ||
408 | + <artifactId>javassist</artifactId> | ||
409 | + <scope>test</scope> | ||
410 | + </dependency> | ||
411 | + </dependencies> | ||
412 | + | ||
413 | + <profiles> | ||
414 | + <profile> | ||
415 | + <id>show-properties</id> | ||
416 | + <build> | ||
417 | + <plugins> | ||
418 | + <plugin> | ||
419 | + <artifactId>maven-antrun-plugin</artifactId> | ||
420 | + <executions> | ||
421 | + <execution> | ||
422 | + <phase>generate-sources</phase> | ||
423 | + <goals> | ||
424 | + <goal>run</goal> | ||
425 | + </goals> | ||
426 | + <configuration> | ||
427 | + <tasks> | ||
428 | + <echo>project.artifactId : ${project.artifactId}</echo> | ||
429 | + <echo>env : ${env}</echo> | ||
430 | + <echo>app.context : ${app.context}</echo> | ||
431 | + <echo>app.unpack.modules : ${app.unpack.modules}</echo> | ||
432 | + <echo>project.parent.basedir : ${project.parent.basedir}</echo> | ||
433 | + <echo>project.basedir : ${project.basedir}</echo> | ||
434 | + <echo>project.build.directory : ${project.build.directory}</echo> | ||
435 | + <echo>jdk.source : ${jdk.source}</echo> | ||
436 | + <echo>jdk.target : ${jdk.target}</echo> | ||
437 | + <echo>jdk.debug : ${jdk.debug}</echo> | ||
438 | + <echo>jdk.optimize : ${jdk.optimize}</echo> | ||
439 | + <echo>as : ${as}</echo> | ||
440 | + <echo>as.version : ${as.version}</echo> | ||
441 | + <echo>as.deploy : ${as.deploy}</echo> | ||
442 | + <echo>ds : ${ds}</echo> | ||
443 | + <echo>ds.connection.url : ${ds.connection.url}</echo> | ||
444 | + <echo>ds.xml : ${ds.xml}</echo> | ||
445 | + <echo>pu.hibernate.dialect : ${pu.hibernate.dialect}</echo> | ||
446 | + <echo>pu.hibernate.show_sql : ${pu.hibernate.show_sql}</echo> | ||
447 | + <echo>ds.test : ${ds.test}</echo> | ||
448 | + <echo>ds.connection.url.test : ${ds.connection.url.test}</echo> | ||
449 | + <echo>pu.hibernate.dialect.test : ${pu.hibernate.dialect.test}</echo> | ||
450 | + <echo>pu.hibernate.show_sql.test: ${pu.hibernate.show_sql.test}</echo> | ||
451 | + <echo>unitils.dbscripts.src: ${unitils.dbscripts.src}</echo> | ||
452 | + </tasks> | ||
453 | + </configuration> | ||
454 | + </execution> | ||
455 | + </executions> | ||
456 | + </plugin> | ||
457 | + </plugins> | ||
458 | + </build> | ||
459 | + </profile> | ||
460 | + </profiles> | ||
461 | + | ||
462 | + <build> | ||
463 | + <plugins> | ||
464 | + <plugin> | ||
465 | + <groupId>org.apache.maven.plugins</groupId> | ||
466 | + <artifactId>maven-compiler-plugin</artifactId> | ||
467 | + <configuration> | ||
468 | + <source>${jdk.source}</source> | ||
469 | + <target>${jdk.target}</target> | ||
470 | + <debug>${jdk.debug}</debug> | ||
471 | + <optimize>${jdk.optimize}</optimize> | ||
472 | + </configuration> | ||
473 | + </plugin> | ||
474 | + | ||
475 | + <plugin> | ||
476 | + <groupId>org.codehaus.mojo</groupId> | ||
477 | + <artifactId>buildnumber-maven-plugin</artifactId> | ||
478 | + <configuration> | ||
479 | + <!-- | ||
480 | + Comment out the format- and items tags if you want the implementation | ||
481 | + build number fom scm, see e.g. the m2m example project. | ||
482 | + --> | ||
483 | + <format>{0,date,yyyy-MM-dd HH:mm:ss}</format> | ||
484 | + <items> | ||
485 | + <item>timestamp</item> | ||
486 | + </items> | ||
487 | + </configuration> | ||
488 | + </plugin> | ||
489 | + </plugins> | ||
490 | + </build> | ||
491 | + | ||
492 | + <scm> | ||
493 | + <connection>scm:svn:http://seam-maven-refimpl.googlecode.com/svn/trunk</connection> | ||
494 | + <developerConnection>scm:svn:https://seam-maven-refimpl.googlecode.com/svn/trunk</developerConnection> | ||
495 | + <url>http://code.google.com/p/seam-maven-refimpl/source/browse/#svn/trunk</url> | ||
496 | + </scm> | ||
497 | + | ||
498 | + <!-- | ||
499 | + <organization> | ||
500 | + <name>Know IT Objectnet AS</name> | ||
501 | + <url>http://www.knowit.no/</url> | ||
502 | + </organization> | ||
503 | + | ||
504 | + <developers> | ||
505 | + <developer> | ||
506 | + <id>loo@knowit.no</id> | ||
507 | + <name>Leif Olsen</name> | ||
508 | + <email>loo@knowit.no</email> | ||
509 | + <organization>Know IT Objectnet Kristiansand</organization> | ||
510 | + <organizationUrl>http://www.knowit.no</organizationUrl> | ||
511 | + <roles> | ||
512 | + <role>Developer</role> | ||
513 | + </roles> | ||
514 | + <timezone>GMT +1</timezone> | ||
515 | + </developer> | ||
516 | + <developer> | ||
517 | + <id>krg@knowit.no</id> | ||
518 | + <name>Ken Gullaksen</name> | ||
519 | + <email>krg@knowit.no</email> | ||
520 | + <organization>Know IT Objectnet Oslo</organization> | ||
521 | + <organizationUrl>http://www.knowit.no</organizationUrl> | ||
522 | + <roles> | ||
523 | + <role>Developer</role> | ||
524 | + </roles> | ||
525 | + <timezone>GMT +1</timezone> | ||
526 | + </developer> | ||
527 | + </developers> | ||
528 | + | ||
529 | + <distributionManagement> | ||
530 | + <repository> | ||
531 | + <id></id> | ||
532 | + <name></name> | ||
533 | + <url></url> | ||
534 | + </repository> | ||
535 | + </distributionManagement> | ||
536 | + | ||
537 | + <licenses> | ||
538 | + <license> | ||
539 | + <name></name> | ||
540 | + <url></url> | ||
541 | + </license> | ||
542 | + </licenses> | ||
543 | + | ||
544 | + <issueManagement> | ||
545 | + <system></system> | ||
546 | + <url></url> | ||
547 | + </issueManagement> | ||
548 | + --> | ||
549 | + | ||
550 | +</project> |
readme.txt
0 → 100644
src/main/dbscripts/001_initial.sql
0 → 100644
src/main/filters/filter-default.properties
0 → 100644
1 | +jdk.debug =true | ||
2 | +jdk.optimize=false | ||
3 | +jdk.source =1.6 | ||
4 | +jdk.target =1.6 | ||
5 | + | ||
6 | +app.debug =${jdk.debug} | ||
7 | +app.unpack.modules=false | ||
8 | + | ||
9 | +# JBoss 4.2.2 | ||
10 | +as =jboss422 | ||
11 | +as.version=4.2 | ||
12 | +as.home =/home/bernard/jboss-4.2.2.GA | ||
13 | +as.deploy =${as.home}/server/default/deploy | ||
14 | + | ||
15 | +# Datasource | ||
16 | +ds =postgres | ||
17 | +ds.jndi.name =${app}Database | ||
18 | +ds.database.name =${app}_db | ||
19 | +ds.server.name = | ||
20 | +ds.driver.class =org.postgresql.Driver | ||
21 | +ds.connection.url =jdbc:postgresql:seam-refimpl-lite | ||
22 | +ds.user.name =seam-refimpl-lite | ||
23 | +ds.password =seam-refimpl-lite | ||
24 | +ds.schema =public | ||
25 | +ds.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect | ||
26 | +ds.xml =${app.context}-ds.xml | ||
27 | + | ||
28 | +# Persistence unit | ||
29 | +pu.name =${app}-unit | ||
30 | +pu.jta.data.source =java:/${ds.jndi.name} | ||
31 | +pu.hibernate.dialect =${ds.hibernate.dialect} | ||
32 | +pu.hibernate.hbm2ddl.auto =create-drop | ||
33 | +pu.hibernate.show_sql =false | ||
34 | +pu.hibernate.default_batch_fetch_size =16 | ||
35 | +pu.hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup | ||
36 | +pu.jboss.entity.manager.factory.jndi.name =java:/${app.context}EntityManagerFactory | ||
37 | + | ||
38 | +# Properties for running unit/integration tests | ||
39 | +ds.test =h2 | ||
40 | +ds.database.name.test =${app}_db | ||
41 | +ds.server.name.test = | ||
42 | +ds.driver.class.test =org.h2.Driver | ||
43 | +ds.connection.url.test =jdbc:h2:mem:${ds.database.name.test} | ||
44 | +ds.user.name.test =sa | ||
45 | +ds.password.test = | ||
46 | +ds.hibernate.dialect.test=org.hibernate.dialect.H2Dialect | ||
47 | + | ||
48 | +pu.hibernate.dialect.test =${ds.hibernate.dialect.test} | ||
49 | +pu.hibernate.hbm2ddl.auto.test =create-drop | ||
50 | +pu.hibernate.default_batch_fetch_size.test =16 | ||
51 | +pu.hibernate.show_sql.test =true | ||
52 | +pu.hibernate.transaction.manager_lookup_class.test=org.apache.openejb.hibernate.TransactionManagerLookup | ||
53 | + | ||
54 | +# Mail server configuration | ||
55 | +mail.host= | ||
56 | +mail.username= | ||
57 | +mail.password= | ||
58 | +mail.port= | ||
59 | +mail.tls= | ||
60 | +mail.sender.email= | ||
61 | + | ||
62 | +# Site root URL | ||
63 | +virtual.host=localhost | ||
64 | +app.context.root=${app.context} | ||
65 | +urlBase=http://localhost:8080/${app.context.root} | ||
66 | + | ||
67 | +#JSFUnit | ||
68 | +cargo.hostname=localhost | ||
69 | +cargo.servlet.port=8080 | ||
70 | +cactus.contextURL=http://localhost:${cargo.servlet.port}/${app.context} | ||
71 | +jsfunit.context_filter.installed=true | ||
72 | + | ||
73 | + | ||
74 | +# Unitils | ||
75 | +unitils.generateDataSetStructure=false | ||
76 | +unitils.dbschema=${basedir}/../src/test/dbschemaxsd | ||
77 | +unitils.dbscripts.src=${basedir}/../src/main/dbscripts | ||
78 | +unitils.dbscripts.output=${basedir}/../src/main/dbscripts | ||
79 | +unitils.dialect=postgresql | ||
80 | + | ||
81 | +#DBmaintain | ||
82 | +dbmaintain.excludedQualifiers=dev | ||
83 | +dbmaintain.fromScratchEnabled=false | ||
84 | +dbmaintain.qualifiers=dev | ||
85 | + | ||
86 | +# Richfaces | ||
87 | +org.ajax4jsf.COMPRESS_SCRIPT=true | ||
88 | + | ||
89 | + | ||
90 | +# Sample as | ||
91 | +#---------- | ||
92 | + | ||
93 | +# JBoss 4.2.3 | ||
94 | +#as =jboss423 | ||
95 | +#as.version=4.2 | ||
96 | +#as.home =C:/dev/server/jboss-4.2.3.GA-jdk6 | ||
97 | +#as.deploy =${as.home}/server/default/deploy | ||
98 | + | ||
99 | +# JBoss 5 | ||
100 | +#as =jboss5 | ||
101 | +#as.version=5 | ||
102 | +#as.home =C:/dev/server/jboss-5.1.0.GA-jdk6 | ||
103 | +#as.deploy =${as.home}/server/default/deploy | ||
104 | + | ||
105 | +# JBoss 6 - See: https://jira.jboss.org/jira/browse/JBSEAM-4192 | ||
106 | +#as =jboss6 | ||
107 | +#as.version=5 | ||
108 | +#as.home =C:/dev/server/jboss-6.0.0.20100216-M2 | ||
109 | +#as.deploy =${as.home}/server/default/deploy | ||
110 | + | ||
111 | +# Sample datasources | ||
112 | +#----------------------- | ||
113 | + | ||
114 | +# MySQL5 | ||
115 | +#ds =mysql5 | ||
116 | +#ds.jndi.name =${app}Database | ||
117 | +#ds.database.name =${app}_db | ||
118 | +#ds.server.name =localhost:3306 | ||
119 | +#ds.driver.class =com.mysql.jdbc.Driver | ||
120 | +#ds.connection.url =jdbc:mysql://${ds.server.name}/${ds.database.name}?characterEncoding=UTF-8 | ||
121 | +#ds.user.name =root | ||
122 | +#ds.password = | ||
123 | +#ds.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect | ||
124 | +#ds.xml =${app.context}-ds.xml | ||
125 | + | ||
126 | +# HSQL memory database | ||
127 | +#ds =hsqldb | ||
128 | +#ds.jndi.name =${app}Database | ||
129 | +#ds.database.name =${app}test_db | ||
130 | +#ds.server.name = | ||
131 | +#ds.driver.class =org.hsqldb.jdbcDriver | ||
132 | +#ds.connection.url =jdbc:hsqldb:mem:${ds.database.name} | ||
133 | +#ds.user.name =sa | ||
134 | +#ds.password = | ||
135 | +#ds.hibernate.dialect=org.hibernate.dialect.HSQLDialect | ||
136 | +#ds.xml =${app.context}-ds.xml | ||
137 | + | ||
138 | +# H2 memory database | ||
139 | +#ds =h2 | ||
140 | +#ds.jndi.name =${app}Database | ||
141 | +#ds.database.name =${app}_db | ||
142 | +#ds.server.name = | ||
143 | +#ds.driver.class =org.h2.Driver | ||
144 | +#ds.connection.url =jdbc:h2:mem:${ds.database.name} | ||
145 | +#ds.user.name =sa | ||
146 | +#ds.password = | ||
147 | +#ds.hibernate.dialect=org.hibernate.dialect.H2Dialect | ||
148 | +#ds.xml =${app.context}-ds.xml | ||
149 | + | ||
150 | +# Postgre SQL | ||
151 | +#ds =postgresql | ||
152 | +#ds.jndi.name =${app}Database | ||
153 | +#ds.driver.class =org.postgresql.Driver | ||
154 | +#ds.server.name =localhost:5432 | ||
155 | +#ds.database.name =${app}_db | ||
156 | +#ds.connection.url =jdbc:postgresql://${ds.server.name}/${ds.database.name}?charSet=UTF8 | ||
157 | +#ds.user.name =username | ||
158 | +#ds.password =password | ||
159 | +#ds.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect | ||
160 | +#ds.xml =${app.context}-ds.xml | ||
161 | + | ||
162 | +# Ms SqlServer | ||
163 | +#ds =sqlserver | ||
164 | +#ds.jndi.name =${app}Database | ||
165 | +#ds.driver.class =net.sourceforge.jtds.jdbc.Driver | ||
166 | +#ds.server.name =localhost:1433 | ||
167 | +#ds.database.name =${app}_db | ||
168 | +#ds.connection.url =jdbc:jtds:sqlserver://${ds.server.name}/${ds.database.name};tds=8.0;lastupdatecount=true | ||
169 | +#ds.user.name =username | ||
170 | +#ds.password =password | ||
171 | +#ds.hibernate.dialect=org.hibernate.dialect.SQLServerDialect | ||
172 | +#ds.xml =${app.context}-ds.xml | ||
173 | + | ||
174 | +# Oracle 10g | ||
175 | +#ds =oracle10g | ||
176 | +#ds.jndi.name =${app}Database | ||
177 | +#ds.server.name =ystu066sl:1521 | ||
178 | +#ds.database.name =sls09 | ||
179 | +#ds.driver.class =oracle.jdbc.driver.OracleDriver | ||
180 | +#ds.connection.url =jdbc:oracle:thin:@//${ds.server.name}/${ds.database.name} | ||
181 | +#ds.user.name =scott | ||
182 | +#ds.password =tiger | ||
183 | +#ds.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect | ||
184 | + | ||
185 | +# ---------------------------------------------------------------------------------------------------------------------------------------------------- | ||
186 | +# Property reference: | ||
187 | +# ${property} =example value [file] | ||
188 | +# ---------------------------------------------------------------------------------------------------------------------------------------------------- | ||
189 | +# ${env} =dev [pom.xml, ear/pom.xml, ejb/pom.xml, war/pom.xml] | ||
190 | +# | ||
191 | +# ${jdk} = [pom.xml] | ||
192 | +# ${jdk.source} =1.6 [pom.xml] | ||
193 | +# ${jdk.target} =1.6 [pom.xml] | ||
194 | +# ${jdk.debug} =true [pom.xml] | ||
195 | +# ${jdk.optimize} =false [pom.xml] | ||
196 | +# | ||
197 | +# ${as} =jboss423 [] | ||
198 | +# ${as.version} =4.2 [ear/pom.xml] | ||
199 | +# ${as.home} =./target/jboss-4.2.3.GA-jdk6 [] | ||
200 | +# ${as.deploy} =${as.home}/server/default/deploy [ear/pom.xml, ejb/pom.xml, war/pom.xml] | ||
201 | +# | ||
202 | +# ${app} =refimpl [pom.xml] | ||
203 | +# ${app.context} =seam-${app} [pom.xml, ear/pom.xml, ejb/pom.xml, war/pom.xml, jboss-web.xml] | ||
204 | +# ${app.web.context} =${app.context} [pom.xml. ear/pom.xml] | ||
205 | +# ${app.debug} =${jdk.debug} [components.xml, web.xml] | ||
206 | +# ${app.unpack.modules} =true [ear/pom.xml] | ||
207 | +# ${app.display.name} =Seam Reference Implementation [ear/pom.xml, web.xml] | ||
208 | +# ${app.description} =The Seam Refimpl lorem ipsum dolar est... [pom.xml, ear/pom.xml] | ||
209 | +# ${app.distributable} =false [components.xml, web.xml] | ||
210 | +# ${app.jndi.pattern} =${app.context}-ear/#{ejbName}/local [components.xml] | ||
211 | +# | ||
212 | +# ${ds} =mysql5 [] | ||
213 | +# ${ds.jndi.name} =${app}Database [*-ds.xml, jndi.properties] | ||
214 | +# ${ds.database.name} =${app}_db [] | ||
215 | +# ${ds.server.name} =localhost:3306 [] | ||
216 | +# ${ds.driver.class} =com.mysql.jdbc.Driver [*-ds.xml, jndi.properties] | ||
217 | +# ${ds.connection.url} =jdbc:mysql://${ds.server.name}/ | ||
218 | +# ${ds.database.name}?characterEncoding=UTF-8 [*-ds.xml, jndi.properties] | ||
219 | +# ${ds.user.name} =root [*-ds.xml, jndi.properties] | ||
220 | +# ${ds.password} = [*-ds.xml, jndi.properties] | ||
221 | +# ${ds.xml} =${app.context}-ds.xml [ear/pom.xml] | ||
222 | +# ${ds.hibernate.dialect} =org.hibernate.dialect.MySQL5InnoDBDialect [] | ||
223 | +# | ||
224 | +# ${pu} = [] | ||
225 | +# ${pu.name} =${app}-unit [persistence.xml, components.xml, jndi.properties] | ||
226 | +# ${pu.jta.data.source} =java:/${ds.jndi.name} [persistence.xml, jndi.properties] | ||
227 | +# ${pu.hibernate.dialect} =${ds.hibernate.dialect} [persistence.xml, jndi.properties] | ||
228 | +# ${pu.hibernate.hbm2ddl.auto} =create-drop [persistence.xml, jndi.properties] | ||
229 | +# ${pu.hibernate.show_sql} =false [persistence.xml, jndi.properties] | ||
230 | +# ${pu.hibernate.default_batch_fetch_size} =16 [persistence.xml, jndi.properties] | ||
231 | +# ${pu.jboss.entity.manager.factory.jndi.name} =java:/${app.context}EntityManagerFactory [persistence.xml, components.xml, jndi.properties] | ||
232 | +# ${pu.hibernate.transaction.manager_lookup_class} =org.hibernate.transaction. | ||
233 | +# JBossTransactionManagerLookup [persistence.xml, jndi.properties] |
src/test/dbschemaxsd/dataset.xsd
0 → 100644
1 | +<?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:dflt="PUBLIC"> | ||
3 | + <xsd:import namespace="PUBLIC" schemaLocation="public.xsd"/> | ||
4 | + <xsd:element name="dataset"> | ||
5 | + <xsd:complexType> | ||
6 | + <xsd:choice minOccurs="0" maxOccurs="unbounded"> | ||
7 | + <xsd:element name="USERS" type="dflt:USERS__type"/> | ||
8 | + <xsd:element name="DBMAINTAIN_SCRIPTS" type="dflt:DBMAINTAIN_SCRIPTS__type"/> | ||
9 | + <xsd:any namespace="PUBLIC"/> | ||
10 | + </xsd:choice> | ||
11 | + </xsd:complexType> | ||
12 | + </xsd:element> | ||
13 | +</xsd:schema> |
src/test/dbschemaxsd/public.xsd
0 → 100644
1 | +<?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="PUBLIC" targetNamespace="PUBLIC"> | ||
3 | + <xsd:element name="USERS" type="USERS__type"/> | ||
4 | + <xsd:element name="DBMAINTAIN_SCRIPTS" type="DBMAINTAIN_SCRIPTS__type"/> | ||
5 | + <xsd:complexType name="USERS__type"> | ||
6 | + <xsd:attribute name="ID" use="optional"/> | ||
7 | + <xsd:attribute name="USERNAME" use="optional"/> | ||
8 | + <xsd:attribute name="PASSWORD_DIGEST" use="optional"/> | ||
9 | + <xsd:attribute name="REGISTRATION_DATE" use="optional"/> | ||
10 | + <xsd:attribute name="ACTIVE" use="optional"/> | ||
11 | + </xsd:complexType> | ||
12 | + <xsd:complexType name="DBMAINTAIN_SCRIPTS__type"> | ||
13 | + <xsd:attribute name="FILE_NAME" use="optional"/> | ||
14 | + <xsd:attribute name="EXECUTED_AT" use="optional"/> | ||
15 | + <xsd:attribute name="VERSION" use="optional"/> | ||
16 | + <xsd:attribute name="SUCCEEDED" use="optional"/> | ||
17 | + <xsd:attribute name="CHECKSUM" use="optional"/> | ||
18 | + <xsd:attribute name="FILE_LAST_MODIFIED_AT" use="optional"/> | ||
19 | + </xsd:complexType> | ||
20 | +</xsd:schema> |
war/nonhotdeployable
0 → 100644
war/pom.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
4 | + | ||
5 | + <modelVersion>4.0.0</modelVersion> | ||
6 | + <parent> | ||
7 | + <groupId>no.knowit.seam</groupId> | ||
8 | + <artifactId>seam-refimpl</artifactId> | ||
9 | + <version>1.0-SNAPSHOT</version> | ||
10 | + <relativePath>../pom.xml</relativePath> | ||
11 | + </parent> | ||
12 | + | ||
13 | + <artifactId>seam-refimpl-war</artifactId> | ||
14 | + <!-- m2eclipse does not like: ${app.context}-ear --> | ||
15 | + <name>${project.artifactId} : ${project.version}</name> | ||
16 | + <description>The Seam Maven reference implementation WAR module</description> | ||
17 | + <packaging>war</packaging> | ||
18 | + | ||
19 | + <properties> | ||
20 | + <app.jndi.pattern>${project.build.finalName}/#{ejbName}/local</app.jndi.pattern> | ||
21 | + </properties> | ||
22 | + | ||
23 | + <profiles> | ||
24 | + <!-- | ||
25 | + More than one profile can be active at once. Since profiles can contain the same types of | ||
26 | + configuration there can be clashes. If two profiles clash the last to be activated will | ||
27 | + override configurations in those activated earlier. | ||
28 | + Note: Any activeByDefault profile will be deactivated if you activate another profile. | ||
29 | + E.g. running "mvn install -Penv-dev" deactivates the "default" profile. | ||
30 | + --> | ||
31 | + <profile> | ||
32 | + <id>env-dev</id> | ||
33 | + <activation> | ||
34 | + <file> | ||
35 | + <exists>../src/main/filters/filter-dev.properties</exists> | ||
36 | + </file> | ||
37 | + </activation> | ||
38 | + <properties> | ||
39 | + <env>dev</env> | ||
40 | + </properties> | ||
41 | + </profile> | ||
42 | + | ||
43 | + <profile> | ||
44 | + <id>env-default</id> | ||
45 | + <activation> | ||
46 | + <activeByDefault>true</activeByDefault> | ||
47 | + </activation> | ||
48 | + <properties> | ||
49 | + <env>default</env> | ||
50 | + </properties> | ||
51 | + </profile> | ||
52 | + | ||
53 | + <profile> | ||
54 | + <id>explode</id> | ||
55 | + <build> | ||
56 | + <plugins> | ||
57 | + <plugin> | ||
58 | + <artifactId>maven-antrun-plugin</artifactId> | ||
59 | + <executions> | ||
60 | + <execution> | ||
61 | + <id>war-process-classes</id> | ||
62 | + <phase>package</phase> | ||
63 | + <goals> | ||
64 | + <goal>run</goal> | ||
65 | + </goals> | ||
66 | + <configuration> | ||
67 | + <tasks> | ||
68 | + <!--EAR version--><!--<property--><!--name="deploy-path"--><!--value="${as.deploy}/${app.context}-ear.ear"/>--><!--WAR only version--> | ||
69 | + <property name="deploy-path" value="${as.deploy}"/> | ||
70 | + <!--copy everything except WEB-INF/classes--> | ||
71 | + <copy todir="${deploy-path}/${project.build.finalName}.war" overwrite="true" verbose="false"> | ||
72 | + <fileset dir="${project.build.directory}/${project.build.finalName}"> | ||
73 | + <include name="**/*"/> | ||
74 | + <exclude name="WEB-INF/**/*"/> | ||
75 | + <exclude name="META-INF/context.xml"/> | ||
76 | + </fileset> | ||
77 | + </copy> | ||
78 | + <!--copy everything from WEB-INF/classes except classes--> | ||
79 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false"> | ||
80 | + <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes"> | ||
81 | + <exclude name="**/*.class"/> | ||
82 | + </fileset> | ||
83 | + </copy> | ||
84 | + <!--copy hot deployable classes--> | ||
85 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/dev" overwrite="true" verbose="false"> | ||
86 | + <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes" | ||
87 | + excludesfile="nonhotdeployable"> | ||
88 | + <include name="**/*.class"/> | ||
89 | + </fileset> | ||
90 | + </copy> | ||
91 | + </tasks> | ||
92 | + </configuration> | ||
93 | + </execution> | ||
94 | + </executions> | ||
95 | + </plugin> | ||
96 | + </plugins> | ||
97 | + </build> | ||
98 | + </profile> | ||
99 | + | ||
100 | + <profile> | ||
101 | + <id>explodeTestsFast</id> | ||
102 | + <build> | ||
103 | + <plugins> | ||
104 | + <plugin> | ||
105 | + <artifactId>maven-antrun-plugin</artifactId> | ||
106 | + <executions> | ||
107 | + <execution> | ||
108 | + <id>process-test-classes</id> | ||
109 | + <phase>process-test-classes</phase> | ||
110 | + <goals> | ||
111 | + <goal>run</goal> | ||
112 | + </goals> | ||
113 | + <configuration> | ||
114 | + <tasks> | ||
115 | + <!--EAR version--><!--<property--><!--name="deploy-path"--><!--value="${as.deploy}/${app.context}-ear.ear"/>--><!--WAR only version--> | ||
116 | + <property name="deploy-path" value="${as.deploy}"/> | ||
117 | + <!--copy resources--> | ||
118 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false"> | ||
119 | + <fileset dir="${project.build.testOutputDirectory}"> | ||
120 | + <exclude name="**/*.class"/> | ||
121 | + </fileset> | ||
122 | + </copy> | ||
123 | + <!--copy hot deployable classes--> | ||
124 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/dev" overwrite="true" verbose="false"> | ||
125 | + <fileset dir="${project.build.testOutputDirectory}" excludesfile="nonhotdeployable"> | ||
126 | + <include name="**/*.class"/> | ||
127 | + </fileset> | ||
128 | + </copy> | ||
129 | + </tasks> | ||
130 | + </configuration> | ||
131 | + </execution> | ||
132 | + </executions> | ||
133 | + </plugin> | ||
134 | + </plugins> | ||
135 | + </build> | ||
136 | + </profile> | ||
137 | + <!--WAR only version--> | ||
138 | + <profile> | ||
139 | + <!-- | ||
140 | + Unexplode ear. Remove project from appserver deploy folder. | ||
141 | + Execute e.g. "mvn clean -Punexplode" | ||
142 | + --> | ||
143 | + <id>unexplode</id> | ||
144 | + <build> | ||
145 | + <plugins> | ||
146 | + <plugin> | ||
147 | + <artifactId>maven-antrun-plugin</artifactId> | ||
148 | + <executions> | ||
149 | + <execution> | ||
150 | + <id>clean</id> | ||
151 | + <phase>clean</phase> | ||
152 | + <configuration> | ||
153 | + <tasks> | ||
154 | + <property name="deploy-path" value="${as.deploy}/${project.build.finalName}.war"/> | ||
155 | + | ||
156 | + <echo>Unexploding: ${deploy-path}</echo> | ||
157 | + | ||
158 | + <delete file="${deploy-path}" quiet="true"/> | ||
159 | + <delete dir="${deploy-path}" quiet="true"/> | ||
160 | + <!-- | ||
161 | + Uncomment this tag if you have deployed the *-ds.xml file to the appserver's deploy folder | ||
162 | + <delete file="${as.deploy}/${ds.xml}" quiet="true" /> | ||
163 | + --> | ||
164 | + </tasks> | ||
165 | + </configuration> | ||
166 | + <goals> | ||
167 | + <goal>run</goal> | ||
168 | + </goals> | ||
169 | + </execution> | ||
170 | + </executions> | ||
171 | + </plugin> | ||
172 | + </plugins> | ||
173 | + </build> | ||
174 | + </profile> | ||
175 | + | ||
176 | + <!--WAR only version--> | ||
177 | + <profile> | ||
178 | + <id>restart</id> | ||
179 | + <build> | ||
180 | + <plugins> | ||
181 | + <plugin> | ||
182 | + <artifactId>maven-antrun-plugin</artifactId> | ||
183 | + <executions> | ||
184 | + <execution> | ||
185 | + <id>war-package</id> | ||
186 | + <phase>package</phase> | ||
187 | + <goals> | ||
188 | + <goal>run</goal> | ||
189 | + </goals> | ||
190 | + <configuration> | ||
191 | + <tasks> | ||
192 | + <property name="deploy-path" value="${as.deploy}"/> | ||
193 | + <!--copy everything except WEB-INF/classes--> | ||
194 | + <copy todir="${deploy-path}/${project.build.finalName}.war" overwrite="true" verbose="false"> | ||
195 | + <fileset dir="${project.build.directory}/${project.build.finalName}"> | ||
196 | + <include name="**/*"/> | ||
197 | + <exclude name="WEB-INF/classes/**/*"/> | ||
198 | + </fileset> | ||
199 | + </copy> | ||
200 | + <!--copy everything from WEB-INF/classes except classes--> | ||
201 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false"> | ||
202 | + <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes"> | ||
203 | + <exclude name="**/*.class"/> | ||
204 | + </fileset> | ||
205 | + </copy> | ||
206 | + <!--copy non hot deployable classes--> | ||
207 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/classes" overwrite="true" verbose="false"> | ||
208 | + <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes" | ||
209 | + includesfile="nonhotdeployable"/> | ||
210 | + </copy> | ||
211 | + <!--copy hot deployable classes--> | ||
212 | + <copy todir="${deploy-path}/${project.build.finalName}.war/WEB-INF/dev" overwrite="true" verbose="false"> | ||
213 | + <fileset dir="${project.build.directory}/${project.build.finalName}/WEB-INF/classes" | ||
214 | + excludesfile="nonhotdeployable"> | ||
215 | + <include name="**/*.class"/> | ||
216 | + </fileset> | ||
217 | + </copy> | ||
218 | + </tasks> | ||
219 | + </configuration> | ||
220 | + </execution> | ||
221 | + </executions> | ||
222 | + </plugin> | ||
223 | + | ||
224 | + <plugin> | ||
225 | + <groupId>org.apache.maven.plugins</groupId> | ||
226 | + <artifactId>maven-resources-plugin</artifactId> | ||
227 | + <executions> | ||
228 | + <execution> | ||
229 | + <id>copy-app-ds-xml</id> | ||
230 | + <phase>initialize</phase> | ||
231 | + <goals> | ||
232 | + <goal>copy-resources</goal> | ||
233 | + </goals> | ||
234 | + <configuration> | ||
235 | + <outputDirectory>${as.deploy}</outputDirectory> | ||
236 | + <resources> | ||
237 | + <resource> | ||
238 | + <directory>../ear/src/main/resources</directory> | ||
239 | + <filtering>true</filtering> | ||
240 | + <includes> | ||
241 | + <include>${ds.xml}</include> | ||
242 | + </includes> | ||
243 | + </resource> | ||
244 | + </resources> | ||
245 | + </configuration> | ||
246 | + </execution> | ||
247 | + </executions> | ||
248 | + </plugin> | ||
249 | + </plugins> | ||
250 | + </build> | ||
251 | + </profile> | ||
252 | + <profile> | ||
253 | + <id>jsfunit</id> | ||
254 | + <dependencies> | ||
255 | + <dependency> | ||
256 | + <groupId>org.jboss.jsfunit</groupId> | ||
257 | + <artifactId>jboss-jsfunit-core</artifactId> | ||
258 | + <scope>compile</scope> | ||
259 | + <exclusions> | ||
260 | + <exclusion> | ||
261 | + <groupId>xerces</groupId> | ||
262 | + <artifactId>xercesImpl</artifactId> | ||
263 | + </exclusion> | ||
264 | + <exclusion> | ||
265 | + <groupId>xalan</groupId> | ||
266 | + <artifactId>xalan</artifactId> | ||
267 | + </exclusion> | ||
268 | + </exclusions> | ||
269 | + </dependency> | ||
270 | + | ||
271 | + <!--Needed for JSFUnit tests by Cactus--> | ||
272 | + <dependency> | ||
273 | + <groupId>junit</groupId> | ||
274 | + <artifactId>junit</artifactId> | ||
275 | + <version>3.8.2</version> | ||
276 | + <scope>runtime</scope> | ||
277 | + </dependency> | ||
278 | + | ||
279 | + <dependency> | ||
280 | + <groupId>org.unitils</groupId> | ||
281 | + <artifactId>unitils-core</artifactId> | ||
282 | + </dependency> | ||
283 | + | ||
284 | + <dependency> | ||
285 | + <groupId>org.unitils</groupId> | ||
286 | + <artifactId>unitils-dbunit</artifactId> | ||
287 | + </dependency> | ||
288 | + | ||
289 | + <dependency> | ||
290 | + <groupId>org.unitils</groupId> | ||
291 | + <artifactId>unitils-dbmaintainer</artifactId> | ||
292 | + <exclusions> | ||
293 | + <exclusion> | ||
294 | + <groupId>org.hibernate</groupId> | ||
295 | + <artifactId>hibernate</artifactId> | ||
296 | + </exclusion> | ||
297 | + </exclusions> | ||
298 | + </dependency> | ||
299 | + | ||
300 | + <dependency> | ||
301 | + <groupId>org.dbmaintain</groupId> | ||
302 | + <artifactId>dbmaintain</artifactId> | ||
303 | + </dependency> | ||
304 | + | ||
305 | + <dependency> | ||
306 | + <groupId>${jdbc.driver.groupId}</groupId> | ||
307 | + <artifactId>${jdbc.driver.artifactId}</artifactId> | ||
308 | + </dependency> | ||
309 | + </dependencies> | ||
310 | + | ||
311 | + <build> | ||
312 | + <plugins> | ||
313 | + <plugin> | ||
314 | + <groupId>org.apache.maven.plugins</groupId> | ||
315 | + <artifactId>maven-failsafe-plugin</artifactId> | ||
316 | + <configuration> | ||
317 | + <systemPropertyVariables> | ||
318 | + <cactus.contextURL>${cactus.contextURL}</cactus.contextURL> | ||
319 | + </systemPropertyVariables> | ||
320 | + <failIfNoTests>true</failIfNoTests> | ||
321 | + </configuration> | ||
322 | + <executions> | ||
323 | + <execution> | ||
324 | + <id>integration-test</id> | ||
325 | + <phase>integration-test</phase> | ||
326 | + <goals> | ||
327 | + <goal>integration-test</goal> | ||
328 | + </goals> | ||
329 | + </execution> | ||
330 | + <execution> | ||
331 | + <id>verify</id> | ||
332 | + <phase>verify</phase> | ||
333 | + <goals> | ||
334 | + <goal>verify</goal> | ||
335 | + </goals> | ||
336 | + </execution> | ||
337 | + </executions> | ||
338 | + </plugin> | ||
339 | + <plugin> | ||
340 | + <groupId>org.codehaus.cargo</groupId> | ||
341 | + <artifactId>cargo-maven2-plugin</artifactId> | ||
342 | + <configuration> | ||
343 | + <container> | ||
344 | + <containerId>jboss42x</containerId> | ||
345 | + <type>remote</type> | ||
346 | + </container> | ||
347 | + <configuration> | ||
348 | + <type>runtime</type> | ||
349 | + <properties> | ||
350 | + <cargo.hostname>${cargo.hostname}</cargo.hostname> | ||
351 | + <cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port> | ||
352 | + </properties> | ||
353 | + <deployables> | ||
354 | + </deployables> | ||
355 | + </configuration> | ||
356 | + </configuration> | ||
357 | + <executions> | ||
358 | + <execution> | ||
359 | + <id>deploy</id> | ||
360 | + <phase>pre-integration-test</phase> | ||
361 | + <goals> | ||
362 | + <goal>undeploy</goal> | ||
363 | + <goal>deploy</goal> | ||
364 | + </goals> | ||
365 | + </execution> | ||
366 | + </executions> | ||
367 | + </plugin> | ||
368 | + <plugin> | ||
369 | + <groupId>org.apache.maven.plugins</groupId> | ||
370 | + <artifactId>maven-war-plugin</artifactId> | ||
371 | + <executions> | ||
372 | + <execution> | ||
373 | + <id>jsfunit</id> | ||
374 | + <goals> | ||
375 | + <goal>war</goal> | ||
376 | + </goals> | ||
377 | + <configuration> | ||
378 | + <webResources> | ||
379 | + <webResource> | ||
380 | + <directory>src/test/resources</directory> | ||
381 | + <targetPath>WEB-INF</targetPath> | ||
382 | + <includes> | ||
383 | + <include>web.xml</include> | ||
384 | + </includes> | ||
385 | + <filtering>true</filtering> | ||
386 | + </webResource> | ||
387 | + <resource> | ||
388 | + <directory>${project.build.testOutputDirectory}</directory> | ||
389 | + <targetPath>WEB-INF/classes</targetPath> | ||
390 | + <includes> | ||
391 | + <include>**/*.class</include> | ||
392 | + </includes> | ||
393 | + </resource> | ||
394 | + <resource> | ||
395 | + <directory>${project.build.testOutputDirectory}</directory> | ||
396 | + <targetPath>/</targetPath> | ||
397 | + <includes> | ||
398 | + <include>**/*.xsl</include> | ||
399 | + </includes> | ||
400 | + </resource> | ||
401 | + <resource> | ||
402 | + <directory>${basedir}/src/test/resources</directory> | ||
403 | + <targetPath>WEB-INF/classes</targetPath> | ||
404 | + <filtering>true</filtering> | ||
405 | + </resource> | ||
406 | + <resource> | ||
407 | + <directory>${unitils.dbscripts.src}</directory> | ||
408 | + <targetPath>WEB-INF/classes/</targetPath> | ||
409 | + <filtering>true</filtering> | ||
410 | + </resource> | ||
411 | + </webResources> | ||
412 | + </configuration> | ||
413 | + </execution> | ||
414 | + </executions> | ||
415 | + </plugin> | ||
416 | + <plugin> | ||
417 | + <groupId>org.apache.maven.plugins</groupId> | ||
418 | + <artifactId>maven-resources-plugin</artifactId> | ||
419 | + <executions> | ||
420 | + <execution> | ||
421 | + <id>copy-app-ds-xml</id> | ||
422 | + <phase>initialize</phase> | ||
423 | + <goals> | ||
424 | + <goal>copy-resources</goal> | ||
425 | + </goals> | ||
426 | + <configuration> | ||
427 | + <outputDirectory>${as.home}/server/default/deploy</outputDirectory> | ||
428 | + <resources> | ||
429 | + <resource> | ||
430 | + <directory>../ear/src/main/resources</directory> | ||
431 | + <filtering>true</filtering> | ||
432 | + <includes> | ||
433 | + <include>${ds.xml}</include> | ||
434 | + </includes> | ||
435 | + </resource> | ||
436 | + </resources> | ||
437 | + </configuration> | ||
438 | + </execution> | ||
439 | + </executions> | ||
440 | + </plugin> | ||
441 | + </plugins> | ||
442 | + </build> | ||
443 | + </profile> | ||
444 | + | ||
445 | + <profile> | ||
446 | + <id>skipSurefire</id> | ||
447 | + <build> | ||
448 | + <plugins> | ||
449 | + <plugin> | ||
450 | + <groupId>org.apache.maven.plugins</groupId> | ||
451 | + <artifactId>maven-surefire-plugin</artifactId> | ||
452 | + <configuration> | ||
453 | + <skip>true</skip> | ||
454 | + </configuration> | ||
455 | + </plugin> | ||
456 | + </plugins> | ||
457 | + </build> | ||
458 | + </profile> | ||
459 | + <profile> | ||
460 | + <id>cli</id> | ||
461 | + <build> | ||
462 | + <plugins> | ||
463 | + <plugin> | ||
464 | + <groupId>org.twdata.maven</groupId> | ||
465 | + <artifactId>maven-cli-plugin</artifactId> | ||
466 | + <version>1.0.6-SNAPSHOT</version> | ||
467 | + <configuration> | ||
468 | + <userAliases> | ||
469 | + <disableConstraints>properties:read-project-properties dbmaintain:disableConstraints</disableConstraints> | ||
470 | + <clearDatabase>properties:read-project-properties dbmaintain:clearDatabase</clearDatabase> | ||
471 | + <updateDatabase>properties:read-project-properties dbmaintain:updateDatabase</updateDatabase> | ||
472 | + <unexplode>clean -Punexplode</unexplode> | ||
473 | + <explode>package -S -Pexplode</explode> | ||
474 | + <restart>package -S -Prestart</restart> | ||
475 | + <!--jsfunitRun - updates database, builds project with JSFUnit tests, deploys it into running JBoss AS and runs JSFUnit tests --> | ||
476 | + <jsfunitRun>clean properties:read-project-properties dbmaintain:clearDatabase dbmaintain:updateDatabase | ||
477 | + dbmaintain:updateSequences dbmaintain:disableConstraints verify -Pjsfunit -Dmaven.test.skip=false | ||
478 | + </jsfunitRun> | ||
479 | + <jsfunitRestart>restart -Pjsfunit -Dmaven.test.skip=false clearDatabase updateDatabase disableConstraints</jsfunitRestart> | ||
480 | + <!--jsfunitExplode - compiles only JSFUnit tests and copies them into exploded package on running JBoss AS, this is meant for rapid test modifications --> | ||
481 | + <jsfunitExplode>test -PexplodeTestsFast,skipSurefire -Dmaven.test.skip=false</jsfunitExplode> | ||
482 | + <!--jsfunitExplodeAll - same as explode, but includes JSFUnit tests, use this when you need to update facelets and JSFUnit tests--> | ||
483 | + <jsfunitExplodeAll>explode -Pjsfunit,skipSurefire -Dmaven.test.skip=false</jsfunitExplodeAll> | ||
484 | + </userAliases> | ||
485 | + </configuration> | ||
486 | + </plugin> | ||
487 | + </plugins> | ||
488 | + </build> | ||
489 | + </profile> | ||
490 | + </profiles> | ||
491 | + | ||
492 | + <dependencies> | ||
493 | + <!-- seam --><!--WAR only version START--> | ||
494 | + <dependency> | ||
495 | + <groupId>org.jboss.seam</groupId> | ||
496 | + <artifactId>jboss-seam</artifactId> | ||
497 | + <type>jar</type> | ||
498 | + <version>${version.seam}</version> | ||
499 | + </dependency> | ||
500 | + | ||
501 | + <dependency> | ||
502 | + <groupId>org.jboss.seam</groupId> | ||
503 | + <artifactId>jboss-seam-mail</artifactId> | ||
504 | + </dependency> | ||
505 | + | ||
506 | + <dependency> | ||
507 | + <groupId>org.jboss.el</groupId> | ||
508 | + <artifactId>jboss-el</artifactId> | ||
509 | + <type>jar</type> | ||
510 | + </dependency> | ||
511 | + | ||
512 | + <dependency> | ||
513 | + <groupId>org.richfaces.framework</groupId> | ||
514 | + <artifactId>richfaces-api</artifactId> | ||
515 | + <type>jar</type> | ||
516 | + </dependency> | ||
517 | + | ||
518 | + <dependency> | ||
519 | + <groupId>commons-beanutils</groupId> | ||
520 | + <artifactId>commons-beanutils</artifactId> | ||
521 | + <type>jar</type> | ||
522 | + </dependency> | ||
523 | + | ||
524 | + <dependency> | ||
525 | + <groupId>commons-digester</groupId> | ||
526 | + <artifactId>commons-digester</artifactId> | ||
527 | + <type>jar</type> | ||
528 | + </dependency> | ||
529 | + | ||
530 | + <!--WAR only version END--> | ||
531 | + <dependency> | ||
532 | + <groupId>org.jboss.seam</groupId> | ||
533 | + <artifactId>jboss-seam-ui</artifactId> | ||
534 | + </dependency> | ||
535 | + | ||
536 | + <!-- optional, but a reasonable requirement for a newly created project --> | ||
537 | + <dependency> | ||
538 | + <groupId>org.jboss.seam</groupId> | ||
539 | + <artifactId>jboss-seam-debug</artifactId> | ||
540 | + </dependency> | ||
541 | + | ||
542 | + <!-- add more Seam modules as needed | ||
543 | + <dependency> | ||
544 | + <groupId>org.jboss.seam</groupId> | ||
545 | + <artifactId>jboss-seam-remoting</artifactId> | ||
546 | + </dependency> | ||
547 | + | ||
548 | + <dependency> | ||
549 | + <groupId>org.jboss.seam</groupId> | ||
550 | + <artifactId>jboss-seam-mail</artifactId> | ||
551 | + </dependency> | ||
552 | + | ||
553 | + <dependency> | ||
554 | + <groupId>org.jboss.seam</groupId> | ||
555 | + <artifactId>jboss-seam-pdf</artifactId> | ||
556 | + </dependency> | ||
557 | + | ||
558 | + <dependency> | ||
559 | + <groupId>org.jboss.seam</groupId> | ||
560 | + <artifactId>jboss-seam-excel</artifactId> | ||
561 | + </dependency> | ||
562 | + --> | ||
563 | + | ||
564 | + <!-- richfaces --> | ||
565 | + <dependency> | ||
566 | + <groupId>org.richfaces.framework</groupId> | ||
567 | + <artifactId>richfaces-impl</artifactId> | ||
568 | + </dependency> | ||
569 | + | ||
570 | + <dependency> | ||
571 | + <groupId>org.richfaces.ui</groupId> | ||
572 | + <artifactId>richfaces-ui</artifactId> | ||
573 | + </dependency> | ||
574 | + | ||
575 | + <dependency> | ||
576 | + <groupId>org.richfaces.samples</groupId> | ||
577 | + <artifactId>glassX</artifactId> | ||
578 | + </dependency> | ||
579 | + | ||
580 | + <dependency> | ||
581 | + <groupId>org.richfaces.samples</groupId> | ||
582 | + <artifactId>darkX</artifactId> | ||
583 | + </dependency> | ||
584 | + | ||
585 | + <!-- jee --> | ||
586 | + <dependency> | ||
587 | + <groupId>com.sun.facelets</groupId> | ||
588 | + <artifactId>jsf-facelets</artifactId> | ||
589 | + </dependency> | ||
590 | + | ||
591 | + <!-- url rewrite filter, | ||
592 | + There are two rewrite options in Seam, you can choose to either use the org.tuckey | ||
593 | + UrlRewriteFilter or the native Seam rewriting. You should not attempt to use both. | ||
594 | + The native Seam rewriting does not use the org.tuckey rewrite engine at all. | ||
595 | + If you are going to use Seam's native rewriting, then remove the org.tuckey | ||
596 | + UrlRewriteFilter from web.xml and nuke the urlrewrite.xml file. | ||
597 | + With Seam 2.1 or newer it is recommend to use Seam's native rewrite engine. | ||
598 | + | ||
599 | + <dependency> | ||
600 | + <groupId>org.tuckey</groupId> | ||
601 | + <artifactId>urlrewritefilter</artifactId> | ||
602 | + </dependency> | ||
603 | + --> | ||
604 | + | ||
605 | + | ||
606 | + <!-- | ||
607 | + For Eclipse and JBoss Tools: | ||
608 | + List all other modules you are interested to browse | ||
609 | + into (ctrl+click) from xhtml pages with scope provided | ||
610 | + <dependency> | ||
611 | + <groupId>${project.groupId}</groupId> | ||
612 | + <artifactId>${app.context}-ejb</artifactId> | ||
613 | + <type>ejb</type> | ||
614 | + <scope>provided</scope> | ||
615 | + </dependency> | ||
616 | + --> | ||
617 | + | ||
618 | + <!--JSFUnit--> | ||
619 | + <dependency> | ||
620 | + <groupId>org.jboss.jsfunit</groupId> | ||
621 | + <artifactId>jboss-jsfunit-core</artifactId> | ||
622 | + <scope>test</scope> | ||
623 | + <exclusions> | ||
624 | + <exclusion> | ||
625 | + <groupId>xerces</groupId> | ||
626 | + <artifactId>xercesImpl</artifactId> | ||
627 | + </exclusion> | ||
628 | + <exclusion> | ||
629 | + <groupId>xalan</groupId> | ||
630 | + <artifactId>xalan</artifactId> | ||
631 | + </exclusion> | ||
632 | + </exclusions> | ||
633 | + </dependency> | ||
634 | + | ||
635 | + <dependency> | ||
636 | + <groupId>org.unitils</groupId> | ||
637 | + <artifactId>unitils-dbunit</artifactId> | ||
638 | + <scope>test</scope> | ||
639 | + </dependency> | ||
640 | + | ||
641 | + </dependencies> | ||
642 | + | ||
643 | + <build> | ||
644 | + <finalName>${app.context}</finalName> | ||
645 | + | ||
646 | + <resources> | ||
647 | + <resource> | ||
648 | + <directory>src/main/resources</directory> | ||
649 | + <filtering>true</filtering> | ||
650 | + </resource> | ||
651 | + </resources> | ||
652 | + <testResources> | ||
653 | + <testResource> | ||
654 | + <directory>src/test/resources</directory> | ||
655 | + <filtering>true</filtering> | ||
656 | + </testResource> | ||
657 | + </testResources> | ||
658 | + | ||
659 | + <!-- | ||
660 | + Maven filter properties are ony visible to | ||
661 | + resources and can not be accessed from the POM. | ||
662 | + --> | ||
663 | + <filters> | ||
664 | + <filter>${basedir}/../src/main/filters/filter-${env}.properties</filter> | ||
665 | + </filters> | ||
666 | + | ||
667 | + <plugins> | ||
668 | + <!-- | ||
669 | + Maven filter properties are ony visible to resources and can not be | ||
670 | + accessed from the POM. This is where the Properties Maven Plugin makes | ||
671 | + our life a little easier when dealing with properties that we need to | ||
672 | + access inside our POM. It provides goals to read and write properties | ||
673 | + from and to files, and also to set system properties. It's main use-case | ||
674 | + is loading properties from files instead of declaring them in pom.xml, | ||
675 | + something that comes in handy when dealing with different environments. | ||
676 | + The plugin is configured to read properties during the "validate" phase | ||
677 | + and the properties are then accessible from the pom. | ||
678 | + --> | ||
679 | + <plugin> | ||
680 | + <groupId>org.codehaus.mojo</groupId> | ||
681 | + <artifactId>properties-maven-plugin</artifactId> | ||
682 | + <configuration> | ||
683 | + <files> | ||
684 | + <file>${basedir}/../src/main/filters/filter-${env}.properties</file> | ||
685 | + </files> | ||
686 | + <outputFile/> | ||
687 | + <properties/> | ||
688 | + </configuration> | ||
689 | + <executions> | ||
690 | + <execution> | ||
691 | + <id>pre-clean</id> | ||
692 | + <phase>pre-clean</phase> | ||
693 | + <goals> | ||
694 | + <goal>read-project-properties</goal> | ||
695 | + </goals> | ||
696 | + </execution> | ||
697 | + </executions> | ||
698 | + </plugin> | ||
699 | + | ||
700 | + <!--WAR only mode--> | ||
701 | + <plugin> | ||
702 | + <groupId>org.apache.maven.plugins</groupId> | ||
703 | + <artifactId>maven-war-plugin</artifactId> | ||
704 | + <configuration> | ||
705 | + <webResources> | ||
706 | + <webResource> | ||
707 | + <directory>${basedir}/src/main/webapp/WEB-INF</directory> | ||
708 | + <targetPath>WEB-INF</targetPath> | ||
709 | + <filtering>true</filtering> | ||
710 | + </webResource> | ||
711 | + <webResource> | ||
712 | + <directory>${basedir}/../ejb/src/main/resources/META-INF</directory> | ||
713 | + <targetPath>WEB-INF/classes/META-INF</targetPath> | ||
714 | + <includes> | ||
715 | + <include>persistence.xml</include> | ||
716 | + </includes> | ||
717 | + <filtering>true</filtering> | ||
718 | + </webResource> | ||
719 | + </webResources> | ||
720 | + <archive> | ||
721 | + <manifestEntries> | ||
722 | + <Build-Date>${timestamp}</Build-Date> | ||
723 | + <Build-Revision>${buildNumber}</Build-Revision> | ||
724 | + <Mode>${env}</Mode> | ||
725 | + </manifestEntries> | ||
726 | + </archive> | ||
727 | + </configuration> | ||
728 | + </plugin> | ||
729 | + | ||
730 | + <plugin> | ||
731 | + <groupId>org.dbmaintain</groupId> | ||
732 | + <artifactId>dbmaintain-maven-plugin</artifactId> | ||
733 | + <configuration> | ||
734 | + <databases> | ||
735 | + <database> | ||
736 | + <dialect>${unitils.dialect}</dialect> | ||
737 | + <driverClassName>${ds.driver.class}</driverClassName> | ||
738 | + <userName>${ds.user.name}</userName> | ||
739 | + <password>${ds.password}</password> | ||
740 | + <url>${ds.connection.url}</url> | ||
741 | + <schemaNames>${ds.schema}</schemaNames> | ||
742 | + </database> | ||
743 | + </databases> | ||
744 | + <autoCreateDbMaintainScriptsTable>true</autoCreateDbMaintainScriptsTable> | ||
745 | + <cleanDb>false</cleanDb> | ||
746 | + <fromScratchEnabled>${dbmaintain.fromScratchEnabled}</fromScratchEnabled> | ||
747 | + <lowestAcceptableSequenceValue>1000</lowestAcceptableSequenceValue> | ||
748 | + <updateSequences>false</updateSequences> | ||
749 | + <scriptLocations>${unitils.dbscripts.src}</scriptLocations> | ||
750 | + <scriptEncoding>UTF-8</scriptEncoding> | ||
751 | + <qualifiers>${dbmaintain.qualifiers}</qualifiers> | ||
752 | + <excludedQualifiers>${dbmaintain.excludedQualifiers}</excludedQualifiers> | ||
753 | + </configuration> | ||
754 | + <dependencies> | ||
755 | + <dependency> | ||
756 | + <groupId>${jdbc.driver.groupId}</groupId> | ||
757 | + <artifactId>${jdbc.driver.artifactId}</artifactId> | ||
758 | + <version>${jdbc.driver.version}</version> | ||
759 | + </dependency> | ||
760 | + </dependencies> | ||
761 | + </plugin> | ||
762 | + </plugins> | ||
763 | + </build> | ||
764 | + | ||
765 | +</project> |
war/readme.txt
0 → 100644
1 | +This is WAR only implementation. All maven goals should be run within war directory. | ||
2 | +This project configuration supports: | ||
3 | + -JSFUnit tests | ||
4 | + -hot deployment of Seam components | ||
5 | + -hot deployment of JSFUnit tests | ||
6 | + -maven-cli-plugin | ||
7 | + -Unitils & DBMaintain | ||
8 | + | ||
9 | +-------------------- | ||
10 | +maven-cli-plugin: | ||
11 | +-------------------- | ||
12 | +This is cool plugin for maven that speeds up execution of maven goals. What is even cooler it allows to alias bunch of goals, i.e.: | ||
13 | +<plugin> | ||
14 | + <groupId>org.twdata.maven</groupId> | ||
15 | + <artifactId>maven-cli-plugin</artifactId> | ||
16 | + <version>1.0.6-SNAPSHOT</version> | ||
17 | + <configuration> | ||
18 | + <userAliases> | ||
19 | + <disableConstraints>properties:read-project-properties dbmaintain:disableConstraints</disableConstraints> | ||
20 | + <clearDatabase>properties:read-project-properties dbmaintain:clearDatabase</clearDatabase> | ||
21 | + <updateDatabase>properties:read-project-properties dbmaintain:updateDatabase</updateDatabase> | ||
22 | + <unexplode>clean -Punexplode</unexplode> | ||
23 | + <explode>package -S -Pexplode</explode> | ||
24 | + <restart>package -S -Prestart</restart> | ||
25 | + <!--jsfunitRun - updates database, builds project with JSFUnit tests, deploys it into running JBoss AS and runs JSFUnit tests --> | ||
26 | + <jsfunitRun>clean properties:read-project-properties dbmaintain:clearDatabase dbmaintain:updateDatabase | ||
27 | + dbmaintain:updateSequences dbmaintain:disableConstraints verify -Pjsfunit -Dmaven.test.skip=false | ||
28 | + </jsfunitRun> | ||
29 | + <jsfunitRestart>restart -Pjsfunit -Dmaven.test.skip=false updateDatabase disableConstraints</jsfunitRestart> | ||
30 | + <!--jsfunitExplode - compiles only JSFUnit tests and copies them into exploded package on running JBoss AS, this is meant for rapid test modifications --> | ||
31 | + <jsfunitExplode>test -PexplodeTestsFast,skipSurefire -Dmaven.test.skip=false</jsfunitExplode> | ||
32 | + <!--jsfunitExplodeAll - same as explode, but includes JSFUnit tests, use this when you need to update facelets and JSFUnit tests--> | ||
33 | + <jsfunitExplodeAll>explode -Pjsfunit,skipSurefire -Dmaven.test.skip=false</jsfunitExplodeAll> | ||
34 | + </userAliases> | ||
35 | + </configuration> | ||
36 | +</plugin> | ||
37 | + | ||
38 | +To lunch maven cli console run: mvn cli:execute-phase -P cli | ||
39 | +From now on you can type i.e. "restart" to restart your exploded deployment on server. Original version of that plugin does not support verify phase which is | ||
40 | +required to run JSFUnit tests. Use custom version from | ||
41 | +http://bernard.labno.pl/artifactory/plugins-snapshot-local/org/twdata/maven/maven-cli-plugin/1.0.6-SNAPSHOT/maven-cli-plugin-1.0.6-SNAPSHOT.jar | ||
42 | + | ||
43 | +Project is configured with several useful aliases: | ||
44 | + -explode - hot deploys facelets & Seam components | ||
45 | + -unexplode - undeploys application from application server and clears target directory | ||
46 | + -restart - deploys entire application to app server | ||
47 | + -jsfunitRun - runs JSFUnit tests (it is assumed that JBoss is running) | ||
48 | + -jsfunitExplode - hot deploys JSFUnit tests and data sets | ||
49 | + -jsfunitRestart - deploys entire application with JSFUnit tests to app server | ||
50 | + -updateDatabase - updates database using DBMaintain plugin (executes scripts from ../src/main/dbscripts) | ||
51 | + | ||
52 | +Note that jsfunitRun deploys application via jmx-console so it must be deployed on your server and you should run unexplode first to make sure that no exploded | ||
53 | +deployment of the same application is on the server. | ||
54 | + | ||
55 | +-------------------- | ||
56 | +JSFUnit tests: | ||
57 | +-------------------- | ||
58 | +JSFUnit tests are run by failsafe plugin during integration-test phase (use verify phase). Tests must obey naming convention "*IT". | ||
59 | +When you build your application with JSFUnit tests remember that /src/test/resources/web.xml is used in stead of /src/main/webapp/WEB-INF/web.xml. | ||
60 | +Always keep those files synchronized (the one used for JSFUnit tests has several additional lines at the bottom). | ||
61 | +JSFUnit tests cannot be hot deployed, but they can invoke Seam components which in turn can be hot deployed, so you need to delegate. | ||
62 | +See example of AuthenticatorIT, AuthenticatorITI and AuthenticatorITC. AuthenticatorIT is the propper test which will be run by JSFUnit, but it delegates | ||
63 | +everything to AuthenticatorITC (c is for component). Because AuthenticatorIT lands in WEB-INF/classes and AuthenticatorITC lands in WEB-INF/dev they are | ||
64 | +loaded by different classloaders and AuthenticatorIT cannot see AuthenticatorITC. But AuthenticatorIT can obtain AuthenticatorITC by invoking | ||
65 | +Component.getInstance. It will return Object. It cannot be cast to AuthenticatorITC class because that class is not visible by AuthenticatorIT's classloader. | ||
66 | +But it can be cast to some interface and thats what AuthenticatorITI is used for. | ||
67 | +So, AuthenticatorITC is hot deployable while AuthenticatorIT and AuthenticatorITI are not. | ||
68 | + | ||
69 | +You can run tests from CLI console with jsfunitRun command (start JBoss before that). | ||
70 | +When you develop tests it is better to jsfunitRestart and then lunch each test suite from browser, i.e.: | ||
71 | + | ||
72 | + http://localhost:8080/seam-refimpl/ServletTestRunner?suite=no.knowit.seam.example.security.test.AuthenticatorIT&xsl=cactus-report.xsl | ||
73 | + | ||
74 | +the xsl parameter is optional and can be used to transform XML results into human readable HTML form. | ||
75 | + | ||
76 | +In order to be able to call Component.getInstance from AuthenticatorIT there must be active Seam context. This is done in components.xml: | ||
77 | + | ||
78 | + <web:context-filter regex-url-pattern="/Servlet.*" installed="${jsfunit.context_filter.installed}"/> | ||
79 | + | ||
80 | +In production this can be turned off. It maps context-filter to JSFUnit servlets. | ||
81 | + | ||
82 | +-------------------- | ||
83 | +Hot deployment: | ||
84 | +-------------------- | ||
85 | +Project is configured to support hot deployment. Seam hot deploys stuff that lands in WEB-INF/dev. Nothing that is instantiated by classed from outside of that | ||
86 | +directory can be put there (jsf validators, converters, entities, jsfunit test cases etc.). So everything that needs to be done is to copy some classes to WEB-INF/classes | ||
87 | +and some classes to WEB-INF/dev. To tell Maven which class goes where use war/nonhotdeployable file. It uses Ant pattern syntax. Example: | ||
88 | +**/*IT.class | ||
89 | +**/*IT$*.class | ||
90 | +**/*ITI.class | ||
91 | +**/no/knowit/seam/example/model/**/*.class | ||
92 | +**/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase.class | ||
93 | +**/no/knowit/seam/example/test/AbstractUnitilisedJSFUnitTestCase$*.class | ||
94 | + | ||
95 | +First line includes JSFUnit tests (IT suffix stands for integration test). | ||
96 | +Second line includes any inner classes that could be defined in JSFUnit tests. | ||
97 | +Third line includes interfaces of JSFUnit tests. | ||
98 | +Fourth line includes entities. (If you scatter entities all over your packages tree then you will be in pain of maintaining this file often). | ||
99 | +Fifth and sixth lines include base class used for tests. | ||
100 | + | ||
101 | +-------------------- | ||
102 | +Unitils: | ||
103 | +-------------------- | ||
104 | +This is cool library for updating your database with data sets before each test. Datasets are defined as XML files in src/test/resources and must | ||
105 | +match test's package an class name. Unitils looks cool with JUnit4 but this configuration uses JSFunit+Cactus which enforces JUnit3. | ||
106 | +This is what AbstractUnitilisedJSFUnitTestCase is for. It invokes Unitils stuff before each test. | ||
107 | +Important: if you want to have your data set inserted annotate your test (*IT) with @DataSet. | ||
108 | +If you want XSD schema for your database to be generated just change unitils.generateDataSetStructure propert in filter to true. | ||
109 | +It will regenerate src/test/dbschemaxsd/*.xsd. | ||
110 | +Important: Under windows do not use ${basedir} in properties related to unitils. You will get problem with backslashes. | ||
111 | +Just type full path with slashes, i.e.: d:/documents and settings/tralala/ |
1 | +package no.knowit.seam.example.model; | ||
2 | + | ||
3 | +import org.hibernate.validator.Length; | ||
4 | +import org.hibernate.validator.NotNull; | ||
5 | + | ||
6 | +import javax.persistence.Column; | ||
7 | +import javax.persistence.Entity; | ||
8 | +import javax.persistence.GeneratedValue; | ||
9 | +import javax.persistence.Id; | ||
10 | +import javax.persistence.Lob; | ||
11 | +import javax.persistence.Version; | ||
12 | + | ||
13 | +import static javax.persistence.GenerationType.IDENTITY; | ||
14 | + | ||
15 | +@Entity | ||
16 | +public class Movie implements java.io.Serializable { | ||
17 | + | ||
18 | + private static final long serialVersionUID = 1L; | ||
19 | + | ||
20 | + @Id | ||
21 | + @GeneratedValue(strategy = IDENTITY) | ||
22 | + private Integer id; | ||
23 | + | ||
24 | + @Version | ||
25 | + private Long version; | ||
26 | + | ||
27 | + @org.hibernate.annotations.Index(name="idx_director") | ||
28 | + @Column(nullable = false, length = 50) | ||
29 | + @NotNull | ||
30 | + @Length(max = 50) | ||
31 | + private String director; | ||
32 | + | ||
33 | + @Column(unique = true, nullable = false, length = 60) | ||
34 | + @NotNull | ||
35 | + @Length(max = 60) | ||
36 | + private String title; | ||
37 | + | ||
38 | + @Column(nullable = false) | ||
39 | + @NotNull | ||
40 | + private Integer year; | ||
41 | + | ||
42 | + @Lob | ||
43 | + private String plot; | ||
44 | + | ||
45 | + public Movie() { | ||
46 | + } | ||
47 | + | ||
48 | + public Movie(final String director, final String title, Integer year) { | ||
49 | + this.director = director; | ||
50 | + this.title = title; | ||
51 | + this.year = year; | ||
52 | + } | ||
53 | + | ||
54 | + public Movie(final String director, final String title, Integer year, final String plot) { | ||
55 | + this.director = director; | ||
56 | + this.title = title; | ||
57 | + this.year = year; | ||
58 | + this.plot = plot; | ||
59 | + } | ||
60 | + | ||
61 | + public Integer getId() { | ||
62 | + return this.id; | ||
63 | + } | ||
64 | + | ||
65 | + public void setId(Integer id) { | ||
66 | + this.id = id; | ||
67 | + } | ||
68 | + | ||
69 | + public Long getVersion() { | ||
70 | + return this.version; | ||
71 | + } | ||
72 | + | ||
73 | + public void setVersion(Long version) { | ||
74 | + this.version = version; | ||
75 | + } | ||
76 | + | ||
77 | + public String getDirector() { | ||
78 | + return this.director; | ||
79 | + } | ||
80 | + | ||
81 | + public void setDirector(final String director) { | ||
82 | + this.director = director; | ||
83 | + } | ||
84 | + | ||
85 | + public String getTitle() { | ||
86 | + return this.title; | ||
87 | + } | ||
88 | + | ||
89 | + public void setTitle(final String title) { | ||
90 | + this.title = title; | ||
91 | + } | ||
92 | + | ||
93 | + public Integer getYear() { | ||
94 | + return this.year; | ||
95 | + } | ||
96 | + | ||
97 | + public void setYear(Integer year) { | ||
98 | + this.year = year; | ||
99 | + } | ||
100 | + | ||
101 | + public String getPlot() { | ||
102 | + return this.plot; | ||
103 | + } | ||
104 | + | ||
105 | + public void setPlot(final String plot) { | ||
106 | + this.plot = plot; | ||
107 | + } | ||
108 | + | ||
109 | +} |
1 | +package no.knowit.seam.example.model; | ||
2 | + | ||
3 | +import org.hibernate.validator.Email; | ||
4 | +import org.hibernate.validator.Length; | ||
5 | +import org.hibernate.validator.NotNull; | ||
6 | +import org.jboss.seam.annotations.Name; | ||
7 | + | ||
8 | +import javax.persistence.Column; | ||
9 | +import javax.persistence.Entity; | ||
10 | +import javax.persistence.GeneratedValue; | ||
11 | +import javax.persistence.Id; | ||
12 | +import javax.persistence.Table; | ||
13 | +import javax.persistence.Temporal; | ||
14 | +import java.io.Serializable; | ||
15 | +import java.util.Date; | ||
16 | + | ||
17 | +@Entity | ||
18 | +@Name("user") | ||
19 | +@Table(name = "USERS") | ||
20 | +public class User implements Serializable { | ||
21 | + | ||
22 | + @Id | ||
23 | + @GeneratedValue | ||
24 | + @Column(name = "ID") | ||
25 | + private Long id; | ||
26 | + | ||
27 | + @NotNull | ||
28 | + @Length(min = 1, max = 35) | ||
29 | + @Column(name = "PASSWORD_DIGEST", nullable = false, length = 35) | ||
30 | + private String passwordDigest; | ||
31 | + | ||
32 | + @NotNull | ||
33 | |||
34 | + @Length(max = 255) | ||
35 | + @Column(name = "USERNAME", nullable = false, unique = true) | ||
36 | + private String username; | ||
37 | + | ||
38 | + @NotNull | ||
39 | + @Temporal(javax.persistence.TemporalType.DATE) | ||
40 | + @Column(name = "REGISTRATION_DATE", nullable = false) | ||
41 | + private Date registrationDate; | ||
42 | + | ||
43 | + @Column(name = "ACTIVE", nullable = false) | ||
44 | + private boolean active; | ||
45 | + | ||
46 | + public Long getId() { | ||
47 | + return id; | ||
48 | + } | ||
49 | + | ||
50 | + public void setId(Long id) { | ||
51 | + this.id = id; | ||
52 | + } | ||
53 | + | ||
54 | + public String getUsername() { | ||
55 | + return username; | ||
56 | + } | ||
57 | + | ||
58 | + public void setUsername(String username) { | ||
59 | + this.username = username; | ||
60 | + } | ||
61 | + | ||
62 | + public Date getRegistrationDate() { | ||
63 | + return registrationDate; | ||
64 | + } | ||
65 | + | ||
66 | + public void setRegistrationDate(Date registrationDate) { | ||
67 | + this.registrationDate = registrationDate; | ||
68 | + } | ||
69 | + | ||
70 | + public String getPasswordDigest() { | ||
71 | + return passwordDigest; | ||
72 | + } | ||
73 | + | ||
74 | + public void setPasswordDigest(String passwordDigest) { | ||
75 | + this.passwordDigest = passwordDigest; | ||
76 | + } | ||
77 | + | ||
78 | + public boolean isActive() { | ||
79 | + return active; | ||
80 | + } | ||
81 | + | ||
82 | + public void setActive(boolean active) { | ||
83 | + this.active = active; | ||
84 | + } | ||
85 | + | ||
86 | + @Override | ||
87 | + public int hashCode() { | ||
88 | + int hash = 0; | ||
89 | + hash += (id != null ? id.hashCode() : 0); | ||
90 | + return hash; | ||
91 | + } | ||
92 | + | ||
93 | + @Override | ||
94 | + public boolean equals(Object object) { | ||
95 | + if (!(object instanceof User)) { | ||
96 | + return false; | ||
97 | + } | ||
98 | + User other = (User) object; | ||
99 | + return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))); | ||
100 | + } | ||
101 | + | ||
102 | +} |
1 | +package no.knowit.seam.example.security; | ||
2 | + | ||
3 | +import no.knowit.seam.example.model.User; | ||
4 | +import org.jboss.seam.annotations.In; | ||
5 | +import org.jboss.seam.annotations.Logger; | ||
6 | +import org.jboss.seam.annotations.Name; | ||
7 | +import org.jboss.seam.international.StatusMessages; | ||
8 | +import org.jboss.seam.log.Log; | ||
9 | +import org.jboss.seam.security.Credentials; | ||
10 | +import org.jboss.seam.security.Identity; | ||
11 | +import org.jboss.seam.security.management.PasswordHash; | ||
12 | + | ||
13 | +import javax.persistence.EntityManager; | ||
14 | +import javax.persistence.NoResultException; | ||
15 | + | ||
16 | +@Name("authenticator") | ||
17 | +public class Authenticator { | ||
18 | + | ||
19 | + @Logger | ||
20 | + Log log; | ||
21 | + @In | ||
22 | + private EntityManager entityManager; | ||
23 | + @In | ||
24 | + Identity identity; | ||
25 | + @In | ||
26 | + Credentials credentials; | ||
27 | + @In | ||
28 | + StatusMessages statusMessages; | ||
29 | + @In | ||
30 | + PasswordHash passwordHash; | ||
31 | + | ||
32 | + /** | ||
33 | + * Check user with given username and password exists in database. | ||
34 | + * | ||
35 | + * @return true if user exist and account is active; false otherwise | ||
36 | + */ | ||
37 | + public boolean authenticate() { | ||
38 | + String passwordDigest = passwordHash.generateHash(credentials.getPassword()); | ||
39 | + try { | ||
40 | + User user = (User) entityManager.createQuery("from User where active = true and username=:username and passwordDigest=:password") | ||
41 | + .setParameter("username", credentials.getUsername()).setParameter("password", passwordDigest).getSingleResult(); | ||
42 | + log.info("#0 has logged in", user.getUsername()); | ||
43 | + return true; | ||
44 | + } catch (NoResultException ex) { | ||
45 | + return false; | ||
46 | + } | ||
47 | + } | ||
48 | +} |
1 | +down = \u2193 | ||
2 | + | ||
3 | +javax.faces.component.UIInput.CONVERSION = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430\u043D\u0430 \u043A\u044A\u043C \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u0438\u044F \u0442\u0438\u043F | ||
4 | +javax.faces.component.UIInput.REQUIRED = \u043F\u043E\u043B\u0435\u0442\u043E \u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E | ||
5 | +javax.faces.component.UIInput.UPDATE = \u0432\u044A\u0437\u043D\u0438\u043A\u043D\u0430\u043B\u0430 \u0435 \u0433\u0440\u0435\u0448\u043A\u0430 \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u043D\u0430 \u0438\u0437\u043F\u0440\u0430\u0442\u0435\u043D\u0430\u0442\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F | ||
6 | +javax.faces.component.UISelectMany.INVALID = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0435 \u043D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 | ||
7 | +javax.faces.component.UISelectOne.INVALID = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0435 \u043D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 | ||
8 | +javax.faces.converter.BigDecimalConverter.DECIMAL = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
9 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u0441\u044A\u0441 \u0437\u043D\u0430\u043A, \u0441\u044A\u0441\u0442\u043E\u044F\u0449\u043E \u0441\u0435 \u043E\u0442 \u043D\u0443\u043B\u0430 \u0438\u043B\u0438 \u043F\u043E\u0432\u0435\u0447\u0435 \u0446\u0438\u0444\u0440\u0438, \u0441\u043B\u0435\u0434\u0432\u0430\u043D\u043E \u043F\u043E \u0438\u0437\u0431\u043E\u0440 \u043E\u0442 \u0434\u0435\u0441\u0435\u0442\u0438\u0447\u043D\u0430 \u0437\u0430\u043F\u0435\u0442\u0430\u044F \u0438 \u0434\u0440\u043E\u0431\u043D\u0430 \u0447\u0430\u0441\u0442, \u043D\u0430\u043F\u0440. {1} | ||
10 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E | ||
11 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u0441\u044A\u0441 \u0437\u043D\u0430\u043A, \u0441\u044A\u0441\u0442\u043E\u044F\u0449\u043E \u0441\u0435 \u043E\u0442 \u043D\u0443\u043B\u0430 \u0438\u043B\u0438 \u043F\u043E\u0432\u0435\u0447\u0435 \u0446\u0438\u0444\u0440\u0438 | ||
12 | +javax.faces.converter.BooleanConverter.BOOLEAN = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 'true' \u0438\u043B\u0438 'false' | ||
13 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 'true' \u0438\u043B\u0438 'false' (\u0432\u0441\u044F\u043A\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0440\u0430\u0437\u043B\u0438\u0447\u043D\u0430 \u043E\u0442 'true' \u0449\u0435 \u0441\u0435 \u0441\u043C\u044F\u0442\u0430 \u0437\u0430 'false') | ||
14 | +javax.faces.converter.ByteConverter.BYTE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0434\u0436\u0443 0 \u0438 255 | ||
15 | +javax.faces.converter.ByteConverter.BYTE_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0434\u0436\u0443 0 \u0438 255 | ||
16 | +javax.faces.converter.CharacterConverter.CHARACTER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0437\u043D\u0430\u043A | ||
17 | +javax.faces.converter.CharacterConverter.CHARACTER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0432\u0430\u043B\u0438\u0434\u0435\u043D ASCII \u0437\u043D\u0430\u043A | ||
18 | +javax.faces.converter.DateTimeConverter.DATE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430 | ||
19 | +javax.faces.converter.DateTimeConverter.DATETIME = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430 \u0438 \u0447\u0430\u0441 | ||
20 | +javax.faces.converter.DateTimeConverter.DATETIME_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430 \u0438 \u0447\u0430\u0441, \u043D\u0430\u043F\u0440. {1} | ||
21 | +javax.faces.converter.DateTimeConverter.DATE_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0434\u0430\u0442\u0430, \u043D\u0430\u043F\u0440. {1} | ||
22 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0437\u0430\u0434\u0430\u0434\u0435\u043D \u043E\u0431\u0440\u0430\u0437\u0435\u0446 \u0438\u043B\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 type, \u0437\u0430 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 | ||
23 | +javax.faces.converter.DateTimeConverter.TIME = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043E\u0442 \u0442\u0438\u043F \u0447\u0430\u0441 | ||
24 | +javax.faces.converter.DateTimeConverter.TIME_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043E\u0442 \u0442\u0438\u043F \u0447\u0430\u0441, \u043D\u0430\u043F\u0440. {1} | ||
25 | +javax.faces.converter.DoubleConverter.DOUBLE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
26 | +javax.faces.converter.DoubleConverter.DOUBLE_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 4.9E-324 \u0438 1.7976931348623157E308 | ||
27 | +javax.faces.converter.EnumConverter.ENUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F | ||
28 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u043E\u0442 \u0438\u043B\u0438 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F, \u043D\u043E \u043D\u0435 \u0435 \u043F\u043E\u0434\u0430\u0434\u0435\u043D \u043A\u043B\u0430\u0441 \u043E\u0442 \u0442\u0430\u043A\u044A\u0432 \u0442\u0438\u043F | ||
29 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u043E\u0442 \u0438\u043B\u0438 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F, \u043D\u043E \u043D\u0435 \u0435 \u043F\u043E\u0434\u0430\u0434\u0435\u043D \u043A\u043B\u0430\u0441 \u043E\u0442 \u0442\u0430\u043A\u044A\u0432 \u0442\u0438\u043F | ||
30 | +javax.faces.converter.EnumConverter.ENUM_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0441\u0435 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u0443\u0432\u0430 \u043E\u0442 \u0438\u043B\u0438 \u0434\u043E \u0438\u0437\u0431\u0440\u043E\u0435\u043D \u0442\u0438\u043F, \u043A\u043E\u0439\u0442\u043E \u0441\u044A\u0434\u044A\u0440\u0436\u0430 \u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0430\u0442\u0430 {1} | ||
31 | +javax.faces.converter.FloatConverter.FLOAT = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
32 | +javax.faces.converter.FloatConverter.FLOAT_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 1.4E-45 \u0438 3.4028235E38 | ||
33 | +javax.faces.converter.IntegerConverter.INTEGER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E | ||
34 | +javax.faces.converter.IntegerConverter.INTEGER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 -2147483648 \u0438 2147483647 | ||
35 | +javax.faces.converter.LongConverter.LONG = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E | ||
36 | +javax.faces.converter.LongConverter.LONG_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 -9223372036854775808 \u0438 9223372036854775807 | ||
37 | +javax.faces.converter.NumberConverter.CURRENCY = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0441\u0443\u043C\u0430 \u0432\u044A\u0432 \u0432\u0430\u043B\u0443\u0442\u0430 | ||
38 | +javax.faces.converter.NumberConverter.CURRENCY_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0441\u0443\u043C\u0430 \u0432\u044A\u0432 \u0432\u0430\u043B\u0443\u0442\u0430, \u043D\u0430\u043F\u0440. {1} | ||
39 | +javax.faces.converter.NumberConverter.NUMBER = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
40 | +javax.faces.converter.NumberConverter.NUMBER_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
41 | +javax.faces.converter.NumberConverter.PATTERN = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
42 | +javax.faces.converter.NumberConverter.PATTERN_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0447\u0438\u0441\u043B\u043E | ||
43 | +javax.faces.converter.NumberConverter.PERCENT = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u043E\u0446\u0435\u043D\u0442 | ||
44 | +javax.faces.converter.NumberConverter.PERCENT_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u043E\u0446\u0435\u043D\u0442, \u043D\u0430\u043F\u0440. {1} | ||
45 | +javax.faces.converter.STRING = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u043C\u043E\u0436\u0435 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u0440\u0435\u0432\u044A\u0440\u043D\u0430\u0442\u0430 \u0432 \u043D\u0438\u0437 \u043E\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u0438 | ||
46 | +javax.faces.converter.ShortConverter.SHORT = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E | ||
47 | +javax.faces.converter.ShortConverter.SHORT_detail = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0446\u044F\u043B\u043E \u0447\u0438\u0441\u043B\u043E \u043C\u0435\u0436\u0434\u0443 -32768 \u0438 32767 | ||
48 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u043C\u0430\u043B\u043A\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} | ||
49 | +javax.faces.validator.DoubleRangeValidator.MINIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0433\u043E\u043B\u044F\u043C\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} | ||
50 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {0} \u0438 {1} | ||
51 | +javax.faces.validator.DoubleRangeValidator.TYPE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u0435 \u043E\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u043D\u0438\u044F \u0432\u0438\u0434 | ||
52 | +javax.faces.validator.LengthValidator.MAXIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043D\u0435 \u043F\u043E-\u0434\u044A\u043B\u0433\u0430 \u043E\u0442 {0} \u0437\u043D\u0430\u043A\u0430 | ||
53 | +javax.faces.validator.LengthValidator.MINIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0434\u044A\u043B\u0433\u0430 \u043E\u0442 {0} \u0437\u043D\u0430\u043A\u0430 | ||
54 | +javax.faces.validator.LongRangeValidator.MAXIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u043C\u0430\u043B\u043A\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} | ||
55 | +javax.faces.validator.LongRangeValidator.MINIMUM = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0433\u043E\u043B\u044F\u043C\u0430 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u0430 \u043D\u0430 {0} | ||
56 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {0} \u0438 {1} | ||
57 | +javax.faces.validator.LongRangeValidator.TYPE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u043D\u0435 \u0435 \u043E\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u043D\u0438\u044F \u0432\u0438\u0434 | ||
58 | +javax.faces.validator.NOT_IN_RANGE = \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {0} \u0438 {1} | ||
59 | + | ||
60 | +left = \u2039 | ||
61 | + | ||
62 | +org.jboss.seam.IllegalNavigation = \u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F | ||
63 | +org.jboss.seam.NoConversation = \u0420\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u044A\u0442 \u0435 \u043F\u0440\u0438\u043A\u043B\u044E\u0447\u0438\u043B, \u0438\u0437\u0442\u0435\u043A\u043B\u043E \u043C\u0443 \u0435 \u0432\u0440\u0435\u043C\u0435\u0442\u043E \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0430 \u0437\u0430\u044F\u0432\u043A\u0430 | ||
64 | +org.jboss.seam.ProcessEnded = \u041F\u0440\u043E\u0446\u0435\u0441 #0 \u0435 \u043F\u0440\u0438\u043A\u043B\u044E\u0447\u0438\u043B | ||
65 | +org.jboss.seam.ProcessNotFound = \u041F\u0440\u043E\u0446\u0435\u0441 #0 \u043D\u0435 \u0435 \u043D\u0430\u043C\u0435\u0440\u0435\u043D | ||
66 | +org.jboss.seam.TaskEnded = \u0417\u0430\u0434\u0430\u0447\u0430 #0 \u0435 \u043F\u0440\u0438\u043A\u043B\u044E\u0447\u0438\u043B\u0430 | ||
67 | +org.jboss.seam.TaskNotFound = \u0417\u0430\u0434\u0430\u0447\u0430 #0 \u043D\u0435 \u0435 \u043D\u0430\u043C\u0435\u0440\u0435\u043D\u0430 | ||
68 | +org.jboss.seam.TransactionFailed = \u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043D\u0435 \u0435 \u0443\u0441\u043F\u044F\u043B\u0430 | ||
69 | +org.jboss.seam.NotLoggedIn = \u041C\u043E\u043B\u044F \u043F\u044A\u0440\u0432\u043E \u0441\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0430\u0439\u0442\u0435 | ||
70 | + | ||
71 | +org.jboss.seam.loginFailed = \u041D\u0435\u0443\u0441\u043F\u0435\u0448\u0435\u043D \u0432\u0445\u043E\u0434 | ||
72 | +org.jboss.seam.loginSuccessful = \u0417\u0434\u0440\u0430\u0432\u0435\u0439, #0 | ||
73 | + | ||
74 | +right = \u203A | ||
75 | + | ||
76 | +up = \u2191 | ||
77 | + | ||
78 | +validator.assertFalse = \u0433\u0440\u0435\u0448\u043A\u0438 \u043F\u0440\u0438 \u0432\u0430\u043B\u0438\u0434\u0430\u0446\u0438\u044F | ||
79 | +validator.assertTrue = \u0433\u0440\u0435\u0448\u043A\u0438 \u043F\u0440\u0438 \u0432\u0430\u043B\u0438\u0434\u0430\u0446\u0438\u044F | ||
80 | +validator.email = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0432\u0430\u043B\u0438\u0434\u0435\u043D e-mail \u0430\u0434\u0440\u0435\u0441 | ||
81 | +validator.future = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u0431\u044A\u0434\u0435\u0449\u0430 \u0434\u0430\u0442\u0430 | ||
82 | +validator.length = \u0434\u044A\u043B\u0436\u0438\u043D\u0430\u0442\u0430 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043C\u0435\u0436\u0434\u0443 {min} \u0438 {max} | ||
83 | +validator.max = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u043C\u0430\u043B\u043A\u043E \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u043E \u043D\u0430 {value} | ||
84 | +validator.min = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043F\u043E-\u0433\u043E\u043B\u044F\u043C\u043E \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u043E \u043D\u0430 {value} | ||
85 | +validator.notNull = \u0435 \u0437\u0430\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E | ||
86 | +validator.past = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0438\u043D\u0430\u043B\u0430 \u0434\u0430\u0442\u0430\u0442\u0430 | ||
87 | +validator.pattern = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0430 \u043D\u0430 "{regex}" | ||
88 | +validator.range = \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0435\u0436\u0434\u0443 {min} \u0438 {max} | ||
89 | +validator.size = \u0440\u0430\u0437\u043C\u0435\u0440\u044A\u0442 \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0435 \u043C\u0435\u0436\u0434\u0443 {min} \u0438 {max} |
1 | +up=\u2191 | ||
2 | +down=\u2193 | ||
3 | +left=\u2039 | ||
4 | +right=\u203A | ||
5 | + | ||
6 | +validator.assertFalse=Validierung fehlgeschlagen | ||
7 | +validator.assertTrue=Validierung fehlgeschlagen | ||
8 | +validator.future=muss einem zuk\u00FCnfitigen Datum entsprechen | ||
9 | +validator.length=die L\u00E4nge muss zwischen {min} und {max} liegen | ||
10 | +validator.max=muss kleiner oder gleich {value} sein | ||
11 | +validator.min=muss gr\u00F6\u00DFer oder gleich {value} sein | ||
12 | +validator.notNull=darf nicht leer sein | ||
13 | +validator.past=muss einem vergangenen Datum entsprechen | ||
14 | +validator.pattern=muss dem regul\u00E4ren Ausdruck "{regex}" entsprechen | ||
15 | +validator.range=muss im Wertebereich von {min} bis {max} liegen | ||
16 | +validator.size=die Gr\u00F6\u00DFe muss zischen {min} und {max} liegen | ||
17 | +validator.email=muss einer wohlgeformten E-Mailadresse entsprechen | ||
18 | + | ||
19 | +org.jboss.seam.loginFailed=Anmeldung fehlgeschlagen | ||
20 | +org.jboss.seam.loginSuccessful=Willkommen, #0! | ||
21 | + | ||
22 | +org.jboss.seam.TransactionFailed=Transaktion fehlgeschlagen | ||
23 | +org.jboss.seam.NoConversation=Der Vorgang wurde bereits beendet, verarbeitet eine andere Abfrage oder ergab eine Zeit\u00FCberschreitung | ||
24 | +org.jboss.seam.IllegalNavigation=Unzul\u00E4ssige Navigation | ||
25 | +org.jboss.seam.ProcessEnded=Prozess #0 wurde bereits beendet | ||
26 | +org.jboss.seam.ProcessNotFound=Prozess #0 nicht gefunden | ||
27 | +org.jboss.seam.TaskEnded=Funktion #0 wurde bereits beendet | ||
28 | +org.jboss.seam.TaskNotFound=Funktion #0 nicht gefunden | ||
29 | +org.jboss.seam.NotLoggedIn=Bitte melden Sie sich zun\u00E4chst an | ||
30 | + | ||
31 | +javax.faces.component.UIInput.CONVERSION=Wert konnte nicht in den erwarteten Typ umgewandelt werden | ||
32 | +javax.faces.component.UIInput.REQUIRED=Wert erforderlich | ||
33 | +javax.faces.component.UIInput.UPDATE=ein Fehler ist bei der Verarbeitung der von Ihnen gesendeten Daten aufgetreten | ||
34 | +javax.faces.component.UISelectOne.INVALID=Wert ung\u00FCltig | ||
35 | +javax.faces.component.UISelectMany.INVALID=Wert ung\u00FCltig | ||
36 | + | ||
37 | +javax.faces.converter.BigDecimalConverter.DECIMAL = ''{0}'' muss eine Dezimalzahl sein. | ||
38 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail = ''{0}'' muss eine Dezimalzahl aus keinem oder mehr Zeichen gefolgt von einem optionalen Punkt und den Nachkommastellen sein. Beispiel: {1} | ||
39 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. | ||
40 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. Beispiel: {1} | ||
41 | +javax.faces.converter.BooleanConverter.BOOLEAN = ''{0}'' muss 'true' oder 'false' sein. | ||
42 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail = ''{0}'' muss 'true' oder 'false' sein. Jeder Wert au\u00DFer 'true' wird als 'false' interpretiert. | ||
43 | +javax.faces.converter.ByteConverter.BYTE = ''{0}'' muss eine Zahl zwischen 0 und 255 sein. | ||
44 | +javax.faces.converter.ByteConverter.BYTE_detail = ''{0}'' muss eine Zahl zwischen 0 und 255 sein. Beispiel: {1} | ||
45 | +javax.faces.converter.CharacterConverter.CHARACTER = ''{0}'' muss ein g\u00FCltiges Zeichen sein. | ||
46 | +javax.faces.converter.CharacterConverter.CHARACTER_detail = ''{0}'' muss ein g\u00FCltiges ASCII Zeichen sein. | ||
47 | +javax.faces.converter.DateTimeConverter.DATE = ''{0}'' konnte nicht als Datum erkannt werden. | ||
48 | +javax.faces.converter.DateTimeConverter.DATE_detail = ''{0}'' konnte nicht als Datum erkannt werden. Beispiel: {1} | ||
49 | +javax.faces.converter.DateTimeConverter.TIME = ''{0}'' konnte nicht als Zeit erkannt werden. | ||
50 | +javax.faces.converter.DateTimeConverter.TIME_detail = ''{0}'' konnte nicht als Zeit erkannt werden. Beispiel: {1} | ||
51 | +javax.faces.converter.DateTimeConverter.DATETIME = ''{0}'' konnte nicht als Datum und Zeit erkannt werden. | ||
52 | +javax.faces.converter.DateTimeConverter.DATETIME_detail = ''{0}'' konnte nicht als Datum und Zeit erkannt werden. Beispiel: {1} | ||
53 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE = Ein 'pattern' oder 'type' Attribut muss angegeben werden um den Wert ''{0}'' zu konvertieren. | ||
54 | +javax.faces.converter.DoubleConverter.DOUBLE = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. | ||
55 | +javax.faces.converter.DoubleConverter.DOUBLE_detail = ''{0}'' muss eine Zahl zwischen 4.9E-324 und 1.7976931348623157E308 sein. Beispiel: {1} | ||
56 | +javax.faces.converter.EnumConverter.ENUM = ''{0}'' muss in eine Enumeration konvertierbar sein. | ||
57 | +javax.faces.converter.EnumConverter.ENUM_detail = ''{0}'' muss in eine Enumeration konvertierbar sein, welche die Konstante ''{1}'' enth\u00E4lt. | ||
58 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS = ''{0}'' muss in eine Enumeration konvertierbar sein, aber es wurde keine Klasse des Typs Enum bereitgestellt. | ||
59 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = ''{0}'' muss in eine Enumeration konvertierbar sein, aber es wurde keine Klasse des Typs Enum bereitgestellt. | ||
60 | +javax.faces.converter.FloatConverter.FLOAT = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. | ||
61 | +javax.faces.converter.FloatConverter.FLOAT_detail = ''{0}'' muss eine Zahl zwischen 1.4E-45 und 3.4028235E38 sein. Beispiel: {1} | ||
62 | +javax.faces.converter.IntegerConverter.INTEGER = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. | ||
63 | +javax.faces.converter.IntegerConverter.INTEGER_detail = ''{0}'' muss eine Zahl zwischen -2147483648 und 2147483647 sein. Beispiel: {1} | ||
64 | +javax.faces.converter.LongConverter.LONG = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. | ||
65 | +javax.faces.converter.LongConverter.LONG_detail = ''{0}'' muss eine Zahl zwischen -9223372036854775808 und 9223372036854775807 sein. Beispiel: {1} | ||
66 | +javax.faces.converter.NumberConverter.CURRENCY = ''{0}'' konnte nicht als ein Geldbetrag erkannt werden. | ||
67 | +javax.faces.converter.NumberConverter.CURRENCY_detail = ''{0}'' konnte nicht als ein Geldbetrag erkannt werden. Beispiel: {1} | ||
68 | +javax.faces.converter.NumberConverter.PERCENT = ''{0}'' konnte nicht als ein Prozentanteil erkannt werden. | ||
69 | +javax.faces.converter.NumberConverter.PERCENT_detail = ''{0}'' konnte nicht als ein Prozentanteil erkannt werden. Beispiel: {1} | ||
70 | +javax.faces.converter.NumberConverter.NUMBER = ''{0}'' ist keine Zahl. | ||
71 | +javax.faces.converter.NumberConverter.NUMBER_detail = ''{0}'' ist keine Zahl. Beispiel: {1} | ||
72 | +javax.faces.converter.NumberConverter.PATTERN = ''{0}'' ist kein Zahlmuster. | ||
73 | +javax.faces.converter.NumberConverter.PATTERN_detail = ''{0}'' ist kein Zahlmuster. Beispiel: {1} | ||
74 | +javax.faces.converter.ShortConverter.SHORT = ''{0}'' muss eine Zahl aus ein oder mehr Ziffern sein. | ||
75 | +javax.faces.converter.ShortConverter.SHORT_detail = ''{0}'' muss eine Zahl zwischen -32768 und 32767 sein. Beispiel: {1} | ||
76 | +javax.faces.converter.STRING = Konnte ''{0}'' nicht in eine Zeichenkette konvertieren. | ||
77 | + | ||
78 | +javax.faces.validator.NOT_IN_RANGE = Validierungsfehler: Der Wert liegt nicht im erwarteten Wertebereich von {0} bis {1}. | ||
79 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM = Validierungsfehler: Der Wert ist gr\u00F6\u00DFer als das erlaubte Maximum von ''{0}'' | ||
80 | +javax.faces.validator.DoubleRangeValidator.MINIMUM = Validierungsfehler: Der Wert ist kleiner als das erlaubte Minimum von ''{0}'' | ||
81 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE = Validierungsfehler: Der Wert ist nicht zwischen den erwarteten Werten von {0} und {1} | ||
82 | +javax.faces.validator.DoubleRangeValidator.TYPE = Validierungsfehler: Der Wert ist nicht vom korrekten Typ | ||
83 | +javax.faces.validator.LengthValidator.MAXIMUM = Validierungsfehler: Der Wert ist gr\u00F6\u00DFer als das erlaubte Maximum von ''{0}'' | ||
84 | +javax.faces.validator.LengthValidator.MINIMUM = Validierungsfehler: Der Wert ist kleiner als das erlaubte Minimum von ''{0}'' | ||
85 | +javax.faces.validator.LongRangeValidator.MAXIMUM = Validierungsfehler: Der Wert ist gr\u00F6\u00DFer als das erlaubte Maximum von ''{0}'' | ||
86 | +javax.faces.validator.LongRangeValidator.MINIMUM = Validation Error: Der Wert ist kleiner als das erlaubte Minimum von ''{0}'' | ||
87 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE = Validierungsfehler: Der Wert ist nicht zwischen den erwarteten Werten von {0} und {1}. | ||
88 | +javax.faces.validator.LongRangeValidator.TYPE = Validierungsfehler: Der Wert ist nicht vom korrekten Typ. |
1 | +up=\u2191 | ||
2 | +down=\u2193 | ||
3 | +left=\u2039 | ||
4 | +right=\u203A | ||
5 | + | ||
6 | +validator.assertFalse=validation failed | ||
7 | +validator.assertTrue=validation failed | ||
8 | +validator.future=must be a future date | ||
9 | +validator.length=length must be between {min} and {max} | ||
10 | +validator.max=must be less than or equal to {value} | ||
11 | +validator.min=must be greater than or equal to {value} | ||
12 | +validator.notNull=may not be null | ||
13 | +validator.past=must be a past date | ||
14 | +validator.pattern=must match "{regex}" | ||
15 | +validator.range=must be between {min} and {max} | ||
16 | +validator.size=size must be between {min} and {max} | ||
17 | +validator.email=must be a well-formed email address | ||
18 | + | ||
19 | +org.jboss.seam.loginFailed=Login failed | ||
20 | +org.jboss.seam.loginSuccessful=Welcome, #0! | ||
21 | + | ||
22 | +org.jboss.seam.TransactionFailed=Transaction failed | ||
23 | +org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request | ||
24 | +org.jboss.seam.IllegalNavigation=Illegal navigation | ||
25 | +org.jboss.seam.ProcessEnded=Process #0 already ended | ||
26 | +org.jboss.seam.ProcessNotFound=Process #0 not found | ||
27 | +org.jboss.seam.TaskEnded=Task #0 already ended | ||
28 | +org.jboss.seam.TaskNotFound=Task #0 not found | ||
29 | +org.jboss.seam.NotLoggedIn=Please log in first | ||
30 | + | ||
31 | +javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type | ||
32 | +javax.faces.component.UIInput.REQUIRED=value is required | ||
33 | +javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information | ||
34 | +javax.faces.component.UISelectOne.INVALID=value is not valid | ||
35 | +javax.faces.component.UISelectMany.INVALID=value is not valid | ||
36 | + | ||
37 | +javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number | ||
38 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1} | ||
39 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer | ||
40 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits | ||
41 | +javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false | ||
42 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false) | ||
43 | +javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255 | ||
44 | +javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255 | ||
45 | +javax.faces.converter.CharacterConverter.CHARACTER=value must be a character | ||
46 | +javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character | ||
47 | +javax.faces.converter.DateTimeConverter.DATE=value must be a date | ||
48 | +javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1} | ||
49 | +javax.faces.converter.DateTimeConverter.TIME=value must be a time | ||
50 | +javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1} | ||
51 | +javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time | ||
52 | +javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1} | ||
53 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value | ||
54 | +javax.faces.converter.DoubleConverter.DOUBLE=value must be a number | ||
55 | +javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308 | ||
56 | +javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum | ||
57 | +javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1} | ||
58 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided | ||
59 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided | ||
60 | +javax.faces.converter.FloatConverter.FLOAT=value must be a number | ||
61 | +javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38 | ||
62 | +javax.faces.converter.IntegerConverter.INTEGER=value must be an integer | ||
63 | +javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647 | ||
64 | +javax.faces.converter.LongConverter.LONG=value must be an integer | ||
65 | +javax.faces.converter.LongConverter.LONG_detail=value must be an integer number between -9223372036854775808 and 9223372036854775807 | ||
66 | +javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount | ||
67 | +javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1} | ||
68 | +javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount | ||
69 | +javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1} | ||
70 | +javax.faces.converter.NumberConverter.NUMBER=value must be a number | ||
71 | +javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number | ||
72 | +javax.faces.converter.NumberConverter.PATTERN=value must be a number | ||
73 | +javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number | ||
74 | +javax.faces.converter.ShortConverter.SHORT=value must be an integer | ||
75 | +javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767 | ||
76 | + | ||
77 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0} | ||
78 | +javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0} | ||
79 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} | ||
80 | +javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type | ||
81 | +javax.faces.validator.LengthValidator.MAXIMUM=value must be shorter than or equal to {0} characters | ||
82 | +javax.faces.validator.LengthValidator.MINIMUM=value must be longer than or equal to {0} characters | ||
83 | +javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0} | ||
84 | +javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0} | ||
85 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} | ||
86 | +javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type | ||
87 | + | ||
88 | +javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1} | ||
89 | +javax.faces.converter.STRING=value could not be converted to a string | ||
90 | + |
1 | +up=\u2191 | ||
2 | +down=\u2193 | ||
3 | +left=\u2039 | ||
4 | +right=\u203A | ||
5 | + | ||
6 | +javax.persistence.EntityNotFoundException = Entité introuvable | ||
7 | +javax.persistence.OptimisticLockException = Un autre utilisateur a modifié les mêmes données. Veuillez essayer de nouveau. | ||
8 | + | ||
9 | +validator.assertFalse = La validation a échoué | ||
10 | +validator.assertTrue = La validation a échoué | ||
11 | +validator.future = doit être une date à venir. | ||
12 | +validator.length = la longueur doit être comprise entre {min} et {max} | ||
13 | +validator.max = doit être inférieur(e) ou égal(e) à {value} | ||
14 | +validator.min = doit être supérieur(e) ou égal(e) à {value} | ||
15 | +validator.notNull = ne peut être nul(le) | ||
16 | +validator.past = doit être une date passée | ||
17 | +validator.pattern = doit correspondre à "{regex}" | ||
18 | +validator.range = doit être compris(e) entre {min} et {max} | ||
19 | +validator.size = La taille doit être comprise entre {min} et {max} | ||
20 | +validator.email = doit être une adresse email valide | ||
21 | + | ||
22 | +org.jboss.seam.framework.EntityNotFoundException = Entité introuvable | ||
23 | +org.jboss.seam.security.AuthorizationException = Vous n'avez pas les autorisations nécessaires pour effectuer ceci | ||
24 | +org.jboss.seam.security.NotLoggedInException = Veuillez d'abord vous connecter | ||
25 | +org.jboss.seam.unexpected.error = Erreur inattendue. Veuillez essayez de nouveau. | ||
26 | + | ||
27 | +org.jboss.seam.loginFailed = La connexion a échoué. | ||
28 | +org.jboss.seam.loginSuccessful = Bienvenue, {0}! | ||
29 | + | ||
30 | +org.jboss.seam.TransactionFailed = La transaction a échoué. | ||
31 | +org.jboss.seam.NoConversation = La conversation s'est interrompue, a dépassé les délais ou traite une autre requête. | ||
32 | +org.jboss.seam.IllegalNavigation = Navigation illégale | ||
33 | +org.jboss.seam.ProcessEnded = Processus #0 déjà achevé | ||
34 | +org.jboss.seam.ProcessNotFound = Le processus #0 n'a pas été trouvé. | ||
35 | +org.jboss.seam.TaskEnded = Tâche #0 déjà achevée | ||
36 | +org.jboss.seam.TaskNotFound = La tâche #0 n'a pas été trouvée. | ||
37 | +org.jboss.seam.NotLoggedIn = Veuillez d'abord vous connecter. | ||
38 | + | ||
39 | +javax.faces.component.UIInput.CONVERSION = La valeur ne peut être convertie dans le type attendu | ||
40 | +javax.faces.component.UIInput.REQUIRED = Une valeur est requise. | ||
41 | +javax.faces.component.UIInput.UPDATE = Une erreur est survenue lors du traitement de l'information que vous avez fournie | ||
42 | +javax.faces.component.UISelectMany.INVALID = La valeur n'est pas valide. | ||
43 | +javax.faces.component.UISelectOne.INVALID = La valeur n'est pas valide. | ||
44 | + | ||
45 | +javax.faces.converter.BigDecimalConverter.DECIMAL = la valeur doit être un nombre | ||
46 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail = la valeur doit être un nombre décimal signé comprenant zéro chiffre ou plus, éventuellement suivi par une virgule décimale et une faction, par ex. {1} | ||
47 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER = la valeur doit être un nombre | ||
48 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail = la valeur doit être un entier signé comprenant zéro chiffre ou plus | ||
49 | +javax.faces.converter.BooleanConverter.BOOLEAN = la valeur doit être "vrai" ou "faux" | ||
50 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail = la valeur doit être "vrai" ou "faux" (toute valeur autre que "vrai" est évaluée à "faux") | ||
51 | +javax.faces.converter.ByteConverter.BYTE = la valeur doit être un nombre entre 0 et 255 | ||
52 | +javax.faces.converter.ByteConverter.BYTE_detail = la valeur doit être un nombre entre 0 et 255 | ||
53 | +javax.faces.converter.CharacterConverter.CHARACTER = la valeur doit être un caractère | ||
54 | +javax.faces.converter.CharacterConverter.CHARACTER_detail = la valeur doit être un caractère ASCII valide | ||
55 | +javax.faces.converter.DateTimeConverter.DATE = la valeur doit être une date | ||
56 | +javax.faces.converter.DateTimeConverter.DATE_detail = la valeur doit être une date, par ex. {1} | ||
57 | +javax.faces.converter.DateTimeConverter.TIME = la valeur doit être une heure | ||
58 | +javax.faces.converter.DateTimeConverter.TIME_detail = la valeur doit être une heure, par ex. {1} | ||
59 | +javax.faces.converter.DateTimeConverter.DATETIME = la valeur doit être une date et une heure | ||
60 | +javax.faces.converter.DateTimeConverter.DATETIME_detail = la valeur doit être une date et une heure, par ex. {1} | ||
61 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE = un attribut doit indiquer le modèle ou le type pour convertir la valeur | ||
62 | +javax.faces.converter.DoubleConverter.DOUBLE = la valeur doit être un nombre | ||
63 | +javax.faces.converter.DoubleConverter.DOUBLE_detail = la valeur doit être un nombre entre 4,9E-324 et 17976931348623157E308 | ||
64 | +javax.faces.converter.EnumConverter.ENUM = la valeur doit être convertible en une énumération | ||
65 | +javax.faces.converter.EnumConverter.ENUM_detail = la valeur doit être convertible en une énumération ou depuis l''énumération qui contient la constante {1} | ||
66 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS = la valeur doit être convertible en une énumération ou depuis l'énumération, mais aucune classe d'énumération n'est fournie | ||
67 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail = la valeur doit être convertible en une énumération ou depuis l'énumération, mais aucune classe d'énumération n'est fournie | ||
68 | +javax.faces.converter.FloatConverter.FLOAT = la valeur doit être un nombre | ||
69 | +javax.faces.converter.FloatConverter.FLOAT_detail = la valeur doit être un nombre entre 1,4E-45 et 3,4028235E38 | ||
70 | +javax.faces.converter.IntegerConverter.INTEGER = la valeur doit être un nombre | ||
71 | +javax.faces.converter.IntegerConverter.INTEGER_detail = la valeur doit être un nombre entre -2147483648 et 2147483647 | ||
72 | +javax.faces.converter.LongConverter.LONG = la valeur doit être un nombre | ||
73 | +javax.faces.converter.LongConverter.LONG_detail = la valeur doit être un nombre entre -9223372036854775808 et 9223372036854775807 | ||
74 | +javax.faces.converter.NumberConverter.CURRENCY = la valeur doit être un montant monétaire | ||
75 | +javax.faces.converter.NumberConverter.CURRENCY_detail = la valeur doit être un montant monétaire, par ex. {1} | ||
76 | +javax.faces.converter.NumberConverter.NUMBER = la valeur doit être un nombre | ||
77 | +javax.faces.converter.NumberConverter.NUMBER_detail = la valeur doit être un nombre | ||
78 | +javax.faces.converter.NumberConverter.PATTERN = la valeur doit être un nombre | ||
79 | +javax.faces.converter.NumberConverter.PATTERN_detail = la valeur doit être un nombre | ||
80 | +javax.faces.converter.NumberConverter.PERCENT = la valeur doit être un pourcentage | ||
81 | +javax.faces.converter.NumberConverter.PERCENT_detail = la valeur doit être un pourcentage, par ex. {1} | ||
82 | +javax.faces.converter.ShortConverter.SHORT = la valeur doit être un nombre | ||
83 | +javax.faces.converter.ShortConverter.SHORT_detail = la valeur doit être comprise entre -32768 et 32767 | ||
84 | + | ||
85 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM = La valeur doit être inférieure ou égale à {0} | ||
86 | +javax.faces.validator.DoubleRangeValidator.MINIMUM = La valeur doit être supérieure ou égale à {0} | ||
87 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE = La valeur doit être comprise entre {0} et {1} | ||
88 | +javax.faces.validator.DoubleRangeValidator.TYPE = La valeur n'est pas du type correct | ||
89 | +javax.faces.validator.LengthValidator.MAXIMUM = La valeur doit comporter {0} caractères ou moins | ||
90 | +javax.faces.validator.LengthValidator.MINIMUM = La valeur doit comporter {0} caractères ou plus | ||
91 | +javax.faces.validator.LongRangeValidator.MAXIMUM = La valeur doit être inférieure ou égale à {0} | ||
92 | +javax.faces.validator.LongRangeValidator.MINIMUM = La valeur doit être supérieure ou égale à {0} | ||
93 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE = La valeur doit être comprise entre {0} et {1} | ||
94 | +javax.faces.validator.LongRangeValidator.TYPE = La valeur n'est pas du type correct | ||
95 | + | ||
96 | +javax.faces.validator.NOT_IN_RANGE = La valeur doit être comprise entre {0} et {1} | ||
97 | +javax.faces.converter.STRING = La valeur ne peut être convertie en chaîne de caractères | ||
98 | + |
1 | +up=\u2191 | ||
2 | +down=\u2193 | ||
3 | +left=\u2039 | ||
4 | +right=\u203A | ||
5 | + | ||
6 | +validator.assertFalse=validazione fallita | ||
7 | +validator.assertTrue=validazione corretta | ||
8 | +validator.future=deve essere una data futura | ||
9 | +validator.length=la lunghezza deve essere tra {min} e {max} | ||
10 | +validator.max=deve essere minore o uguale a {value} | ||
11 | +validator.min=deve essere maggiore o uguale a {value} | ||
12 | +validator.notNull=non pu\u00F2 essere nullo | ||
13 | +validator.past=deve essere una data passata | ||
14 | +validator.pattern=deve corrispondere a "{regex}" | ||
15 | +validator.range=deve essere tra {min} e {max} | ||
16 | +validator.size=la grandezza deve essere tra {min} e {max} | ||
17 | +validator.email=deve essere un indirizzo di posta elettronica | ||
18 | + | ||
19 | +org.jboss.seam.loginFailed=Autenticazione fallita | ||
20 | +org.jboss.seam.loginSuccessful=Benvenuto/a, #0 | ||
21 | + | ||
22 | +org.jboss.seam.TransactionFailed=Transazione fallita | ||
23 | +org.jboss.seam.NoConversation=La conversazione \u00E8 terminata, scaduta oppure \u00E8 stata processata un'altra richiesta | ||
24 | +org.jboss.seam.IllegalNavigation=Navigazione illegale | ||
25 | +org.jboss.seam.ProcessEnded=Il processo \#0 \u00E8 gi\u00E0\u00A0 terminato | ||
26 | +org.jboss.seam.ProcessNotFound=Il processo \#0 non \u00E8 stato trovato | ||
27 | +org.jboss.seam.TaskEnded=Il task \#0 \u00E8 gi\u00E0 terminato | ||
28 | +org.jboss.seam.TaskNotFound=Il task \#0 non \u00E8 stato trovato | ||
29 | +org.jboss.seam.NotLoggedIn=Per favore, eseguire la login | ||
30 | + | ||
31 | +javax.faces.component.UIInput.CONVERSION=il valore non pu\u00F2 essere convertito | ||
32 | +javax.faces.component.UIInput.REQUIRED=\u00C8 richiesto un valore | ||
33 | +javax.faces.component.UIInput.UPDATE=Si \u00E8 verificato un errore nell'elaborazione delle informazioni inviate | ||
34 | +javax.faces.component.UISelectOne.INVALID=il valore non \u00E8 valido | ||
35 | +javax.faces.component.UISelectMany.INVALID=il valore non \u00E8 valido | ||
36 | + | ||
37 | +javax.faces.converter.BigDecimalConverter.DECIMAL=il valore deve essere un numero | ||
38 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=il valore deve essere un numero decimale con zero o pi\u00F9 cifre, opzionalmente seguito da un punto e una frazione, es. {1} | ||
39 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER=deve essere un intero | ||
40 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=il valore deve essere un numero intero con zero o pi\u00F9 cifre | ||
41 | +javax.faces.converter.BooleanConverter.BOOLEAN=deve essere vero o falso | ||
42 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail=il valore deve essere vero o falso (qualsiasi valore diverso da vero \u00E8 considerato falso) | ||
43 | +javax.faces.converter.ByteConverter.BYTE=il valore deve essere un numero compreso tra 0 e 255 | ||
44 | +javax.faces.converter.ByteConverter.BYTE_detail=il valore deve essere un numero compreso tra 0 e 255 | ||
45 | +javax.faces.converter.CharacterConverter.CHARACTER=deve essere un carattere | ||
46 | +javax.faces.converter.CharacterConverter.CHARACTER_detail=il valore deve essere un carattere ASCII valido | ||
47 | +javax.faces.converter.DateTimeConverter.DATE=deve essere una data | ||
48 | +javax.faces.converter.DateTimeConverter.DATE_detail=il valore deve essere una data, es. {1} | ||
49 | +javax.faces.converter.DateTimeConverter.TIME=deve essere un orario | ||
50 | +javax.faces.converter.DateTimeConverter.TIME_detail=il valore deve essere un orario, es. {1} | ||
51 | +javax.faces.converter.DateTimeConverter.DATETIME=deve essere una data ed un orario | ||
52 | +javax.faces.converter.DateTimeConverter.DATETIME_detail=il valore deve essere una data e un orario, es. {1} | ||
53 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=per convetire il valore devono essere specificati un pattern o un attributo tipo | ||
54 | +javax.faces.converter.DoubleConverter.DOUBLE=deve essere un numero | ||
55 | +javax.faces.converter.DoubleConverter.DOUBLE_detail=il valore deve essere un numero compreso tra 4.9E-324 e 1.7976931348623157E308 | ||
56 | +javax.faces.converter.EnumConverter.ENUM=il valore deve essere convertibile in una enum | ||
57 | +javax.faces.converter.EnumConverter.ENUM_detail=il valore deve essere convertibile in una enum o da enum che contiene la costante {1} | ||
58 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum | ||
59 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=il valore deve essere convertibile in una enum o da enum, ma non \u00E8 stata fornita nessuna classe enum | ||
60 | +javax.faces.converter.FloatConverter.FLOAT=deve essere un numero | ||
61 | +javax.faces.converter.FloatConverter.FLOAT_detail=il valore deve essere un numero compreso tra 1.4E-45 e 3.4028235E38 | ||
62 | +javax.faces.converter.IntegerConverter.INTEGER=deve essere un numero intero | ||
63 | +javax.faces.converter.IntegerConverter.INTEGER_detail=il valore deve essere un numero intero compreso tra -2147483648 e 2147483647 | ||
64 | +javax.faces.converter.LongConverter.LONG=deve essere un numero intero | ||
65 | +javax.faces.converter.LongConverter.LONG_detail=il valore deve essere un numero intero compreso tra -9223372036854775808 e 9223372036854775807 | ||
66 | +javax.faces.converter.NumberConverter.CURRENCY=il valore deve essere una valuta | ||
67 | +javax.faces.converter.NumberConverter.CURRENCY_detail=il valore deve essere una valuta, es. {1} | ||
68 | +javax.faces.converter.NumberConverter.PERCENT=il valore deve essere una percentuale | ||
69 | +javax.faces.converter.NumberConverter.PERCENT_detail=il valore deve essere una percentuale, es. {1} | ||
70 | +javax.faces.converter.NumberConverter.NUMBER=deve essere un numero | ||
71 | +javax.faces.converter.NumberConverter.NUMBER_detail=deve essere un numero | ||
72 | +javax.faces.converter.NumberConverter.PATTERN=deve essere un numero | ||
73 | +javax.faces.converter.NumberConverter.PATTERN_detail=deve essere un numero | ||
74 | +javax.faces.converter.ShortConverter.SHORT=deve essere un numero intero | ||
75 | +javax.faces.converter.ShortConverter.SHORT_detail=il valore deve essere un numero intero compreso -32768 e 32767 | ||
76 | + | ||
77 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0} | ||
78 | +javax.faces.validator.DoubleRangeValidator.MINIMUM=il valore deve essere maggiore o uguale a {0} | ||
79 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1} | ||
80 | +javax.faces.validator.DoubleRangeValidator.TYPE=il valore non \u00E8 del tipo corretto | ||
81 | +javax.faces.validator.LengthValidator.MAXIMUM=il valore deve essere inferiore o uguale {0} caratteri | ||
82 | +javax.faces.validator.LengthValidator.MINIMUM=il valore deve essere superiore o uguale {0} caratteri | ||
83 | +javax.faces.validator.LongRangeValidator.MAXIMUM=il valore deve essere minore o uguale a {0} | ||
84 | +javax.faces.validator.LongRangeValidator.MINIMUM=il valore deve essere superiore o uguale a {0} | ||
85 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1} | ||
86 | +javax.faces.validator.LongRangeValidator.TYPE=il valore non \u00E8 del tipo corretto | ||
87 | + | ||
88 | +javax.faces.validator.NOT_IN_RANGE=il valore deve essere compreso tra {0} e {1} | ||
89 | +javax.faces.converter.STRING=il valore non pu\u00F2 essere convertito a stringa | ||
90 | + |
1 | +#TODO: translate into norwegian | ||
2 | +up=\u2191 | ||
3 | +down=\u2193 | ||
4 | +left=\u2039 | ||
5 | +right=\u203A | ||
6 | + | ||
7 | +validator.assertFalse=validering mislyktes | ||
8 | +validator.assertTrue=validering mislyktes | ||
9 | +validator.future=must be a future date | ||
10 | +validator.length=length must be between {min} and {max} | ||
11 | +validator.max=must be less than or equal to {value} | ||
12 | +validator.min=must be greater than or equal to {value} | ||
13 | +validator.notNull=may not be null | ||
14 | +validator.past=must be a past date | ||
15 | +validator.pattern=must match "{regex}" | ||
16 | +validator.range=must be between {min} and {max} | ||
17 | +validator.size=size must be between {min} and {max} | ||
18 | +validator.email=must be a well-formed email address | ||
19 | + | ||
20 | +org.jboss.seam.loginFailed=Innlogging mislyktes | ||
21 | +org.jboss.seam.loginSuccessful=Velkommen, #0! | ||
22 | + | ||
23 | +org.jboss.seam.TransactionFailed=Transaction failed | ||
24 | +org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request | ||
25 | +org.jboss.seam.IllegalNavigation=Illegal navigation | ||
26 | +org.jboss.seam.ProcessEnded=Process #0 already ended | ||
27 | +org.jboss.seam.ProcessNotFound=Process #0 not found | ||
28 | +org.jboss.seam.TaskEnded=Task #0 already ended | ||
29 | +org.jboss.seam.TaskNotFound=Task #0 not found | ||
30 | +org.jboss.seam.NotLoggedIn=Please log in first | ||
31 | + | ||
32 | +javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type | ||
33 | +javax.faces.component.UIInput.REQUIRED=value is required | ||
34 | +javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information | ||
35 | +javax.faces.component.UISelectOne.INVALID=value is not valid | ||
36 | +javax.faces.component.UISelectMany.INVALID=value is not valid | ||
37 | + | ||
38 | +javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number | ||
39 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1} | ||
40 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer | ||
41 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits | ||
42 | +javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false | ||
43 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false) | ||
44 | +javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255 | ||
45 | +javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255 | ||
46 | +javax.faces.converter.CharacterConverter.CHARACTER=value must be a character | ||
47 | +javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character | ||
48 | +javax.faces.converter.DateTimeConverter.DATE=value must be a date | ||
49 | +javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1} | ||
50 | +javax.faces.converter.DateTimeConverter.TIME=value must be a time | ||
51 | +javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1} | ||
52 | +javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time | ||
53 | +javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1} | ||
54 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value | ||
55 | +javax.faces.converter.DoubleConverter.DOUBLE=value must be a number | ||
56 | +javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308 | ||
57 | +javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum | ||
58 | +javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1} | ||
59 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided | ||
60 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided | ||
61 | +javax.faces.converter.FloatConverter.FLOAT=value must be a number | ||
62 | +javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38 | ||
63 | +javax.faces.converter.IntegerConverter.INTEGER=value must be an integer | ||
64 | +javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647 | ||
65 | +javax.faces.converter.LongConverter.LONG=value must be an integer | ||
66 | +javax.faces.converter.LongConverter.LONG_detail=value must be an integer number between -9223372036854775808 and 9223372036854775807 | ||
67 | +javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount | ||
68 | +javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1} | ||
69 | +javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount | ||
70 | +javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1} | ||
71 | +javax.faces.converter.NumberConverter.NUMBER=value must be a number | ||
72 | +javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number | ||
73 | +javax.faces.converter.NumberConverter.PATTERN=value must be a number | ||
74 | +javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number | ||
75 | +javax.faces.converter.ShortConverter.SHORT=value must be an integer | ||
76 | +javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767 | ||
77 | + | ||
78 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0} | ||
79 | +javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0} | ||
80 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} | ||
81 | +javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type | ||
82 | +javax.faces.validator.LengthValidator.MAXIMUM=value must be shorter than or equal to {0} characters | ||
83 | +javax.faces.validator.LengthValidator.MINIMUM=value must be longer than or equal to {0} characters | ||
84 | +javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0} | ||
85 | +javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0} | ||
86 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1} | ||
87 | +javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type | ||
88 | + | ||
89 | +javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1} | ||
90 | +javax.faces.converter.STRING=value could not be converted to a string | ||
91 | + |
1 | +up=\u2191 | ||
2 | +down=\u2193 | ||
3 | +left=\u2039 | ||
4 | +right=\u203a | ||
5 | + | ||
6 | +validator.assertFalse=do\u011frulanamad\u0131 | ||
7 | +validator.assertTrue=do\u011frulanamad\u0131 | ||
8 | +validator.future=gelecek bir tarih olmal\u0131d\u0131r | ||
9 | +validator.length=girilen de\u011ferin uzunlu\u011fu {min} ile {max} aras\u0131nda olmal\u0131d\u0131r | ||
10 | +validator.max=girilen de\u011fer {value} ya da daha k\u00fc\u00e7\u00fck olmal\u0131d\u0131r | ||
11 | +validator.min=girilen de\u011fer {value} ya da daha b\u00fcy\u00fck olmal\u0131d\u0131r | ||
12 | +validator.notNull=bir de\u011fer girilmesi gereklidir | ||
13 | +validator.past=ge\u00e7mi\u015f bir tarih girilmelidir | ||
14 | +validator.pattern=girilen de\u011fer "{regex}" tan\u0131mlamas\u0131na uymal\u0131d\u0131r | ||
15 | +validator.range=girilen de\u011ferin b\u00fcy\u00fckl\u00fc\u011f\u00fc {min} ile {max} aras\u0131nda olmal\u0131d\u0131r | ||
16 | +validator.size=girilen de\u011ferin boyut {min} ile {max} aras\u0131nda olmal\u0131d\u0131r | ||
17 | +validator.email=girilen de\u011fer e-posta adresi format\u0131na uygun olmal\u0131d\u0131r | ||
18 | + | ||
19 | +org.jboss.seam.loginFailed=Oturum a\u00e7\u0131lamad\u0131 | ||
20 | +org.jboss.seam.loginSuccessful=Ho\u015fgeldiniz, #0! | ||
21 | + | ||
22 | +org.jboss.seam.TransactionFailed=\u0130\u015flem tamamlanamad\u0131 | ||
23 | +org.jboss.seam.NoConversation=Konu\u015fma sonland\u0131, zaman a\u015f\u0131m\u0131na u\u011frad\u0131 ya da ba\u015fka bir talebi i\u015fliyordu | ||
24 | +org.jboss.seam.IllegalNavigation=Ge\u00e7ersiz y\u00f6nleme(navigasyon) | ||
25 | +org.jboss.seam.ProcessEnded=#0 s\u00fcreci sonlanm\u0131\u015f | ||
26 | +org.jboss.seam.ProcessNotFound=#0 s\u00fcreci bulunamad\u0131 | ||
27 | +org.jboss.seam.TaskEnded=#0 g\u00f6revi sonlanm\u0131\u015f | ||
28 | +org.jboss.seam.TaskNotFound=#0 g\u00f6revi bulunamad\u0131 | ||
29 | +org.jboss.seam.NotLoggedIn=L\u00fctfen \u00f6ncelikle oturum a\u00e7\u0131n | ||
30 | + | ||
31 | +javax.faces.component.UIInput.CONVERSION=girilen de\u011fer, beklenen tipe d\u00f6n\u00fc\u015ft\u00fcr\u00fclemedi | ||
32 | +javax.faces.component.UIInput.REQUIRED=bir de\u011fer girilmesi gereklidir | ||
33 | +javax.faces.component.UIInput.UPDATE=talebiniz i\u015flenirken bir hata olu\u015ftu | ||
34 | +javax.faces.component.UISelectOne.INVALID=ge\u00e7erli bir de\u011fer girilmelidir | ||
35 | +javax.faces.component.UISelectMany.INVALID=ge\u00e7erli bir de\u011fer girilmelidir | ||
36 | + | ||
37 | +javax.faces.converter.BigDecimalConverter.DECIMAL=bir say\u0131 girilmelidir | ||
38 | +javax.faces.converter.BigDecimalConverter.DECIMAL_detail=girilen de\u011fer, s\u0131f\u0131r ya da daha fazla basamak i\u00e7eren, ondal\u0131k ayrac\u0131 ve ondal\u0131k basamak i\u00e7erebilen i\u015faretli bir ondal\u0131k say\u0131 olmal\u0131d\u0131r, \u00f6rn. {1} | ||
39 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER=bir tamsay\u0131 girilmelidir | ||
40 | +javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=girilen de\u011fer bir ya da daha fazla basamak i\u00e7eren bir tamsay\u0131 olmal\u0131d\u0131r | ||
41 | +javax.faces.converter.BooleanConverter.BOOLEAN=girilen de\u011fer true ya da false olmal\u0131d\u0131r | ||
42 | +javax.faces.converter.BooleanConverter.BOOLEAN_detail=girilen de\u011fer true ya da false olmal\u0131d\u0131r (true olmayan her de\u011fer false olarak de\u011ferlendirilecektir) | ||
43 | +javax.faces.converter.ByteConverter.BYTE=girilen de\u011fer 0 ile 255 aras\u0131nda bir say\u0131 olmal\u0131d\u0131r | ||
44 | +javax.faces.converter.ByteConverter.BYTE_detail=girilen de\u011fer 0 ile 255 aras\u0131nda bir say\u0131 olmal\u0131d\u0131r | ||
45 | +javax.faces.converter.CharacterConverter.CHARACTER=girilen de\u011fer bir karakter olmal\u0131d\u0131r | ||
46 | +javax.faces.converter.CharacterConverter.CHARACTER_detail=ge\u00e7erli bir ASCII karakter girilmelidir | ||
47 | +javax.faces.converter.DateTimeConverter.DATE=girilen de\u011fer bir tarih olmal\u0131d\u0131r | ||
48 | +javax.faces.converter.DateTimeConverter.DATE_detail=girilen de\u011fer bir tarih olmal\u0131d\u0131r, \u00f6rn. {1} | ||
49 | +javax.faces.converter.DateTimeConverter.TIME=girilen de\u011fer bir zaman olmal\u0131d\u0131r | ||
50 | +javax.faces.converter.DateTimeConverter.TIME_detail=girilen de\u011fer bir zaman olmal\u0131d\u0131r, \u00f6rn. {1} | ||
51 | +javax.faces.converter.DateTimeConverter.DATETIME=girilen de\u011fer tarih ve zaman i\u00e7ermelidir | ||
52 | +javax.faces.converter.DateTimeConverter.DATETIME_detail=girilen de\u011fer tarih ve zaman i\u00e7ermelidir, \u00f6rn. {1} | ||
53 | +javax.faces.converter.DateTimeConverter.PATTERN_TYPE=girilen de\u011feri d\u00f6n\u00fc\u015ft\u00fcrebilmek i\u00e7in bir desen(pattern) ya da tip \u00f6zniteli\u011fi(attribute) tan\u0131mlanmal\u0131d\u0131r. | ||
54 | +javax.faces.converter.DoubleConverter.DOUBLE=bir say\u0131 girilmelidir | ||
55 | +javax.faces.converter.DoubleConverter.DOUBLE_detail=4.9E-324 ile 1.7976931348623157E308 aras\u0131nda bir say\u0131 girilmelidir | ||
56 | +javax.faces.converter.EnumConverter.ENUM=girilen de\u011fer enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir | ||
57 | +javax.faces.converter.EnumConverter.ENUM_detail=girilen de\u011fer sabit i\u00e7eren bir enum tipinden enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir {1} | ||
58 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS=girilen de\u011fer enum tipinden enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir. Ancak enum s\u0131n\u0131f\u0131(class) bulunamad\u0131 | ||
59 | +javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=girilen de\u011fer enum tipinden enum tipine d\u00f6n\u00fc\u015ft\u00fcr\u00fclebilmelidir. Ancak enum s\u0131n\u0131f\u0131(class) bulunamad\u0131 | ||
60 | +javax.faces.converter.FloatConverter.FLOAT=bir say\u0131 girilmelidir | ||
61 | +javax.faces.converter.FloatConverter.FLOAT_detail=1.4E-45 ile 3.4028235E38 aras\u0131nda bir say\u0131 girilmelidir | ||
62 | +javax.faces.converter.IntegerConverter.INTEGER=bir tamsay\u0131 girilmelidir | ||
63 | +javax.faces.converter.IntegerConverter.INTEGER_detail=-2147483648 ile 2147483647 aras\u0131nda bir tamsay\u0131 girilmelidir | ||
64 | +javax.faces.converter.LongConverter.LONG=bir tamsay\u0131 girilmelidir | ||
65 | +javax.faces.converter.LongConverter.LONG_detail=-9223372036854775808 ile 9223372036854775807 aras\u0131nda bir tamsay\u0131 girilmelidir | ||
66 | +javax.faces.converter.NumberConverter.CURRENCY=para birimi tipinden bir de\u011fer girilmelidir | ||
67 | +javax.faces.converter.NumberConverter.CURRENCY_detail=para birimi tipinden bir de\u011fer girilmelidir, \u00f6rn. {1} | ||
68 | +javax.faces.converter.NumberConverter.PERCENT=y\u00fczdelik tipinden bir de\u011fer girilmelidir | ||
69 | +javax.faces.converter.NumberConverter.PERCENT_detail=y\u00fczdelik tipinden bir de\u011fer girilmelidir, \u00f6rn. {1} | ||
70 | +javax.faces.converter.NumberConverter.NUMBER=bir say\u0131 girilmelidir | ||
71 | +javax.faces.converter.NumberConverter.NUMBER_detail=bir say\u0131 girilmelidir | ||
72 | +javax.faces.converter.NumberConverter.PATTERN=bir say\u0131 girilmelidir | ||
73 | +javax.faces.converter.NumberConverter.PATTERN_detail=bir say\u0131 girilmelidir | ||
74 | +javax.faces.converter.ShortConverter.SHORT=bir tamsay\u0131 girilmelidir | ||
75 | +javax.faces.converter.ShortConverter.SHORT_detail=-32768 ile 32767 aras\u0131nda bir tamsay\u0131 girilmelidir | ||
76 | + | ||
77 | +javax.faces.validator.DoubleRangeValidator.MAXIMUM=girilen de\u011fer {0} ya da daha k\u00fc\u00e7\u00fck olmal\u0131d\u0131r | ||
78 | +javax.faces.validator.DoubleRangeValidator.MINIMUM=girilen de\u011fer {0} ya da daha b\u00fcy\u00fck olmal\u0131d\u0131r | ||
79 | +javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=girilen de\u011fer {0} ile {1} aras\u0131nda olmal\u0131d\u0131r | ||
80 | +javax.faces.validator.DoubleRangeValidator.TYPE=girilen de\u011ferin tipi yanl\u0131\u015f | ||
81 | +javax.faces.validator.LengthValidator.MAXIMUM=girilen de\u011fer {0} ya da daha az karakter i\u00e7ermelidir | ||
82 | +javax.faces.validator.LengthValidator.MINIMUM=girilen de\u011fer {0} ya da fazla karakter i\u00e7ermelidir | ||
83 | +javax.faces.validator.LongRangeValidator.MAXIMUM=girilen de\u011fer {0} ya da daha k\u00fc\u00e7\u00fck olmal\u0131d\u0131r | ||
84 | +javax.faces.validator.LongRangeValidator.MINIMUM=girilen de\u011fer {0} ya da daha b\u00fcy\u00fck olmal\u0131d\u0131r | ||
85 | +javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=girilen de\u011fer {0} ile {1} aral\u0131\u011f\u0131nda olmal\u0131d\u0131r | ||
86 | +javax.faces.validator.LongRangeValidator.TYPE=yanl\u0131\u015f tipte bir de\u011fer girildi | ||
87 | + | ||
88 | +javax.faces.validator.NOT_IN_RANGE=girilen de\u011fer {0} ile {1} aral\u0131\u011f\u0131nda olmal\u0131d\u0131r | ||
89 | +javax.faces.converter.STRING=girilen de\u011fer bir dizgiye(string) d\u00f6n\u00fc\u015ft\u00fcr\u00fclemedi | ||
90 | + |
war/src/main/resources/seam.properties
0 → 100644
war/src/main/resources/stylesheet/theme.xcss
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<f:template xmlns="http://www.w3.org/1999/xhtml" | ||
3 | + xmlns:f="http:/jsf.exadel.com/template" | ||
4 | + xmlns:u="http:/jsf.exadel.com/template/util"> | ||
5 | + <u:selector name="body"> | ||
6 | + <u:style name="font-family" skin="generalFamilyFont"/> | ||
7 | + <u:style name="color" skin="generalTextColor"/> | ||
8 | + </u:selector> | ||
9 | + <u:selector name="h1"> | ||
10 | + <u:style name="font-family" skin="generalFamilyFont"/> | ||
11 | + <u:style name="color" skin="tabDisabledTextColor"/> | ||
12 | + </u:selector> | ||
13 | + <u:selector name="a:active, a:link, a:visited"> | ||
14 | + <u:style name="color" skin="generalLinkColor"/> | ||
15 | + </u:selector> | ||
16 | + <u:selector name="a:hover"> | ||
17 | + <u:style name="color" skin="hoverLinkColor"/> | ||
18 | + </u:selector> | ||
19 | + <u:selector name="input[type=text], input[type=password], textarea, select"> | ||
20 | + <u:style name="background-color" skin="controlBackgroundColor"/> | ||
21 | + <u:style name="color" skin="controlTextColor"/> | ||
22 | + <u:style name="background-position" value="left top"/> | ||
23 | + <u:style name="background-repeat" value="repeat-x"/> | ||
24 | + <u:style name="background-image"> | ||
25 | + <f:resource f:key="org.richfaces.renderkit.html.images.SliderFieldGradient"/> | ||
26 | + </u:style> | ||
27 | + <u:style name="border" value="1px solid"/> | ||
28 | + <u:style name="border-color" skin="tableBorderColor" /> | ||
29 | + </u:selector> | ||
30 | + <u:selector name="select"> | ||
31 | + <u:style name="background-color" value="transparent"/> | ||
32 | + <u:style name="background-image"> | ||
33 | + <f:resource f:key="org.richfaces.renderkit.html.images.SliderFieldGradient"/> | ||
34 | + </u:style> | ||
35 | + </u:selector> | ||
36 | + <u:selector name="option"> | ||
37 | + <u:style name="background-color" skin="generalBackgroundColor"/> | ||
38 | + </u:selector> | ||
39 | + <u:selector name="select[multiple]"> | ||
40 | + <u:style name="background-color" skin="controlBackgroundColor"/> | ||
41 | + </u:selector> | ||
42 | + <u:selector name="select[multiple] option"> | ||
43 | + <u:style name="background-color" value="transparent"/> | ||
44 | + </u:selector> | ||
45 | + <u:selector name="input[type=submit], input[type=button]"> | ||
46 | + <u:style name="padding" value="1px 4px"/> | ||
47 | + <u:style name="background-image"> | ||
48 | + <f:resource f:key="org.richfaces.renderkit.html.GradientA"/> | ||
49 | + </u:style> | ||
50 | + <u:style name="border" value="1px solid"/> | ||
51 | + <u:style name="border-color" skin="headerBackgroundColor"/> | ||
52 | + <u:style name="color" skin="headerTextColor"/> | ||
53 | + <u:style name="font-weight" value="bold"/> | ||
54 | + </u:selector> | ||
55 | + <u:selector name="input[type=submit][disabled], input[type=button][disabled]"> | ||
56 | + <u:style name="opacity" value="0.33"/> | ||
57 | + </u:selector> | ||
58 | + <!-- hack for IE to just get rid of border since it doubles the border if you use one --> | ||
59 | + <u:selector name="* html input[type=submit], * html input[type=button], *+html input[type=submit], *+html input[type=button]"> | ||
60 | + <u:style name="border" value="0"/> | ||
61 | + <u:style name="font-size" value="11px"/> | ||
62 | + </u:selector> | ||
63 | + <u:selector name=".rich-table-subheadercell"> | ||
64 | + <u:style name="background-image"> | ||
65 | + <f:resource f:key="org.richfaces.renderkit.images.TabGradientB"/> | ||
66 | + </u:style> | ||
67 | + </u:selector> | ||
68 | + <u:selector name=".rich-toolbar a:link, .rich-toolbar a:visited, .rich-toolbar a:active, .rich-toolbar a:hover"> | ||
69 | + <u:style name="color" skin="headerTextColor"/> | ||
70 | + </u:selector> | ||
71 | + <u:selector name=".rich-toolbar a:hover"> | ||
72 | + <u:style name="color" skin="generalTextColor"/> | ||
73 | + </u:selector> | ||
74 | + <u:selector name=".rich-toolbar .rich-menu-item, .rich-toolbar .rich-menu-item a, .rich-toolbar .rich-menu-item a:hover, .rich-toolbar .rich-menu-item a:visited"> | ||
75 | + <u:style name="color" skin="generalTextColor" /> | ||
76 | + </u:selector> | ||
77 | + <u:selector name=".rich-table-subheadercell a:hover"> | ||
78 | + <u:style name="color" skin="calendarHolidaysTextColor"/> | ||
79 | + </u:selector> | ||
80 | + <!-- Define static styles in the CDATA block below (you can also move this block to the top) --> | ||
81 | + <f:verbatim><![CDATA[ | ||
82 | +]]></f:verbatim> | ||
83 | +</f:template> |
war/src/main/webapp/404.xhtml
0 → 100644
1 | +<!DOCTYPE | ||
2 | +composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
3 | +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
4 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:h="http://java.sun.com/jsf/html" | ||
7 | + xmlns:f="http://java.sun.com/jsf/core" | ||
8 | + template="layout/template.xhtml"> | ||
9 | + | ||
10 | + <ui:define name="body"> | ||
11 | + <h3 id="404">Page not found</h3> | ||
12 | + </ui:define> | ||
13 | + | ||
14 | +</ui:composition> |
war/src/main/webapp/META-INF/MANIFEST.MF
0 → 100644
1 | +Manifest-Version: 1.0 | ||
2 | +Class-Path: jboss-seam-2.2.0.GA.jar xstream-1.1.3.jar jboss-el-1.0_02. | ||
3 | + CR4.jar jboss-seam-mail-2.2.0.GA.jar jboss-seam-ui-2.2.0.GA.jar jsf-f | ||
4 | + acelets-1.1.15.B1.jar richfaces-api-3.3.3.Final.jar commons-beanutils | ||
5 | + -1.8.3.jar commons-digester-1.8.1.jar jboss-seam-debug-2.2.0.GA.jar r | ||
6 | + ichfaces-impl-3.3.3.Final.jar richfaces-ui-3.3.3.Final.jar glassX-3.3 | ||
7 | + .1.GA.jar darkX-3.3.1.GA.jar surefire-api-2.6.jar testng-5.12.1.jar g | ||
8 | + lassX-3.3.3.Final.jar darkX-3.3.3.Final.jar | ||
9 | + |
war/src/main/webapp/WEB-INF/components.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<components xmlns:core="http://jboss.com/products/seam/core" xmlns="http://jboss.com/products/seam/components" | ||
3 | + xmlns:persistence="http://jboss.com/products/seam/persistence" xmlns:drools="http://jboss.com/products/seam/drools" | ||
4 | + xmlns:bpm="http://jboss.com/products/seam/bpm" xmlns:security="http://jboss.com/products/seam/security" | ||
5 | + xmlns:mail="http://jboss.com/products/seam/mail" xmlns:web="http://jboss.com/products/seam/web" | ||
6 | + xmlns:transaction="http://jboss.com/products/seam/transaction" xmlns:jms="http://jboss.com/products/seam/jms" | ||
7 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" | ||
8 | + http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.2.xsd | ||
9 | + http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd | ||
10 | + http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd | ||
11 | + http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd | ||
12 | + http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd | ||
13 | + http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd | ||
14 | + http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd | ||
15 | + http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd | ||
16 | + http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.2.xsd | ||
17 | + http://jboss.com/products/seam/transaction http://jboss.com/products/seam/jms-2.2.xsd | ||
18 | +"> | ||
19 | + | ||
20 | + <!-- | ||
21 | + debug="true" requires "jboss-seam-debug" dependency in pom, SiA-4.5.2-p154 | ||
22 | + | ||
23 | + Seam managed transactions are enabled by default, but as a reminder: | ||
24 | + transaction-management-enabled="true", SiA-9.4.1-p370 | ||
25 | + | ||
26 | + The ManagedEntityInterceptor (MEI) is an optional interceptor in Seam that gets applied | ||
27 | + to conversation-scoped components when enabled. Enabling it is simple. You just set the | ||
28 | + distributable property on the org.jboss.seam.init.core component to true. More simply put, | ||
29 | + you add (or update) the following component declaration in the component descriptor (i.e., | ||
30 | + components.xml), seam_reference-35.2. | ||
31 | + | ||
32 | + For cluster: distributable="true". Also uncomment the distributable tag in web.xml | ||
33 | + --> | ||
34 | + <core:init transaction-management-enabled="true" debug="${app.debug}" jndi-pattern="${app.jndi.pattern}" distributable="${app.distributable}"/> | ||
35 | + | ||
36 | + <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid"/> | ||
37 | + | ||
38 | + <core:resource-loader> | ||
39 | + <core:bundle-names> | ||
40 | + <value>messages</value> | ||
41 | + <!-- Add more message bundles as needed --> <!-- <value>mymessagebundle</value> --> | ||
42 | + </core:bundle-names> | ||
43 | + </core:resource-loader> | ||
44 | + | ||
45 | + <web:context-filter regex-url-pattern="/Servlet.*" installed="${jsfunit.context_filter.installed}"/> | ||
46 | + <!-- | ||
47 | + BOOTSTRAPPING A JPA ENTITYMANAGERFACTORY, SiA-9.3.1-p362 | ||
48 | + installed=true for JBoss 4.2.3 or newer | ||
49 | + To have Seam defer loading of the persistence unit until it's needed, perhaps for a quicker | ||
50 | + deployment turnaround, you can disable the startup behavior of this component, SiA-9.3.1-p363 | ||
51 | + | ||
52 | + persistrence:entity-manager-factory.persistence-unit-name is also referenced in in persistence.xml: | ||
53 | + | ||
54 | + installed=true does not work on JBoss5, see: https://jira.jboss.org/jira/browse/JBSEAM-3821 | ||
55 | + --> | ||
56 | + <persistence:entity-manager-factory name="entityManagerFactory" persistence-unit-name="${pu.name}" installed="true" startup="true"/> | ||
57 | + | ||
58 | + <!-- | ||
59 | + If Seam loads the persistence unit (JBoss 4.x), the | ||
60 | + EntityManagerFactory will be resolved from #{entityManagerFactory}. | ||
61 | + On JBoss AS 5, the EntityManagerFactory is retrieved from JNDI (the | ||
62 | + binding occurs during application deployment), SiA-9.3.1-p362. | ||
63 | + see also: see: http://code.google.com/p/seaminaction/wiki/DeployingToJBossAS5 | ||
64 | + | ||
65 | + By default, the Seam-managed persistence context components are defined with the autocreate | ||
66 | + feature disabled. By enabling this feature, you can inject these components using an | ||
67 | + @In annotation without having to supply the create attribute, SiA-9.3.2-p366. | ||
68 | + --> | ||
69 | + <persistence:managed-persistence-context name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}" | ||
70 | + persistence-unit-jndi-name="${pu.jboss.entity.manager.factory.jndi.name}"/> | ||
71 | + | ||
72 | + <!-- | ||
73 | + In an EJB3 environment, it is recommend to use a special built-in component for transaction | ||
74 | + management, that is fully aware of container transactions, and can correctly process | ||
75 | + transaction success events registered with the Events component. If you don't add this line to | ||
76 | + your components.xml file, Seam won't know when container-managed transactions end | ||
77 | + (seam_reference-30.1.5) | ||
78 | + --><!--<transaction:ejb-transaction />--> | ||
79 | + | ||
80 | + <!-- | ||
81 | + There are two rewrite options in Seam, you can choose to either use the org.tuckey | ||
82 | + UrlRewriteFilter or the native Seam rewriting. You should not attempt to use both. | ||
83 | + The native Seam rewriting does not use the org.tuckey rewrite engine at all. | ||
84 | + If you are going to use Seam's native rewriting, then remove the org.tuckey | ||
85 | + UrlRewriteFilter from web.xml and nuke the urlrewrite.xml file. | ||
86 | + | ||
87 | + This filter allows Seam to apply URL rewriting for views based on configuration in the | ||
88 | + pages.xml file. The view-mapping parameter must match the servlet mapping defined for the | ||
89 | + Faces Servlet in the web.xml file. If ommitted, the rewrite filter assumes the pattern *.seam. | ||
90 | + | ||
91 | + With Seam 2.1 or newer it is recommend to use Seam's native rewrite engine, see: | ||
92 | + http://docs.jboss.org/seam/latest/reference/en-US/html/configuration.html | ||
93 | + | ||
94 | + <web:rewrite-filter view-mapping="/seam/*" /> | ||
95 | + --> | ||
96 | + <web:rewrite-filter/> | ||
97 | + | ||
98 | + <web:hot-deploy-filter url-pattern="*.seam"/> | ||
99 | + | ||
100 | + <!-- Force encoding of submitted and sent data --> | ||
101 | + <web:character-encoding-filter encoding="UTF-8" override-client="true" url-pattern="*.seam"/> | ||
102 | + | ||
103 | + <!-- | ||
104 | + <mail:mail-session | ||
105 | + host="localhost" | ||
106 | + port="25" | ||
107 | + username="user" | ||
108 | + password="test" /> | ||
109 | + --> | ||
110 | + | ||
111 | + <!-- For use with jBPM pageflow or process management | ||
112 | + <bpm:jbpm> | ||
113 | + <bpm:process-definitions></bpm:process-definitions> | ||
114 | + <bpm:pageflow-definitions></bpm:pageflow-definitions> | ||
115 | + </bpm:jbpm> | ||
116 | + --> | ||
117 | + | ||
118 | + | ||
119 | + <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true"/> | ||
120 | + | ||
121 | + <!-- | ||
122 | + Seam Identity Management. | ||
123 | + see: seam_reference-15.0 | ||
124 | + see: http://blog.hibernate.org/10904.lace | ||
125 | + --> | ||
126 | + | ||
127 | + <!-- | ||
128 | + <security:identity /> | ||
129 | + | ||
130 | + <security:remember-me | ||
131 | + enabled="true" /> | ||
132 | + | ||
133 | + <security:jpa-identity-store | ||
134 | + user-class="no.knowit.example.security.model.UserAccount" | ||
135 | + role-class="no.knowit.example.security.model.UserRole" /> | ||
136 | + | ||
137 | + <security:jpa-permission-store | ||
138 | + user-permission-class="no.knowit.example.security.model.UserPermission" /> | ||
139 | + | ||
140 | + <drools:rule-base name="securityRules"> | ||
141 | + <drools:rule-files> | ||
142 | + <value>/META-INF/security.drl</value> | ||
143 | + </drools:rule-files> | ||
144 | + </drools:rule-base> | ||
145 | + | ||
146 | + <security:rule-based-permission-resolver | ||
147 | + security-rules="#{securityRules}" /> | ||
148 | + --> | ||
149 | + | ||
150 | + <event type="org.jboss.seam.security.notLoggedIn"> | ||
151 | + <action execute="#{redirect.captureCurrentView}"/> | ||
152 | + </event> | ||
153 | + | ||
154 | + <event type="org.jboss.seam.security.loginSuccessful"> | ||
155 | + <action execute="#{redirect.returnToCapturedView}"/> | ||
156 | + </event> | ||
157 | + | ||
158 | +</components> |
war/src/main/webapp/WEB-INF/faces-config.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<faces-config version="1.2" | ||
3 | + xmlns="http://java.sun.com/xml/ns/javaee" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | ||
6 | + http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"> | ||
7 | + | ||
8 | + <application> | ||
9 | + <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> | ||
10 | + <locale-config> | ||
11 | + <default-locale>en</default-locale> | ||
12 | + <supported-locale>bg</supported-locale> | ||
13 | + <supported-locale>de</supported-locale> | ||
14 | + <supported-locale>en</supported-locale> | ||
15 | + <supported-locale>fr</supported-locale> | ||
16 | + <supported-locale>it</supported-locale> | ||
17 | + <supported-locale>no</supported-locale> | ||
18 | + <supported-locale>tr</supported-locale> | ||
19 | + </locale-config> | ||
20 | + </application> | ||
21 | +</faces-config> |
war/src/main/webapp/WEB-INF/jboss-web.xml
0 → 100644
1 | +<!DOCTYPE jboss-web PUBLIC | ||
2 | + "-//JBoss//DTD Web Application 4.2//EN" | ||
3 | + "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> | ||
4 | + | ||
5 | +<jboss-web> | ||
6 | + <class-loading java2ClassLoadingCompliance="false"> | ||
7 | + <loader-repository> | ||
8 | + seam.jboss.org:loader=${app} | ||
9 | + <loader-repository-config>java2ParentDelegation=false</loader-repository-config> | ||
10 | + </loader-repository> | ||
11 | + </class-loading> | ||
12 | +</jboss-web> |
war/src/main/webapp/WEB-INF/pages.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<pages | ||
3 | + xmlns="http://jboss.com/products/seam/pages" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd" | ||
6 | + no-conversation-view-id="/home.xhtml" | ||
7 | + login-view-id="/login.xhtml" | ||
8 | +> | ||
9 | + | ||
10 | + <page view-id="/home.xhtml"> | ||
11 | + <rewrite pattern="/" /> | ||
12 | + <rewrite pattern="/index{.*}" /> | ||
13 | + <rewrite pattern="/home{.*}" /> | ||
14 | + <rewrite pattern="/default{.*}" /> | ||
15 | + <rewrite pattern="/welcome{.*}" /> | ||
16 | + </page> | ||
17 | + | ||
18 | + <page view-id="/login.seam"> | ||
19 | + <rewrite pattern="/login"/> | ||
20 | + </page> | ||
21 | + | ||
22 | + <page view-id="*"> | ||
23 | + <navigation from-action="#{identity.logout}"> | ||
24 | + <redirect view-id="/home.xhtml"/> | ||
25 | + </navigation> | ||
26 | + | ||
27 | + <navigation> | ||
28 | + <rule if-outcome="home"> | ||
29 | + <redirect view-id="/home.xhtml" /> | ||
30 | + </rule> | ||
31 | + </navigation> | ||
32 | + </page> | ||
33 | + | ||
34 | + <exception class="org.jboss.seam.framework.EntityNotFoundException"> | ||
35 | + <redirect view-id="/error.xhtml"> | ||
36 | + <message severity="warn">Record not found</message> | ||
37 | + </redirect> | ||
38 | + </exception> | ||
39 | + | ||
40 | + <exception class="javax.persistence.EntityNotFoundException"> | ||
41 | + <redirect view-id="/error.xhtml"> | ||
42 | + <message severity="warn">Record not found</message> | ||
43 | + </redirect> | ||
44 | + </exception> | ||
45 | + | ||
46 | + <exception class="javax.persistence.EntityExistsException"> | ||
47 | + <redirect view-id="/error.xhtml"> | ||
48 | + <message severity="warn">Duplicate record</message> | ||
49 | + </redirect> | ||
50 | + </exception> | ||
51 | + | ||
52 | + <exception class="javax.persistence.OptimisticLockException"> | ||
53 | + <end-conversation/> | ||
54 | + <redirect view-id="/error.xhtml"> | ||
55 | + <message severity="warn">Another user changed the same data, please try again</message> | ||
56 | + </redirect> | ||
57 | + </exception> | ||
58 | + | ||
59 | + <exception class="javax.persistence.PersistenceException"> | ||
60 | + <redirect view-id="/error.xhtml"> | ||
61 | + <message>The operation failed, please try again</message> | ||
62 | + </redirect> | ||
63 | + </exception> | ||
64 | + | ||
65 | + <exception class="org.jboss.seam.security.AuthorizationException"> | ||
66 | + <end-conversation /> | ||
67 | + <redirect view-id="/security_error.xhtml"> | ||
68 | + <message severity="error">You do not have permission to access this resource</message> | ||
69 | + </redirect> | ||
70 | + </exception> | ||
71 | + | ||
72 | + <exception class="org.jboss.seam.security.NotLoggedInException"> | ||
73 | + <redirect view-id="/login.xhtml"> | ||
74 | + <message severity="warn">#{messages['org.jboss.seam.NotLoggedIn']}</message> | ||
75 | + </redirect> | ||
76 | + </exception> | ||
77 | + | ||
78 | + <exception class="javax.faces.application.ViewExpiredException"> | ||
79 | + <redirect view-id="/error.xhtml"> | ||
80 | + <message severity="warn">Your session has timed out, please try again</message> | ||
81 | + </redirect> | ||
82 | + </exception> | ||
83 | + | ||
84 | + <exception class="org.jboss.seam.ConcurrentRequestTimeoutException"> | ||
85 | + <http-error error-code="503" /> | ||
86 | + </exception> | ||
87 | + | ||
88 | + <exception> | ||
89 | + <redirect view-id="/error.xhtml"> | ||
90 | + <message severity="error">Unexpected error, please try again</message> | ||
91 | + </redirect> | ||
92 | + </exception> | ||
93 | + | ||
94 | +</pages> |
war/src/main/webapp/WEB-INF/web.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
3 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | ||
4 | + | ||
5 | + <!-- For cluster, add distributable as the first child element, seam_reference-35.1.2 --> <!-- <distributable /> --> | ||
6 | + | ||
7 | + <display-name>${app.display.name}</display-name> | ||
8 | + | ||
9 | + <error-page> | ||
10 | + <error-code>404</error-code> | ||
11 | + <location>/404.xhtml</location> | ||
12 | + </error-page> | ||
13 | + | ||
14 | + <!-- RichFaces --> | ||
15 | + <context-param> | ||
16 | + <param-name>org.richfaces.SKIN</param-name> | ||
17 | + <param-value>glassX</param-value> | ||
18 | + </context-param> | ||
19 | + | ||
20 | + <!-- Suppress spurious stylesheets --> | ||
21 | + <context-param> | ||
22 | + <param-name>org.richfaces.CONTROL_SKINNING</param-name> | ||
23 | + <param-value>disable</param-value> | ||
24 | + </context-param> | ||
25 | + | ||
26 | + <context-param> | ||
27 | + <param-name>org.richfaces.CONTROL_SKINNING_LEVEL</param-name> | ||
28 | + <param-value>extended</param-value> | ||
29 | + </context-param> | ||
30 | + | ||
31 | + <context-param> | ||
32 | + <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> | ||
33 | + <param-value>disable</param-value> | ||
34 | + </context-param> | ||
35 | + | ||
36 | + <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs --> | ||
37 | + <context-param> | ||
38 | + <param-name>org.richfaces.LoadStyleStrategy</param-name> | ||
39 | + <param-value>DEFAULT</param-value> | ||
40 | + </context-param> | ||
41 | + | ||
42 | + <context-param> | ||
43 | + <param-name>org.richfaces.LoadScriptStrategy</param-name> | ||
44 | + <param-value>DEFAULT</param-value> | ||
45 | + </context-param> | ||
46 | + | ||
47 | + <context-param> | ||
48 | + <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name> | ||
49 | + <param-value>${org.ajax4jsf.COMPRESS_SCRIPT}</param-value> | ||
50 | + </context-param> | ||
51 | + | ||
52 | + <!-- Seam --> | ||
53 | + <listener> | ||
54 | + <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> | ||
55 | + </listener> | ||
56 | + | ||
57 | + <filter> | ||
58 | + <filter-name>Seam Filter</filter-name> | ||
59 | + <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> | ||
60 | + </filter> | ||
61 | + | ||
62 | + <filter-mapping> | ||
63 | + <filter-name>Seam Filter</filter-name> | ||
64 | + <url-pattern>/*</url-pattern> | ||
65 | + </filter-mapping> | ||
66 | + | ||
67 | + <servlet> | ||
68 | + <servlet-name>Seam Resource Servlet</servlet-name> | ||
69 | + <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> | ||
70 | + </servlet> | ||
71 | + | ||
72 | + <servlet-mapping> | ||
73 | + <servlet-name>Seam Resource Servlet</servlet-name> | ||
74 | + <url-pattern>/seam/resource/*</url-pattern> | ||
75 | + </servlet-mapping> | ||
76 | + | ||
77 | + <!-- Facelets --> | ||
78 | + | ||
79 | + <!-- Facelets development mode (disable in production) --> | ||
80 | + <context-param> | ||
81 | + <param-name>facelets.DEVELOPMENT</param-name> | ||
82 | + <param-value>${app.debug}</param-value> | ||
83 | + </context-param> | ||
84 | + | ||
85 | + <context-param> | ||
86 | + <description> | ||
87 | + Strip html comments from the page before it is rendred - meaning that you will no longer be bugged down by EL evaluating expressions inside a | ||
88 | + comment tag | ||
89 | + </description> | ||
90 | + <param-name>facelets.SKIP_COMMENTS</param-name> | ||
91 | + <param-value>true</param-value> | ||
92 | + </context-param> | ||
93 | + | ||
94 | + <!-- SiA source code, ch11 --> <!-- | ||
95 | + <context-param> | ||
96 | + <description> | ||
97 | + If the view cannot be found in the session on a JSF postback, rebuild | ||
98 | + the view again before executing the Restore View phase. This step | ||
99 | + prevents "stale" public form pages. Enable this feature if you need it. | ||
100 | + </description> | ||
101 | + <param-name>facelets.BUILD_BEFORE_RESTORE</param-name> | ||
102 | + <param-value>false</param-value> | ||
103 | + </context-param> | ||
104 | + --> | ||
105 | + | ||
106 | + <!-- JSF --> | ||
107 | + <context-param> | ||
108 | + <param-name>javax.faces.DEFAULT_SUFFIX</param-name> | ||
109 | + <param-value>.xhtml</param-value> | ||
110 | + </context-param> | ||
111 | + | ||
112 | + <servlet> | ||
113 | + <servlet-name>Faces Servlet</servlet-name> | ||
114 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | ||
115 | + <load-on-startup>1</load-on-startup> | ||
116 | + </servlet> | ||
117 | + | ||
118 | + <servlet-mapping> | ||
119 | + <servlet-name>Faces Servlet</servlet-name> | ||
120 | + <url-pattern>*.seam</url-pattern> | ||
121 | + </servlet-mapping> | ||
122 | + | ||
123 | + <!-- Not shure if this is needed | ||
124 | + <context-param> | ||
125 | + <description> | ||
126 | + JSF 1.2 detects the ViewHandler/StateManager version from the | ||
127 | + faces-config.xml DTD/XML schema name. The faces-config.xml files in | ||
128 | + the RichFaces JARs use the JSF 1.1 DTDs, causing JSF to use 1.1 | ||
129 | + behavior. Setting this flag to false ignores the version of the DTD | ||
130 | + used in these files, thus ensuring that JSF uses 1.2 behavior. | ||
131 | + | ||
132 | + One of the critical improvements in JSF 1.2 is that it throws a | ||
133 | + ViewExpiredException on a session timeout. | ||
134 | + | ||
135 | + See http://jira.jboss.com/jira/browse/RF-2294 and | ||
136 | + http://lists.jboss.org/pipermail/seam-dev/2008-February/000024.html. | ||
137 | + </description> | ||
138 | + <param-name>com.sun.faces.disableVersionTracking</param-name> | ||
139 | + <param-value>true</param-value> | ||
140 | + </context-param> | ||
141 | + --> | ||
142 | + | ||
143 | + <!-- URL Rewrite Filter - declare after seam filter --> <!-- | ||
144 | + There are two rewrite options in Seam, you can choose to either use the org.tuckey | ||
145 | + UrlRewriteFilter or the native Seam rewriting. You should not attempt to use both. | ||
146 | + The native Seam rewriting does not use the org.tuckey rewrite engine at all. | ||
147 | + If you are going to use Seam's native rewriting, then remove the org.tuckey | ||
148 | + UrlRewriteFilter from web.xml and nuke the urlrewrite.xml file. | ||
149 | + With Seam 2.1 or newer it is recommend to use Seam's native rewrite engine. | ||
150 | + --> <!-- | ||
151 | + <filter> | ||
152 | + <filter-name>UrlRewriteFilter</filter-name> | ||
153 | + <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> | ||
154 | + </filter> | ||
155 | + | ||
156 | + <filter-mapping> | ||
157 | + <filter-name>UrlRewriteFilter</filter-name> | ||
158 | + <url-pattern>/*</url-pattern> | ||
159 | + </filter-mapping> | ||
160 | + --> | ||
161 | + | ||
162 | + <session-config> | ||
163 | + <session-timeout>10</session-timeout> | ||
164 | + </session-config> | ||
165 | + | ||
166 | + <!-- --> | ||
167 | + <security-constraint> | ||
168 | + <display-name>Restrict raw XHTML Documents</display-name> | ||
169 | + <web-resource-collection> | ||
170 | + <web-resource-name>XHTML</web-resource-name> | ||
171 | + <url-pattern>*.xhtml</url-pattern> | ||
172 | + </web-resource-collection> | ||
173 | + <auth-constraint/> | ||
174 | + </security-constraint> | ||
175 | + | ||
176 | +</web-app> |
war/src/main/webapp/error.xhtml
0 → 100644
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + template="layout/template.xhtml"> | ||
9 | + | ||
10 | + <ui:param name="showGlobalMessages" value="false"/> | ||
11 | + <ui:define name="body"> | ||
12 | + | ||
13 | + <h1>Error</h1> | ||
14 | + <p>Something bad happened :-(</p> | ||
15 | + | ||
16 | + <h:messages id="errorMessage" styleClass="message"/> | ||
17 | + | ||
18 | + </ui:define> | ||
19 | +</ui:composition> |
war/src/main/webapp/favicon.ico
0 → 100644
No preview for this file type
war/src/main/webapp/home.xhtml
0 → 100644
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + xmlns:rich="http://richfaces.org/rich" | ||
9 | + template="layout/template.xhtml"> | ||
10 | + | ||
11 | + <ui:define name="body"> | ||
12 | + <h1>Welcome to Seam!</h1> | ||
13 | + <rich:panel> | ||
14 | + <h:panelGrid columns="2"> | ||
15 | + <h:graphicImage value="/img/seamlogo.png" alt="Seam logo" /> | ||
16 | + <s:div styleClass="info"> | ||
17 | + <p><strong>Your seam-gen project is deployed!</strong> Here are | ||
18 | + some of the features this project provides:</p> | ||
19 | + <ul class="bullets"> | ||
20 | + <li>Ant build script</li> | ||
21 | + <li>Deployment to JBoss AS (EAR or WAR)</li> | ||
22 | + <li>Development and production profiles</li> | ||
23 | + <li>Integration testing using TestNG and Embedded JBoss</li> | ||
24 | + <li>JavaBean or EJB 3.0 Seam components</li> | ||
25 | + <li>JPA entity classes</li> | ||
26 | + <li>A configurable DataSource and JPA EntityManager</li> | ||
27 | + <li>Templated Facelets views</li> | ||
28 | + <li>RichFaces panels and tables</li> | ||
29 | + <li>Default CSS stylesheet</li> | ||
30 | + <li>Internationalization support</li> | ||
31 | + </ul> | ||
32 | + </s:div> | ||
33 | + </h:panelGrid> | ||
34 | + </rich:panel> | ||
35 | + </ui:define> | ||
36 | +</ui:composition> |
war/src/main/webapp/img/btnmanageroles.png
0 → 100644
4.37 KB
war/src/main/webapp/img/btnmanageusers.png
0 → 100644
4.45 KB
war/src/main/webapp/img/btnnewpermission.png
0 → 100644
2.85 KB
war/src/main/webapp/img/btnnewrole.png
0 → 100644
2.71 KB
war/src/main/webapp/img/btnnewuser.png
0 → 100644
2.73 KB
war/src/main/webapp/img/dtpick.gif
0 → 100644
127 Bytes
war/src/main/webapp/img/error.gif
0 → 100644
1017 Bytes
war/src/main/webapp/img/false.png
0 → 100644
206 Bytes
war/src/main/webapp/img/manytoone.gif
0 → 100644
149 Bytes
war/src/main/webapp/img/msgerror.png
0 → 100644
718 Bytes
war/src/main/webapp/img/msginfo.png
0 → 100644
795 Bytes
war/src/main/webapp/img/msgwarn.png
0 → 100644
683 Bytes
war/src/main/webapp/img/onetomany.gif
0 → 100644
153 Bytes
war/src/main/webapp/img/seamlogo.png
0 → 100644
10.6 KB
war/src/main/webapp/img/true.png
0 → 100644
1.04 KB
war/src/main/webapp/layout/display.xhtml
0 → 100644
1 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
2 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
3 | + xmlns:h="http://java.sun.com/jsf/html" | ||
4 | + xmlns:f="http://java.sun.com/jsf/core" | ||
5 | + xmlns:s="http://jboss.com/products/seam/taglib"> | ||
6 | + | ||
7 | + <div class="prop"> | ||
8 | + <span class="name"> | ||
9 | + <ui:insert name="label"/> | ||
10 | + </span> | ||
11 | + <span class="value"> | ||
12 | + <ui:insert/> | ||
13 | + </span> | ||
14 | + </div> | ||
15 | + | ||
16 | +</ui:composition> |
war/src/main/webapp/layout/edit.xhtml
0 → 100644
1 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
2 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
3 | + xmlns:h="http://java.sun.com/jsf/html" | ||
4 | + xmlns:f="http://java.sun.com/jsf/core" | ||
5 | + xmlns:s="http://jboss.com/products/seam/taglib"> | ||
6 | + | ||
7 | + <div class="prop"> | ||
8 | + | ||
9 | + <s:label styleClass="name #{invalid?'errors':''}"> | ||
10 | + <ui:insert name="label"/> | ||
11 | + <s:span styleClass="required" rendered="#{required}">*</s:span> | ||
12 | + </s:label> | ||
13 | + | ||
14 | + <span class="value #{invalid?'errors':''}"> | ||
15 | + <s:validateAll> | ||
16 | + <ui:insert/> | ||
17 | + </s:validateAll> | ||
18 | + </span> | ||
19 | + | ||
20 | + <span class="error"> | ||
21 | + <h:graphicImage value="/img/error.gif" rendered="#{invalid}" styleClass="errors"/> | ||
22 | + <s:message styleClass="errors"/> | ||
23 | + </span> | ||
24 | + | ||
25 | + </div> | ||
26 | + | ||
27 | +</ui:composition> |
war/src/main/webapp/layout/menu.xhtml
0 → 100644
1 | +<rich:toolBar | ||
2 | + xmlns="http://www.w3.org/1999/xhtml" | ||
3 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
4 | + xmlns:h="http://java.sun.com/jsf/html" | ||
5 | + xmlns:f="http://java.sun.com/jsf/core" | ||
6 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
7 | + xmlns:rich="http://richfaces.org/rich"> | ||
8 | + | ||
9 | + <rich:toolBarGroup> | ||
10 | + <h:outputText value="#{projectName}:"/> | ||
11 | + <s:link | ||
12 | + id="menuHomeId" | ||
13 | + view="/home.xhtml" | ||
14 | + value="Home" | ||
15 | + propagation="none"/> | ||
16 | + </rich:toolBarGroup> | ||
17 | + | ||
18 | + <!-- @newMenuItem@ --> | ||
19 | + <s:link view="/view/example/MovieList.xhtml" | ||
20 | + value="Movie List" | ||
21 | + includePageParams="false" | ||
22 | + propagation="none"/> | ||
23 | + | ||
24 | + | ||
25 | + <rich:toolBarGroup location="right"> | ||
26 | + <ui:remove> | ||
27 | + <!-- temporarily disabled for all --> | ||
28 | + <s:link | ||
29 | + id="identityManagement" | ||
30 | + view="/useradmin" | ||
31 | + value="Identity Management" | ||
32 | + propagation="none" | ||
33 | + rendered="#{identity.hasRole('admin')}"/> | ||
34 | + </ui:remove> | ||
35 | + | ||
36 | + <h:outputText | ||
37 | + id="menuWelcomeId" | ||
38 | + value="signed in as: #{credentials.username}" | ||
39 | + rendered="#{identity.loggedIn}"/> | ||
40 | + <s:link | ||
41 | + id="menuLoginId" | ||
42 | + view="/login.xhtml" | ||
43 | + value="Login" | ||
44 | + rendered="#{not identity.loggedIn}" | ||
45 | + propagation="none"/> | ||
46 | + <s:link | ||
47 | + id="menuLogoutId" | ||
48 | + view="/home.xhtml" | ||
49 | + action="#{identity.logout}" | ||
50 | + value="Logout" | ||
51 | + rendered="#{identity.loggedIn}" | ||
52 | + propagation="none"/> | ||
53 | + </rich:toolBarGroup> | ||
54 | +</rich:toolBar> |
war/src/main/webapp/layout/sort.xhtml
0 → 100644
1 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
2 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
3 | + xmlns:f="http://java.sun.com/jsf/core" | ||
4 | + xmlns:h="http://java.sun.com/jsf/html" | ||
5 | + xmlns:c="http://java.sun.com/jstl/core" | ||
6 | + xmlns:s="http://jboss.com/products/seam/taglib"> | ||
7 | + <s:link styleClass="columnHeader" value="#{propertyLabel} #{entityList.orderColumn == propertyPath ? (entityList.orderDirection == 'desc' ? messages.down : messages.up) : ''}"> | ||
8 | + <f:param name="sort" value="#{propertyPath}"/> | ||
9 | + <f:param name="dir" value="#{entityList.orderColumn == propertyPath and entityList.orderDirection == 'asc' ? 'desc' : 'asc'}"/> | ||
10 | + </s:link> | ||
11 | +</ui:composition> |
war/src/main/webapp/layout/template.xhtml
0 → 100644
1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<f:view xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
5 | + xmlns:f="http://java.sun.com/jsf/core" | ||
6 | + xmlns:h="http://java.sun.com/jsf/html" | ||
7 | + xmlns:a="http://richfaces.org/a4j" | ||
8 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
9 | + contentType="text/html"> | ||
10 | +<html> | ||
11 | +<head> | ||
12 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
13 | + <title>Seam Reference Implementation</title> | ||
14 | + <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/> | ||
15 | + <a:loadStyle src="resource:///stylesheet/theme.xcss"/> | ||
16 | + <a:loadStyle src="/stylesheet/theme.css"/> | ||
17 | + <ui:insert name="head"/> | ||
18 | +</head> | ||
19 | +<body> | ||
20 | + <ui:include src="menu.xhtml"> | ||
21 | + <ui:param name="projectName" value="seam-refimpl"/> | ||
22 | + </ui:include> | ||
23 | + <div class="body"> | ||
24 | + <h:messages | ||
25 | + id="messages" | ||
26 | + globalOnly="true" | ||
27 | + styleClass="message" | ||
28 | + errorClass="errormsg" | ||
29 | + infoClass="infomsg" | ||
30 | + warnClass="warnmsg" | ||
31 | + rendered="#{showGlobalMessages != 'false'}"/> | ||
32 | + <ui:insert name="body"/> | ||
33 | + </div> | ||
34 | + <div class="footer"> | ||
35 | + <p> | ||
36 | + Powered by <a href="http://seamframework.org">Seam</a> #{org.jboss.seam.version} and | ||
37 | + <a href="http://www.jboss.org/jbossrichfaces">RichFaces</a>. Generated by seam-gen. | ||
38 | + </p> | ||
39 | + <s:fragment rendered="#{init.debug}"> | ||
40 | + <a:log hotkey="D"/> | ||
41 | + <p style="margin-top: -0.5em;"> | ||
42 | + Conversation: id = #{conversation.id}, #{conversation.longRunning ? 'long running' : 'temporary'}#{conversation.nested ? ', nested, parent id = '.concat(conversation.parentId) : ''} | ||
43 | + #{' - '} | ||
44 | + Ajax4jsf Log (Ctrl+Shift+D) | ||
45 | + #{' - '} | ||
46 | + <s:link id="debugConsole" view="/debug.xhtml" value="Debug console" target="debugConsole"/> | ||
47 | + #{' - '} | ||
48 | + <s:link id="resetSession" view="/home.xhtml" action="#{org.jboss.seam.web.session.invalidate}" propagation="none" value="Terminate session"/> | ||
49 | + </p> | ||
50 | + </s:fragment> | ||
51 | + </div> | ||
52 | +</body> | ||
53 | +</html> | ||
54 | +</f:view> |
war/src/main/webapp/login.page.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<page xmlns="http://jboss.com/products/seam/pages" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"> | ||
5 | + | ||
6 | + <navigation from-action="#{identity.login}"> | ||
7 | + <rule if="#{identity.loggedIn}"> | ||
8 | + <redirect view-id="/home.xhtml"/> | ||
9 | + </rule> | ||
10 | + </navigation> | ||
11 | + | ||
12 | +</page> |
war/src/main/webapp/login.xhtml
0 → 100644
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + xmlns:rich="http://richfaces.org/rich" | ||
9 | + template="layout/template.xhtml"> | ||
10 | + | ||
11 | +<ui:define name="body"> | ||
12 | + | ||
13 | + <h:form id="loginForm"> | ||
14 | + | ||
15 | + <rich:panel> | ||
16 | + <f:facet name="header">Login</f:facet> | ||
17 | + | ||
18 | + <p>Please login here</p> | ||
19 | + | ||
20 | + <div class="dialog"> | ||
21 | + <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value"> | ||
22 | + <h:outputLabel for="username">Username</h:outputLabel> | ||
23 | + <h:inputText id="username" | ||
24 | + value="#{credentials.username}"/> | ||
25 | + <h:outputLabel for="password">Password</h:outputLabel> | ||
26 | + <h:inputSecret id="password" | ||
27 | + value="#{credentials.password}"/> | ||
28 | + <h:outputLabel for="rememberMe">Remember me</h:outputLabel> | ||
29 | + <h:selectBooleanCheckbox id="rememberMe" | ||
30 | + value="#{rememberMe.enabled}"/> | ||
31 | + </h:panelGrid> | ||
32 | + </div> | ||
33 | + | ||
34 | + <p> | ||
35 | + <i>Note - </i> You may login with the username 'admin' and a blank password. | ||
36 | + </p> | ||
37 | + | ||
38 | + </rich:panel> | ||
39 | + | ||
40 | + <div class="actionButtons"> | ||
41 | + <h:commandButton id="submit" value="Login" action="#{identity.login}"/> | ||
42 | + </div> | ||
43 | + | ||
44 | + </h:form> | ||
45 | + | ||
46 | + </ui:define> | ||
47 | +</ui:composition> |
war/src/main/webapp/security_error.xhtml
0 → 100644
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + template="layout/template.xhtml"> | ||
9 | + | ||
10 | +<ui:define name="body"> | ||
11 | + | ||
12 | + <h1>A Security Error has occurred</h1> | ||
13 | + <s:fragment rendered="#{not empty facesMessages.currentMessages}"> | ||
14 | + <h:messages styleClass="message" errorClass="errormsg" | ||
15 | + infoClass="infomsg" warnClass="warnmsg" globalOnly="true" /> | ||
16 | + </s:fragment> | ||
17 | + <s:fragment rendered="#{empty facesMessages.currentMessages}"> | ||
18 | + <p>#{not empty org.jboss.seam.handledException.message ? | ||
19 | + org.jboss.seam.handledException.message : 'The cause of the error is | ||
20 | + unknown'}</p> | ||
21 | + </s:fragment> | ||
22 | + | ||
23 | + </ui:define> | ||
24 | +</ui:composition> |
war/src/main/webapp/stylesheet/theme.css
0 → 100644
1 | +html { | ||
2 | + overflow-y: scroll; | ||
3 | +} | ||
4 | + | ||
5 | +body { | ||
6 | + font-size: 12px; | ||
7 | + margin: 0px; | ||
8 | +} | ||
9 | + | ||
10 | +a img { | ||
11 | + border: none; | ||
12 | +} | ||
13 | + | ||
14 | +h1 { | ||
15 | + font-size: 1.6em; | ||
16 | + margin-top: 0; | ||
17 | +} | ||
18 | + | ||
19 | +input[type=submit], input[type=button] { | ||
20 | + font-size: 11px; | ||
21 | + margin: 5px 5px 5px 0; | ||
22 | + cursor: pointer; | ||
23 | +} | ||
24 | + | ||
25 | +input[type=text], input[type=password], textarea { | ||
26 | + font-size: 12px; | ||
27 | + padding-left: 1px; | ||
28 | +} | ||
29 | + | ||
30 | +select { | ||
31 | + font-size: 13px; | ||
32 | +} | ||
33 | + | ||
34 | +.tableControl, .actionButtons { | ||
35 | + width: 100%; | ||
36 | +} | ||
37 | + | ||
38 | +.tableControl a { | ||
39 | + padding-left: 10px; | ||
40 | +} | ||
41 | + | ||
42 | +.tableControl { | ||
43 | + text-align: right; | ||
44 | +} | ||
45 | + | ||
46 | +.footer { | ||
47 | + text-align: center; | ||
48 | + font-size: 11px; | ||
49 | + margin-bottom: 10px; | ||
50 | +} | ||
51 | + | ||
52 | +.rich-table { | ||
53 | + width: 100%; | ||
54 | +} | ||
55 | + | ||
56 | +.body { | ||
57 | + padding: 30px; | ||
58 | +} | ||
59 | +.message { | ||
60 | + padding: 5px; | ||
61 | + list-style: none; | ||
62 | + border: 0; | ||
63 | + background: none; | ||
64 | + padding: 0; | ||
65 | + color: #000000; | ||
66 | + margin: 5px 0 8px 0; | ||
67 | + font-size: 12px; | ||
68 | +} | ||
69 | + | ||
70 | +.message li { | ||
71 | + background: no-repeat left center; | ||
72 | + padding-top: 1px; | ||
73 | + padding-left: 20px; | ||
74 | + margin-left: 3px; | ||
75 | +} | ||
76 | + | ||
77 | +.message li.infomsg { | ||
78 | + background-image: url(../img/msginfo.png); | ||
79 | +} | ||
80 | + | ||
81 | +.message li.errormsg { | ||
82 | + background-image: url(../img/msgerror.png); | ||
83 | +} | ||
84 | + | ||
85 | +.message li.warnmsg { | ||
86 | + background-image: url(../img/msgwarn.png); | ||
87 | +} | ||
88 | + | ||
89 | +.name { | ||
90 | + vertical-align: top; | ||
91 | + font-weight: bold; | ||
92 | + width: 115px; | ||
93 | + float: left; | ||
94 | + padding: 5px; | ||
95 | + margin-top: 3px; | ||
96 | + clear: left; | ||
97 | +} | ||
98 | + | ||
99 | +.value { | ||
100 | + float: left; | ||
101 | + padding: 5px; | ||
102 | +} | ||
103 | + | ||
104 | +.error { | ||
105 | + float: left; | ||
106 | + padding: 5px; | ||
107 | +} | ||
108 | + | ||
109 | +.errors { | ||
110 | + color: #FF0000; | ||
111 | + vertical-align: middle; | ||
112 | +} | ||
113 | + | ||
114 | +img.errors { | ||
115 | + padding-right: 5px; | ||
116 | +} | ||
117 | + | ||
118 | +.errors input, .errors textarea, .errors select { | ||
119 | + border: 1px solid red !important; | ||
120 | +} | ||
121 | + | ||
122 | +.required { | ||
123 | + color: #FF0000; | ||
124 | + padding-left: 2px; | ||
125 | +} | ||
126 | + | ||
127 | +.rich-stglpanel-body { | ||
128 | + overflow: auto; | ||
129 | +} | ||
130 | + | ||
131 | +/* the specificity here is necessary to override the defaults */ | ||
132 | +/* | ||
133 | +.rich-panel .rich-panel-header, | ||
134 | +.rich-stglpanel .rich-stglpanel-header { | ||
135 | + padding: 2px 3px; | ||
136 | +}*/ | ||
137 | + | ||
138 | +.rich-panel input[type=submit], .rich-panel input[type=button], | ||
139 | +.rich-tabpanel input[type=submit], .rich-tabpanel input[type=button] { | ||
140 | + margin-bottom: 0; | ||
141 | +} | ||
142 | + | ||
143 | +.tableControl input[type=submit], .tableControl input[type=button], .tableControl select { | ||
144 | + margin: 5px 0 5px 5px; | ||
145 | +} | ||
146 | + | ||
147 | +/* I don't know why this is necessary, but the select is off by a pixel on the top and is padding too much on the left */ | ||
148 | +.tableControl select { | ||
149 | + margin-left: 2px; | ||
150 | + position: relative; | ||
151 | + top: 1px; | ||
152 | +} | ||
153 | + | ||
154 | +.actionButtons { | ||
155 | + padding-left: 1px; | ||
156 | +} | ||
157 | + | ||
158 | +.actionButtons select { | ||
159 | + margin: 5px 5px 5px 0; | ||
160 | + vertical-align: bottom; | ||
161 | +} | ||
162 | + | ||
163 | +.rich-toolbar-item a { | ||
164 | + text-decoration: none; | ||
165 | +} | ||
166 | + | ||
167 | +.rich-toolbar-item a:hover, .rich-ddmenu-label-select { | ||
168 | + text-decoration: underline; | ||
169 | +} | ||
170 | + | ||
171 | +.rich-toolbar-item .rich-menu-item a:hover { | ||
172 | + text-decoration: none; | ||
173 | +} | ||
174 | + | ||
175 | +.rich-datalist { | ||
176 | + list-style: square; | ||
177 | + margin: 6px 0 1px 0; | ||
178 | + padding-left: 18px; | ||
179 | +} | ||
180 | + | ||
181 | +.rich-list-item { | ||
182 | + padding-bottom: 4px; | ||
183 | +} | ||
184 | + | ||
185 | +div.info { | ||
186 | + font-size: 1.2em; | ||
187 | +} | ||
188 | + | ||
189 | +ul.bullets { | ||
190 | + list-style: square; | ||
191 | +} | ||
192 | + | ||
193 | +ul.bullets li { | ||
194 | + padding-bottom: 2px; | ||
195 | +} | ||
196 | + | ||
197 | +td.action { | ||
198 | + text-align: center; | ||
199 | + width: 8em; | ||
200 | + white-space: nowrap; | ||
201 | +} | ||
202 | + | ||
203 | +td.action a { | ||
204 | + padding-left: 1px; | ||
205 | + padding-right: 1px; | ||
206 | +} | ||
207 | + | ||
208 | +table.radio { | ||
209 | + border: 0; | ||
210 | +} | ||
211 | + | ||
212 | +table.radio td { | ||
213 | + padding: 0 2px; | ||
214 | +} | ||
215 | + | ||
216 | +table.radio input[type=radio] { | ||
217 | + vertical-align: bottom; | ||
218 | +} |
war/src/main/webapp/stylesheet/theme.xcss
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<f:template xmlns="http://www.w3.org/1999/xhtml" | ||
3 | + xmlns:f="http:/jsf.exadel.com/template" | ||
4 | + xmlns:u="http:/jsf.exadel.com/template/util"> | ||
5 | + <u:selector name="body"> | ||
6 | + <u:style name="font-family" skin="generalFamilyFont"/> | ||
7 | + <u:style name="color" skin="generalTextColor"/> | ||
8 | + </u:selector> | ||
9 | + <u:selector name="h1"> | ||
10 | + <u:style name="font-family" skin="generalFamilyFont"/> | ||
11 | + <u:style name="color" skin="tabDisabledTextColor"/> | ||
12 | + </u:selector> | ||
13 | + <u:selector name="a:active, a:link, a:visited"> | ||
14 | + <u:style name="color" skin="generalLinkColor"/> | ||
15 | + </u:selector> | ||
16 | + <u:selector name="a:hover"> | ||
17 | + <u:style name="color" skin="hoverLinkColor"/> | ||
18 | + </u:selector> | ||
19 | + <u:selector name="input[type=text], input[type=password], textarea, select"> | ||
20 | + <u:style name="background-color" skin="controlBackgroundColor"/> | ||
21 | + <u:style name="color" skin="controlTextColor"/> | ||
22 | + <u:style name="background-position" value="left top"/> | ||
23 | + <u:style name="background-repeat" value="repeat-x"/> | ||
24 | + <u:style name="background-image"> | ||
25 | + <f:resource f:key="org.richfaces.renderkit.html.images.SliderFieldGradient"/> | ||
26 | + </u:style> | ||
27 | + <u:style name="border" value="1px solid"/> | ||
28 | + <u:style name="border-color" skin="tableBorderColor" /> | ||
29 | + </u:selector> | ||
30 | + <u:selector name="select"> | ||
31 | + <u:style name="background-color" value="transparent"/> | ||
32 | + <u:style name="background-image"> | ||
33 | + <f:resource f:key="org.richfaces.renderkit.html.images.SliderFieldGradient"/> | ||
34 | + </u:style> | ||
35 | + </u:selector> | ||
36 | + <u:selector name="option"> | ||
37 | + <u:style name="background-color" skin="generalBackgroundColor"/> | ||
38 | + </u:selector> | ||
39 | + <u:selector name="select[multiple]"> | ||
40 | + <u:style name="background-color" skin="controlBackgroundColor"/> | ||
41 | + </u:selector> | ||
42 | + <u:selector name="select[multiple] option"> | ||
43 | + <u:style name="background-color" value="transparent"/> | ||
44 | + </u:selector> | ||
45 | + <u:selector name="input[type=submit], input[type=button]"> | ||
46 | + <u:style name="padding" value="1px 4px"/> | ||
47 | + <u:style name="background-image"> | ||
48 | + <f:resource f:key="org.richfaces.renderkit.html.GradientA"/> | ||
49 | + </u:style> | ||
50 | + <u:style name="border" value="1px solid"/> | ||
51 | + <u:style name="border-color" skin="headerBackgroundColor"/> | ||
52 | + <u:style name="color" skin="headerTextColor"/> | ||
53 | + <u:style name="font-weight" value="bold"/> | ||
54 | + </u:selector> | ||
55 | + <u:selector name="input[type=submit][disabled], input[type=button][disabled]"> | ||
56 | + <u:style name="opacity" value="0.33"/> | ||
57 | + </u:selector> | ||
58 | + <!-- hack for IE to just get rid of border since it doubles the border if you use one --> | ||
59 | + <u:selector name="* html input[type=submit], * html input[type=button], *+html input[type=submit], *+html input[type=button]"> | ||
60 | + <u:style name="border" value="0"/> | ||
61 | + <u:style name="font-size" value="11px"/> | ||
62 | + </u:selector> | ||
63 | + <u:selector name=".rich-table-subheadercell"> | ||
64 | + <u:style name="background-image"> | ||
65 | + <f:resource f:key="org.richfaces.renderkit.images.TabGradientB"/> | ||
66 | + </u:style> | ||
67 | + </u:selector> | ||
68 | + <u:selector name=".rich-toolbar a:link, .rich-toolbar a:visited, .rich-toolbar a:active, .rich-toolbar a:hover"> | ||
69 | + <u:style name="color" skin="headerTextColor"/> | ||
70 | + </u:selector> | ||
71 | + <u:selector name=".rich-toolbar a:hover"> | ||
72 | + <u:style name="color" skin="generalTextColor"/> | ||
73 | + </u:selector> | ||
74 | + <u:selector name=".rich-toolbar .rich-menu-item, .rich-toolbar .rich-menu-item a, .rich-toolbar .rich-menu-item a:hover, .rich-toolbar .rich-menu-item a:visited"> | ||
75 | + <u:style name="color" skin="generalTextColor" /> | ||
76 | + </u:selector> | ||
77 | + <u:selector name=".rich-table-subheadercell a:hover"> | ||
78 | + <u:style name="color" skin="calendarHolidaysTextColor"/> | ||
79 | + </u:selector> | ||
80 | + <!-- Define static styles in the CDATA block below (you can also move this block to the top) --> | ||
81 | + <f:verbatim><![CDATA[ | ||
82 | +]]></f:verbatim> | ||
83 | +</f:template> |
war/src/main/webapp/stylesheet/useradmin.css
0 → 100644
1 | +input.newuser { | ||
2 | + background: url(../img/btnnewuser.png) top left no-repeat; | ||
3 | + height: 39px; | ||
4 | + width: 113px; | ||
5 | + margin: 4px 4px 4px 4px; | ||
6 | + border: 0px; | ||
7 | + cursor: pointer; | ||
8 | +} | ||
9 | + | ||
10 | +input.newrole { | ||
11 | + background: url(../img/btnnewrole.png) top left no-repeat; | ||
12 | + height: 39px; | ||
13 | + width: 113px; | ||
14 | + margin: 4px 4px 4px 4px; | ||
15 | + border: 0px; | ||
16 | + cursor: pointer; | ||
17 | +} | ||
18 | + | ||
19 | +input.newpermission { | ||
20 | + background: url(../img/btnnewpermission.png) top left no-repeat; | ||
21 | + height: 39px; | ||
22 | + width: 113px; | ||
23 | + margin: 4px 4px 4px 4px; | ||
24 | + border: 0px; | ||
25 | + cursor: pointer; | ||
26 | +} | ||
27 | + | ||
28 | +input.manageusers { | ||
29 | + display: block; | ||
30 | + background: url(../img/btnmanageusers.png) top left no-repeat; | ||
31 | + height: 88px; | ||
32 | + width: 300px; | ||
33 | + padding-left: 10px; | ||
34 | + font-size: 19px; | ||
35 | + font-weight: bold; | ||
36 | + color: #333333; | ||
37 | + border: 0px; | ||
38 | + cursor: pointer; | ||
39 | + margin-top: 20px; | ||
40 | + margin-left: 20px; | ||
41 | +} | ||
42 | + | ||
43 | +input.manageroles { | ||
44 | + display: block; | ||
45 | + background: url(../img/btnmanageroles.png) top left no-repeat; | ||
46 | + height: 88px; | ||
47 | + width: 300px; | ||
48 | + padding-left: 10px; | ||
49 | + font-size: 19px; | ||
50 | + font-weight: bold; | ||
51 | + color: #333333; | ||
52 | + border: 0px; | ||
53 | + cursor: pointer; | ||
54 | + margin-top: 20px; | ||
55 | + margin-left: 20px; | ||
56 | +} | ||
57 | + | ||
58 | +.roles { | ||
59 | + width: 120px; | ||
60 | + border: 1px solid #7F9DB9; | ||
61 | + background-color: #E7EDF7; | ||
62 | +} | ||
63 | + | ||
64 | +div.selectMany label { | ||
65 | + float: none; | ||
66 | +} | ||
67 | + | ||
68 | +div.selectMany input[type="checkbox"] { | ||
69 | + vertical-align: middle; | ||
70 | +} | ||
71 | + | ||
72 | +div.status-true { | ||
73 | + background: url(../img/true.png) top left no-repeat; | ||
74 | + width: 14px; | ||
75 | + height: 15px; | ||
76 | + margin-left: auto; | ||
77 | + margin-right: auto; | ||
78 | +} | ||
79 | + | ||
80 | +div.status-false { | ||
81 | + background: url(../img/false.png) top left no-repeat; | ||
82 | + width: 14px; | ||
83 | + height: 15px; | ||
84 | + margin-left: auto; | ||
85 | + margin-right: auto; | ||
86 | +} | ||
87 | + | ||
88 | +table.useradmin, div.useradmin { | ||
89 | + width: 500px; | ||
90 | +} | ||
91 | + | ||
92 | +/* | ||
93 | +table.useradmin tr.odd { | ||
94 | + background-color: #FFFFFF; | ||
95 | +} | ||
96 | + | ||
97 | +table.useradmin tr.even { | ||
98 | + background-color: #E9F5FF; | ||
99 | +} | ||
100 | +*/ | ||
101 | + | ||
102 | +td.enabled { | ||
103 | + text-align: center; | ||
104 | +} | ||
105 | + | ||
106 | +fieldset.roles .roles { | ||
107 | + border: none; | ||
108 | +} | ||
109 | + | ||
110 | +table.iceSelMnyCb td { | ||
111 | + text-align: left; | ||
112 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<page xmlns="http://jboss.com/products/seam/pages" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"> | ||
5 | + | ||
6 | + <param name="movieFrom"/> | ||
7 | + <param name="movieId" value="#{movieHome.movieId}"/> | ||
8 | + | ||
9 | + | ||
10 | +</page> |
war/src/main/webapp/view/example/Movie.xhtml
0 → 100644
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + xmlns:rich="http://richfaces.org/rich" | ||
9 | + template="/layout/template.xhtml"> | ||
10 | + | ||
11 | +<ui:define name="body"> | ||
12 | + | ||
13 | + <rich:panel> | ||
14 | + <f:facet name="header">Movie Details</f:facet> | ||
15 | + | ||
16 | + <s:decorate id="director" template="/layout/display.xhtml"> | ||
17 | + <ui:define name="label">Director</ui:define> | ||
18 | + <h:outputText value="#{movieHome.instance.director}"/> | ||
19 | + </s:decorate> | ||
20 | + | ||
21 | + <s:decorate id="title" template="/layout/display.xhtml"> | ||
22 | + <ui:define name="label">Title</ui:define> | ||
23 | + <h:outputText value="#{movieHome.instance.title}"/> | ||
24 | + </s:decorate> | ||
25 | + | ||
26 | + <s:decorate id="year" template="/layout/display.xhtml"> | ||
27 | + <ui:define name="label">Year</ui:define> | ||
28 | + <h:outputText value="#{movieHome.instance.year}"/> | ||
29 | + </s:decorate> | ||
30 | + | ||
31 | + <s:decorate id="plot" template="/layout/display.xhtml"> | ||
32 | + <ui:define name="label">Plot</ui:define> | ||
33 | + <h:outputText value="#{movieHome.instance.plot}"/> | ||
34 | + </s:decorate> | ||
35 | + | ||
36 | + <div style="clear:both"/> | ||
37 | + | ||
38 | + </rich:panel> | ||
39 | + | ||
40 | + <div class="actionButtons"> | ||
41 | + | ||
42 | + <s:button view="/view/example/MovieEdit.xhtml" | ||
43 | + id="edit" | ||
44 | + value="Edit"/> | ||
45 | + | ||
46 | + <s:button view="/view/example/#{empty movieFrom ? 'MovieList' : movieFrom}.xhtml" | ||
47 | + id="done" | ||
48 | + value="Done"/> | ||
49 | + | ||
50 | + </div> | ||
51 | + | ||
52 | +</ui:define> | ||
53 | + | ||
54 | +</ui:composition> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<page xmlns="http://jboss.com/products/seam/pages" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd" | ||
5 | + no-conversation-view-id="/MovieList.xhtml" | ||
6 | + login-required="true"> | ||
7 | + | ||
8 | + <begin-conversation join="true" flush-mode="MANUAL"/> | ||
9 | + | ||
10 | + <action execute="#{movieHome.wire}"/> | ||
11 | + | ||
12 | + <param name="movieFrom"/> | ||
13 | + <param name="movieId" value="#{movieHome.movieId}"/> | ||
14 | + | ||
15 | + | ||
16 | + <navigation from-action="#{movieHome.persist}"> | ||
17 | + <rule if-outcome="persisted"> | ||
18 | + <end-conversation/> | ||
19 | + <redirect view-id="/view/example/Movie.xhtml"/> | ||
20 | + </rule> | ||
21 | + </navigation> | ||
22 | + | ||
23 | + <navigation from-action="#{movieHome.update}"> | ||
24 | + <rule if-outcome="updated"> | ||
25 | + <end-conversation/> | ||
26 | + <redirect view-id="/view/example/Movie.xhtml"/> | ||
27 | + </rule> | ||
28 | + </navigation> | ||
29 | + | ||
30 | + <navigation from-action="#{movieHome.remove}"> | ||
31 | + <rule if-outcome="removed"> | ||
32 | + <end-conversation/> | ||
33 | + <redirect view-id="/view/example/MovieList.xhtml"/> | ||
34 | + </rule> | ||
35 | + </navigation> | ||
36 | + | ||
37 | +</page> |
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + xmlns:a="http://richfaces.org/a4j" | ||
9 | + xmlns:rich="http://richfaces.org/rich" | ||
10 | + template="/layout/template.xhtml"> | ||
11 | + | ||
12 | +<ui:define name="body"> | ||
13 | + | ||
14 | + <h:form id="movie" styleClass="edit"> | ||
15 | + | ||
16 | + <rich:panel> | ||
17 | + <f:facet name="header">#{movieHome.managed ? 'Edit' : 'Add'} Movie</f:facet> | ||
18 | + | ||
19 | + <s:decorate id="directorField" template="/layout/edit.xhtml"> | ||
20 | + <ui:define name="label">Director</ui:define> | ||
21 | + <h:inputText id="director" | ||
22 | + required="true" | ||
23 | + size="50" | ||
24 | + maxlength="50" | ||
25 | + value="#{movieHome.instance.director}"> | ||
26 | + <a:support event="onblur" reRender="directorField" bypassUpdates="true" ajaxSingle="true"/> | ||
27 | + </h:inputText> | ||
28 | + </s:decorate> | ||
29 | + | ||
30 | + <s:decorate id="titleField" template="/layout/edit.xhtml"> | ||
31 | + <ui:define name="label">Title</ui:define> | ||
32 | + <h:inputText id="title" | ||
33 | + required="true" | ||
34 | + size="60" | ||
35 | + maxlength="60" | ||
36 | + value="#{movieHome.instance.title}"> | ||
37 | + <a:support event="onblur" reRender="titleField" bypassUpdates="true" ajaxSingle="true"/> | ||
38 | + </h:inputText> | ||
39 | + </s:decorate> | ||
40 | + | ||
41 | + <s:decorate id="yearField" template="/layout/edit.xhtml"> | ||
42 | + <ui:define name="label">Year</ui:define> | ||
43 | + <h:inputText id="year" | ||
44 | + required="true" | ||
45 | + value="#{movieHome.instance.year}"> | ||
46 | + <a:support event="onblur" reRender="yearField" bypassUpdates="true" ajaxSingle="true"/> | ||
47 | + </h:inputText> | ||
48 | + </s:decorate> | ||
49 | + | ||
50 | + <s:decorate id="plotField" template="/layout/edit.xhtml"> | ||
51 | + <ui:define name="label">Plot</ui:define> | ||
52 | + <h:inputTextarea id="plot" | ||
53 | + cols="80" | ||
54 | + rows="5" | ||
55 | + value="#{movieHome.instance.plot}"/> | ||
56 | + </s:decorate> | ||
57 | + | ||
58 | + | ||
59 | + <div style="clear:both"> | ||
60 | + <span class="required">*</span> | ||
61 | + required fields | ||
62 | + </div> | ||
63 | + | ||
64 | + </rich:panel> | ||
65 | + | ||
66 | + <div class="actionButtons"> | ||
67 | + <h:commandButton id="save" | ||
68 | + value="Save" | ||
69 | + action="#{movieHome.persist}" | ||
70 | + disabled="#{!movieHome.wired}" | ||
71 | + rendered="#{!movieHome.managed}"/> | ||
72 | + <h:commandButton id="update" | ||
73 | + value="Save" | ||
74 | + action="#{movieHome.update}" | ||
75 | + rendered="#{movieHome.managed}"/> | ||
76 | + <h:commandButton id="delete" | ||
77 | + value="Delete" | ||
78 | + action="#{movieHome.remove}" | ||
79 | + immediate="true" | ||
80 | + rendered="#{movieHome.managed}"/> | ||
81 | + <s:button id="cancelEdit" | ||
82 | + value="Cancel" | ||
83 | + propagation="end" | ||
84 | + view="/view/example/Movie.xhtml" | ||
85 | + rendered="#{movieHome.managed}"/> | ||
86 | + <s:button id="cancelAdd" | ||
87 | + value="Cancel" | ||
88 | + propagation="end" | ||
89 | + view="/view/example/#{empty movieFrom ? 'MovieList' : movieFrom}.xhtml" | ||
90 | + rendered="#{!movieHome.managed}"/> | ||
91 | + </div> | ||
92 | + </h:form> | ||
93 | + | ||
94 | +</ui:define> | ||
95 | + | ||
96 | +</ui:composition> |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<page xmlns="http://jboss.com/products/seam/pages" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd"> | ||
5 | + | ||
6 | + <param name="firstResult" value="#{movieList.firstResult}"/> | ||
7 | + <param name="sort" value="#{movieList.orderColumn}"/> | ||
8 | + <param name="dir" value="#{movieList.orderDirection}"/> | ||
9 | + <param name="logic" value="#{movieList.restrictionLogicOperator}"/> | ||
10 | + | ||
11 | + <param name="from"/> | ||
12 | + <param name="director" value="#{movieList.movie.director}"/> | ||
13 | + <param name="title" value="#{movieList.movie.title}"/> | ||
14 | + | ||
15 | +</page> |
1 | +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
3 | +<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
4 | + xmlns:s="http://jboss.com/products/seam/taglib" | ||
5 | + xmlns:ui="http://java.sun.com/jsf/facelets" | ||
6 | + xmlns:f="http://java.sun.com/jsf/core" | ||
7 | + xmlns:h="http://java.sun.com/jsf/html" | ||
8 | + xmlns:rich="http://richfaces.org/rich" template="/layout/template.xhtml"> | ||
9 | + | ||
10 | + <ui:define name="body"> | ||
11 | + | ||
12 | + <h:form id="movieSearch" styleClass="edit"> | ||
13 | + | ||
14 | + <rich:simpleTogglePanel label="Movie Search Filter" switchType="ajax"> | ||
15 | + | ||
16 | + <s:decorate template="/layout/display.xhtml"> | ||
17 | + <ui:define name="label">Director</ui:define> | ||
18 | + <h:inputText id="director" value="#{movieList.movie.director}" /> | ||
19 | + </s:decorate> | ||
20 | + | ||
21 | + <s:decorate template="/layout/display.xhtml"> | ||
22 | + <ui:define name="label">Title</ui:define> | ||
23 | + <h:inputText id="title" value="#{movieList.movie.title}" /> | ||
24 | + </s:decorate> | ||
25 | + | ||
26 | + <s:decorate template="/layout/display.xhtml"> | ||
27 | + <ui:define name="label">Match</ui:define> | ||
28 | + <h:selectOneRadio id="logic" | ||
29 | + value="#{movieList.restrictionLogicOperator}" styleClass="radio"> | ||
30 | + <f:selectItem itemLabel="All" itemValue="and" /> | ||
31 | + <f:selectItem itemLabel="Any" itemValue="or" /> | ||
32 | + </h:selectOneRadio> | ||
33 | + </s:decorate> | ||
34 | + | ||
35 | + </rich:simpleTogglePanel> | ||
36 | + | ||
37 | + <div class="actionButtons"> | ||
38 | + <h:commandButton id="search" value="Search" action="/view/example/MovieList.xhtml" /> | ||
39 | + <s:button id="reset" value="Reset" includePageParams="false" /> | ||
40 | + </div> | ||
41 | + | ||
42 | + </h:form> | ||
43 | + | ||
44 | + <rich:panel> | ||
45 | + <f:facet name="header"> | ||
46 | + Movie Search Results (#{empty movieList.resultList ? 0 : (movieList.paginated ? movieList.resultCount : movieList.resultList.size)}) | ||
47 | + </f:facet> | ||
48 | + | ||
49 | + <div class="results" id="movieList"> | ||
50 | + <h:outputText | ||
51 | + value="The movie search returned no results." | ||
52 | + rendered="#{empty movieList.resultList}" /> <rich:dataTable | ||
53 | + id="movieList" var="_movie" value="#{movieList.resultList}" | ||
54 | + rendered="#{not empty movieList.resultList}"> | ||
55 | + | ||
56 | + <h:column> | ||
57 | + <f:facet name="header"> | ||
58 | + <ui:include src="/layout/sort.xhtml"> | ||
59 | + <ui:param name="entityList" value="#{movieList}" /> | ||
60 | + <ui:param name="propertyLabel" value="Id" /> | ||
61 | + <ui:param name="propertyPath" value="movie.id" /> | ||
62 | + </ui:include> | ||
63 | + </f:facet> | ||
64 | + <h:outputText value="#{_movie.id}" /> | ||
65 | + </h:column> | ||
66 | + | ||
67 | + <h:column> | ||
68 | + <f:facet name="header"> | ||
69 | + <ui:include src="/layout/sort.xhtml"> | ||
70 | + <ui:param name="entityList" value="#{movieList}" /> | ||
71 | + <ui:param name="propertyLabel" value="Director" /> | ||
72 | + <ui:param name="propertyPath" value="movie.director" /> | ||
73 | + </ui:include> | ||
74 | + </f:facet> | ||
75 | + <h:outputText value="#{_movie.director}" /> | ||
76 | + </h:column> | ||
77 | + | ||
78 | + <h:column> | ||
79 | + <f:facet name="header"> | ||
80 | + <ui:include src="/layout/sort.xhtml"> | ||
81 | + <ui:param name="entityList" value="#{movieList}" /> | ||
82 | + <ui:param name="propertyLabel" value="Title" /> | ||
83 | + <ui:param name="propertyPath" value="movie.title" /> | ||
84 | + </ui:include> | ||
85 | + </f:facet> | ||
86 | + <h:outputText value="#{_movie.title}" /> | ||
87 | + </h:column> | ||
88 | + | ||
89 | + <h:column> | ||
90 | + <f:facet name="header"> | ||
91 | + <ui:include src="/layout/sort.xhtml"> | ||
92 | + <ui:param name="entityList" value="#{movieList}" /> | ||
93 | + <ui:param name="propertyLabel" value="Year" /> | ||
94 | + <ui:param name="propertyPath" value="movie.year" /> | ||
95 | + </ui:include> | ||
96 | + </f:facet> | ||
97 | + <h:outputText value="#{_movie.year}" /> | ||
98 | + </h:column> | ||
99 | + | ||
100 | + <h:column> | ||
101 | + <f:facet name="header"> | ||
102 | + <ui:include src="/layout/sort.xhtml"> | ||
103 | + <ui:param name="entityList" value="#{movieList}" /> | ||
104 | + <ui:param name="propertyLabel" value="Plot" /> | ||
105 | + <ui:param name="propertyPath" value="movie.plot" /> | ||
106 | + </ui:include> | ||
107 | + </f:facet> | ||
108 | + <h:outputText value="#{_movie.plot}" /> | ||
109 | + </h:column> | ||
110 | + | ||
111 | + <rich:column styleClass="action"> | ||
112 | + <f:facet name="header">Action</f:facet> | ||
113 | + <s:link view="/view/example/#{empty from ? 'Movie' : from}.xhtml" | ||
114 | + value="#{empty from ? 'View' : 'Select'}" | ||
115 | + propagation="#{empty from ? 'none' : 'default'}" id="movieViewId"> | ||
116 | + <f:param name="movieId" value="#{_movie.id}" /> | ||
117 | + </s:link> | ||
118 | + #{' '} | ||
119 | + <s:link view="/view/example/MovieEdit.xhtml" value="Edit" | ||
120 | + propagation="none" id="movieEdit" rendered="#{empty from}"> | ||
121 | + <f:param name="movieId" value="#{_movie.id}" /> | ||
122 | + </s:link> | ||
123 | + </rich:column> | ||
124 | + </rich:dataTable></div> | ||
125 | + </rich:panel> | ||
126 | + | ||
127 | + <div class="tableControl"> | ||
128 | + <s:link view="/view/example/MovieList.xhtml" | ||
129 | + rendered="#{movieList.previousExists}" | ||
130 | + value="#{messages.left}#{messages.left} First Page" id="firstPage"> | ||
131 | + <f:param name="firstResult" value="0" /> | ||
132 | + </s:link> | ||
133 | + <s:link view="/view/example/MovieList.xhtml" | ||
134 | + rendered="#{movieList.previousExists}" | ||
135 | + value="#{messages.left} Previous Page" id="previousPage"> | ||
136 | + <f:param name="firstResult" value="#{movieList.previousFirstResult}" /> | ||
137 | + </s:link> | ||
138 | + <s:link view="/view/example/MovieList.xhtml" rendered="#{movieList.nextExists}" | ||
139 | + value="Next Page #{messages.right}" id="nextPage"> | ||
140 | + <f:param name="firstResult" value="#{movieList.nextFirstResult}" /> | ||
141 | + </s:link> | ||
142 | + <s:link view="/view/example/MovieList.xhtml" rendered="#{movieList.nextExists}" | ||
143 | + value="Last Page #{messages.right}#{messages.right}" id="lastPage"> | ||
144 | + <f:param name="firstResult" value="#{movieList.lastFirstResult}" /> | ||
145 | + </s:link> | ||
146 | + </div> | ||
147 | + | ||
148 | + <s:div styleClass="actionButtons" rendered="#{empty from}"> | ||
149 | + <s:button view="/view/example/MovieEdit.xhtml" id="create" propagation="none" | ||
150 | + value="Create movie"> | ||
151 | + <f:param name="movieId" /> | ||
152 | + </s:button> | ||
153 | + </s:div> | ||
154 | + | ||
155 | + </ui:define> | ||
156 | + | ||
157 | +</ui:composition> |
1 | +package no.knowit.seam.example.security.test; | ||
2 | + | ||
3 | +import no.knowit.seam.example.test.AbstractUnitilisedJSFUnitTestCase; | ||
4 | +import org.jboss.jsfunit.jsfsession.JSFClientSession; | ||
5 | +import org.jboss.jsfunit.jsfsession.JSFSession; | ||
6 | +import org.jboss.seam.Component; | ||
7 | +import org.unitils.dbunit.annotation.DataSet; | ||
8 | + | ||
9 | +import java.io.IOException; | ||
10 | + | ||
11 | +@DataSet | ||
12 | +public class AuthenticatorIT extends AbstractUnitilisedJSFUnitTestCase implements AuthenticatorITI { | ||
13 | + | ||
14 | + private static final String USERNAME_CLIENT_ID = "loginForm:username"; | ||
15 | + private static final String PASSWORD_CLIENT_ID = "loginForm:password"; | ||
16 | + private static final String SUBMIT_CLIENT_ID = "loginForm:submit"; | ||
17 | + | ||
18 | + public void testFineLogin() throws Throwable { | ||
19 | + run(new TestComponentRunnable() { | ||
20 | + @Override | ||
21 | + public void run() throws Throwable { | ||
22 | + getTestComponent().testFineLogin(); | ||
23 | + } | ||
24 | + }); | ||
25 | + } | ||
26 | + | ||
27 | + private AuthenticatorITI getTestComponent() { | ||
28 | + return (AuthenticatorITI) Component.getInstance(AuthenticatorITI.COMPONENT_NAME); | ||
29 | + } | ||
30 | + | ||
31 | + private void simulateLogin(JSFSession jsfSession, String email, String password) throws IOException { | ||
32 | + JSFClientSession client = jsfSession.getJSFClientSession(); | ||
33 | + client.setValue(USERNAME_CLIENT_ID, email); | ||
34 | + client.setValue(PASSWORD_CLIENT_ID, password); | ||
35 | + client.click(SUBMIT_CLIENT_ID); | ||
36 | + } | ||
37 | + | ||
38 | +} |
1 | +package no.knowit.seam.example.security.test; | ||
2 | + | ||
3 | +import junit.framework.Assert; | ||
4 | +import no.knowit.seam.example.test.JSFUnitUtils; | ||
5 | +import org.jboss.jsfunit.jsfsession.JSFClientSession; | ||
6 | +import org.jboss.jsfunit.jsfsession.JSFServerSession; | ||
7 | +import org.jboss.jsfunit.jsfsession.JSFSession; | ||
8 | +import org.jboss.seam.annotations.Name; | ||
9 | + | ||
10 | +import java.io.IOException; | ||
11 | + | ||
12 | +@Name(AuthenticatorITI.COMPONENT_NAME) | ||
13 | +public class AuthenticatorITC implements AuthenticatorITI { | ||
14 | + | ||
15 | + private static final String USERNAME_CLIENT_ID = "loginForm:username"; | ||
16 | + private static final String PASSWORD_CLIENT_ID = "loginForm:password"; | ||
17 | + private static final String SUBMIT_CLIENT_ID = "loginForm:submit"; | ||
18 | + | ||
19 | + public void testFineLogin() throws Exception { | ||
20 | + JSFSession jsfSession = new JSFSession("/"); | ||
21 | + | ||
22 | + JSFServerSession server = jsfSession.getJSFServerSession(); | ||
23 | + JSFClientSession client = jsfSession.getJSFClientSession(); | ||
24 | + | ||
25 | + Assert.assertTrue(!(Boolean) JSFUnitUtils.getELValue(jsfSession, "#{identity.loggedIn}")); | ||
26 | + | ||
27 | + /** Enter login page */ | ||
28 | + client.click("menuLoginId"); | ||
29 | + /** Fill the form */ | ||
30 | + simulateLogin(jsfSession, "s4237@pjwstk.edu.pl", "aaaaa"); | ||
31 | + | ||
32 | + JSFUnitUtils.logFacesMessages(jsfSession); | ||
33 | + /** Assert propper redirection */ | ||
34 | + Assert.assertEquals("/home.xhtml", server.getCurrentViewID()); | ||
35 | + /** Assert propper communicate is printed */ | ||
36 | + JSFUnitUtils.assertGlobalMessage(jsfSession, "Welcome, s4237@pjwstk.edu.pl!"); | ||
37 | + Assert.assertTrue((Boolean) JSFUnitUtils.getELValue(jsfSession, "#{identity.loggedIn}")); | ||
38 | + } | ||
39 | + | ||
40 | + private void simulateLogin(JSFSession jsfSession, String email, String password) throws IOException { | ||
41 | + JSFClientSession client = jsfSession.getJSFClientSession(); | ||
42 | + client.setValue(USERNAME_CLIENT_ID, email); | ||
43 | + client.setValue(PASSWORD_CLIENT_ID, password); | ||
44 | + client.click(SUBMIT_CLIENT_ID); | ||
45 | + } | ||
46 | + | ||
47 | +} |
1 | +package no.knowit.seam.example.test; | ||
2 | + | ||
3 | +import org.apache.cactus.ServletTestCase; | ||
4 | +import org.apache.commons.lang.StringUtils; | ||
5 | +import org.unitils.core.Unitils; | ||
6 | +import org.unitils.core.UnitilsException; | ||
7 | +import org.unitils.core.dbsupport.DefaultSQLHandler; | ||
8 | +import org.unitils.database.DatabaseModule; | ||
9 | +import org.unitils.dbmaintainer.DBMaintainer; | ||
10 | +import org.unitils.dbmaintainer.structure.DataSetStructureGenerator; | ||
11 | +import org.unitils.util.PropertyUtils; | ||
12 | + | ||
13 | +import javax.sql.DataSource; | ||
14 | +import java.lang.reflect.Method; | ||
15 | +import java.util.Properties; | ||
16 | + | ||
17 | +import static org.unitils.dbmaintainer.util.DatabaseModuleConfigUtils.getConfiguredDatabaseTaskInstance; | ||
18 | + | ||
19 | +public abstract class AbstractUnitilisedJSFUnitTestCase extends ServletTestCase { | ||
20 | + | ||
21 | + @Override | ||
22 | + protected void setUp() throws Exception { | ||
23 | + final Unitils unitils = Unitils.getInstance(); | ||
24 | + unitils.getTestListener().beforeTestSetUp(this, getCurrentTestMethod()); | ||
25 | + final Properties configuration = unitils.getConfiguration(); | ||
26 | + boolean generateDtd = PropertyUtils.getBoolean(DBMaintainer.PROPKEY_GENERATE_DATA_SET_STRUCTURE_ENABLED, configuration); | ||
27 | + if (generateDtd) { | ||
28 | + DataSource dataSource = unitils.getModulesRepository().getModuleOfType(DatabaseModule.class) | ||
29 | + .getDataSourceAndActivateTransactionIfNeeded(); | ||
30 | + getConfiguredDatabaseTaskInstance(DataSetStructureGenerator.class, | ||
31 | + configuration, new DefaultSQLHandler(dataSource)).generateDataSetStructure(); | ||
32 | + } | ||
33 | + } | ||
34 | + | ||
35 | + @Override | ||
36 | + protected void tearDown() throws Exception { | ||
37 | + Unitils.getInstance().getTestListener().afterTestTearDown(this, getCurrentTestMethod()); | ||
38 | + } | ||
39 | + | ||
40 | + /** | ||
41 | + * Gets the method that has the same name as the current test. | ||
42 | + * | ||
43 | + * @return the method, not null | ||
44 | + * @throws org.unitils.core.UnitilsException | ||
45 | + * if the method could not be found | ||
46 | + */ | ||
47 | + protected Method getCurrentTestMethod() { | ||
48 | + String testName = getName(); | ||
49 | + if (StringUtils.isEmpty(testName)) { | ||
50 | + throw new UnitilsException("Unable to find current test method. No test name provided (null) for test. Test class: " + getClass()); | ||
51 | + } | ||
52 | + | ||
53 | + try { | ||
54 | + return getClass().getMethod(getName()); | ||
55 | + | ||
56 | + } catch (NoSuchMethodException e) { | ||
57 | + throw new UnitilsException("Unable to find current test method. Test name: " + getName() + " , test class: " + getClass(), e); | ||
58 | + } | ||
59 | + } | ||
60 | + | ||
61 | + public static void run(TestComponentRunnable runnable) throws Throwable { | ||
62 | + try { | ||
63 | + runnable.run(); | ||
64 | + } catch (Throwable e) { | ||
65 | + while (e.getCause() != null) { | ||
66 | + e = e.getCause(); | ||
67 | + } | ||
68 | + throw e; | ||
69 | + } | ||
70 | + } | ||
71 | + | ||
72 | + public static interface TestComponentRunnable { | ||
73 | + void run() throws Throwable; | ||
74 | + } | ||
75 | +} |
1 | +package no.knowit.seam.example.test; | ||
2 | + | ||
3 | +import junit.framework.TestCase; | ||
4 | +import org.jboss.jsfunit.jsfsession.JSFServerSession; | ||
5 | +import org.jboss.jsfunit.jsfsession.JSFSession; | ||
6 | +import org.w3c.dom.Element; | ||
7 | +import org.w3c.dom.NodeList; | ||
8 | + | ||
9 | +import javax.faces.application.FacesMessage; | ||
10 | +import javax.faces.context.FacesContext; | ||
11 | +import javax.persistence.EntityManager; | ||
12 | +import java.util.Iterator; | ||
13 | + | ||
14 | +public class JSFUnitUtils { | ||
15 | + public static void logFacesMessages(JSFSession session) { | ||
16 | + JSFServerSession server = session.getJSFServerSession(); | ||
17 | + Iterator<FacesMessage> iterator = server.getFacesContext().getMessages(null); | ||
18 | + System.out.println("Global messages:"); | ||
19 | + while (iterator.hasNext()) { | ||
20 | + FacesMessage message = iterator.next(); | ||
21 | + System.out.println(message.getSeverity() + ":" + message.getSummary() + " | " + message.getDetail()); | ||
22 | + } | ||
23 | + Iterator<String> idsWithMessages = server.getFacesContext().getClientIdsWithMessages(); | ||
24 | + while (idsWithMessages.hasNext()) { | ||
25 | + String id = idsWithMessages.next(); | ||
26 | + if (id == null) { | ||
27 | + continue; | ||
28 | + } | ||
29 | + System.out.println("Messages for component " + id + ":"); | ||
30 | + iterator = server.getFacesMessages(id); | ||
31 | + while (iterator.hasNext()) { | ||
32 | + FacesMessage message = iterator.next(); | ||
33 | + System.out.println(id + ":" + message.getSeverity() + ":" + message.getSummary() + " | " + message.getDetail()); | ||
34 | + } | ||
35 | + } | ||
36 | + } | ||
37 | + | ||
38 | + public static void assertGlobalMessage(JSFSession session, String message) { | ||
39 | + Element messagesElement = session.getJSFClientSession().getElement("messages"); | ||
40 | + TestCase.assertNotNull(messagesElement); | ||
41 | + NodeList messagesItems = messagesElement.getElementsByTagName("li"); | ||
42 | + TestCase.assertEquals(1, messagesItems.getLength()); | ||
43 | + for (int i = 0; i < messagesItems.getLength(); i++) { | ||
44 | + TestCase.assertEquals(message, messagesItems.item(i).getTextContent().trim()); | ||
45 | + } | ||
46 | + } | ||
47 | + | ||
48 | + public static String messageForKey(JSFSession session, String key) { | ||
49 | + final Object value = getELValue(session, "#{messages['" + key + "']}"); | ||
50 | + return value == null ? null : value.toString(); | ||
51 | + } | ||
52 | + | ||
53 | + public static Object getELValue(JSFSession session, String expression) { | ||
54 | + final FacesContext facesContext = session.getJSFServerSession().getFacesContext(); | ||
55 | + return facesContext.getApplication().createValueBinding(expression).getValue(facesContext); | ||
56 | + } | ||
57 | + | ||
58 | + public static void assertMessageForControl(JSFSession session, String controlId, String messageKey, FacesMessage.Severity severity) { | ||
59 | + Iterator<FacesMessage> messageIterator = session.getJSFServerSession().getFacesMessages(controlId); | ||
60 | + TestCase.assertTrue(messageIterator.hasNext()); | ||
61 | + final FacesMessage message = messageIterator.next(); | ||
62 | + TestCase.assertEquals(severity, message.getSeverity()); | ||
63 | + TestCase.assertEquals(messageForKey(session, messageKey), message.getSummary()); | ||
64 | + } | ||
65 | + | ||
66 | + public static void assertMessageForControl(JSFSession session, String controlId, String messageKey) { | ||
67 | + assertMessageForControl(session, controlId, messageKey, FacesMessage.SEVERITY_ERROR); | ||
68 | + } | ||
69 | + | ||
70 | + public static EntityManager getEntityManager(JSFSession jsfSession) { | ||
71 | + return (EntityManager) JSFUnitUtils.getELValue(jsfSession, "#{entityManager}"); | ||
72 | + } | ||
73 | +} |
war/src/test/resources/cactus-report.xsl
0 → 100644
1 | +<?xml version="1.0"?><!-- | ||
2 | + Licensed to the Apache Software Foundation (ASF) under one or more | ||
3 | + contributor license agreements. See the NOTICE file distributed with | ||
4 | + this work for additional information regarding copyright ownership. | ||
5 | + The ASF licenses this file to You under the Apache License, Version 2.0 | ||
6 | + (the "License"); you may not use this file except in compliance with | ||
7 | + the License. You may obtain a copy of the License at | ||
8 | + | ||
9 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | + | ||
11 | + Unless required by applicable law or agreed to in writing, software | ||
12 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | + See the License for the specific language governing permissions and | ||
15 | + limitations under the License. | ||
16 | +--> | ||
17 | + | ||
18 | +<!-- | ||
19 | + | ||
20 | + Sample stylesheet to be used with the Cactus ServletTestRunner output. | ||
21 | + Based on the file junit-noframes.xsl from Apache Ant 1.5. | ||
22 | + | ||
23 | + @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/> | ||
24 | + @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/> | ||
25 | + @author Christopher Lenz <a href="mailto:cmlenz@apache.org"/> | ||
26 | + | ||
27 | +--> | ||
28 | +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | ||
29 | + <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | ||
30 | + <xsl:decimal-format decimal-separator="." grouping-separator=","/> | ||
31 | + <xsl:template match="testsuites"> | ||
32 | + <html> | ||
33 | + <head> | ||
34 | + <style type="text/css"> | ||
35 | + | ||
36 | + body { font:normal 68% verdana,arial,helvetica; color:#000000; } table tr td, table tr th { font-size: 68%; } table.details tr th{ | ||
37 | + font-weight: bold; text-align:left; background:#a6caf0; } table.details tr td{ background:#eeeee0; } | ||
38 | + | ||
39 | + p { line-height:1.5em; margin-top:0.5em; margin-bottom:1.0em; } h1 { margin: 0px 0px 5px; font: 165% verdana,arial,helvetica } h2 { | ||
40 | + margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica } h3 { margin-bottom: 0.5em; font: bold 115% | ||
41 | + verdana,arial,helvetica } h4 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } h5 { margin-bottom: 0.5em; font: bold 100% | ||
42 | + verdana,arial,helvetica } h6 { margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica } .Error { font-weight:bold; color:red; } | ||
43 | + .Failure { font-weight:bold; color:purple; } | ||
44 | + </style> | ||
45 | + </head> | ||
46 | + <body> | ||
47 | + <a name="top"></a> | ||
48 | + <xsl:call-template name="header"/> | ||
49 | + <xsl:call-template name="summary"/> | ||
50 | + <hr size="1" width="95%" align="left"/> | ||
51 | + <xsl:call-template name="classes"/> | ||
52 | + </body> | ||
53 | + | ||
54 | + </html> | ||
55 | + </xsl:template> | ||
56 | + | ||
57 | + <xsl:template name="header"> | ||
58 | + <h1>Unit Test Results</h1> | ||
59 | + <table width="100%"> | ||
60 | + <tr> | ||
61 | + <td align="left"></td> | ||
62 | + <td align="right"> | ||
63 | + | ||
64 | + Designed for use with | ||
65 | + <a href='http://jakarta.apache.org/cactus/'>Cactus</a>. | ||
66 | + </td> | ||
67 | + </tr> | ||
68 | + </table> | ||
69 | + <hr size="1"/> | ||
70 | + </xsl:template> | ||
71 | + | ||
72 | + <xsl:template name="summary"> | ||
73 | + <h2>Summary</h2> | ||
74 | + | ||
75 | + <xsl:variable name="testCount" select="sum(testsuite/@tests)"/> | ||
76 | + <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/> | ||
77 | + <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/> | ||
78 | + <xsl:variable name="timeCount" select="sum(testsuite/@time)"/> | ||
79 | + <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/> | ||
80 | + <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> | ||
81 | + <tr valign="top"> | ||
82 | + <th>Tests</th> | ||
83 | + | ||
84 | + <th>Failures</th> | ||
85 | + <th>Errors</th> | ||
86 | + <th>Success rate</th> | ||
87 | + <th>Time</th> | ||
88 | + </tr> | ||
89 | + <tr valign="top"> | ||
90 | + <xsl:attribute name="class"> | ||
91 | + | ||
92 | + <xsl:choose> | ||
93 | + <xsl:when test="$failureCount > 0">Failure</xsl:when> | ||
94 | + <xsl:when test="$errorCount > 0">Error</xsl:when> | ||
95 | + </xsl:choose> | ||
96 | + </xsl:attribute> | ||
97 | + <td> | ||
98 | + <xsl:value-of select="$testCount"/> | ||
99 | + </td> | ||
100 | + <td> | ||
101 | + <xsl:value-of select="$failureCount"/> | ||
102 | + </td> | ||
103 | + <td> | ||
104 | + <xsl:value-of select="$errorCount"/> | ||
105 | + </td> | ||
106 | + | ||
107 | + <td> | ||
108 | + <xsl:call-template name="display-percent"> | ||
109 | + <xsl:with-param name="value" select="$successRate"/> | ||
110 | + </xsl:call-template> | ||
111 | + </td> | ||
112 | + <td> | ||
113 | + <xsl:call-template name="display-time"> | ||
114 | + <xsl:with-param name="value" select="$timeCount"/> | ||
115 | + </xsl:call-template> | ||
116 | + | ||
117 | + </td> | ||
118 | + </tr> | ||
119 | + </table> | ||
120 | + <table border="0" width="95%"> | ||
121 | + <tr> | ||
122 | + <td style="text-align: justify;"> | ||
123 | + Note: | ||
124 | + <i>failures</i> | ||
125 | + are anticipated and checked for with assertions while | ||
126 | + <i>errors</i> | ||
127 | + are unanticipated. | ||
128 | + </td> | ||
129 | + | ||
130 | + </tr> | ||
131 | + </table> | ||
132 | + </xsl:template> | ||
133 | + | ||
134 | + <xsl:template name="classes"> | ||
135 | + <xsl:for-each select="testsuite"> | ||
136 | + <xsl:sort select="@name"/> | ||
137 | + <!-- create an anchor to this class name --> | ||
138 | + <a name="{@name}"></a> | ||
139 | + <h3>TestCase | ||
140 | + <xsl:value-of select="@name"/> | ||
141 | + </h3> | ||
142 | + | ||
143 | + | ||
144 | + <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> | ||
145 | + <xsl:call-template name="testcase.test.header"/> | ||
146 | + <!-- | ||
147 | + test can even not be started at all (failure to load the class) | ||
148 | + so report the error directly | ||
149 | + --> | ||
150 | + <xsl:if test="./error"> | ||
151 | + <tr class="Error"> | ||
152 | + <td colspan="4"> | ||
153 | + <xsl:apply-templates select="./error"/> | ||
154 | + </td> | ||
155 | + </tr> | ||
156 | + </xsl:if> | ||
157 | + <xsl:apply-templates select="./testcase" mode="print.test"/> | ||
158 | + | ||
159 | + </table> | ||
160 | + <p/> | ||
161 | + <a href="#top">Back to top</a> | ||
162 | + </xsl:for-each> | ||
163 | + </xsl:template> | ||
164 | + | ||
165 | + <xsl:template match="testsuite" mode="header"> | ||
166 | + <tr valign="top"> | ||
167 | + <th width="80%">Name</th> | ||
168 | + | ||
169 | + <th>Tests</th> | ||
170 | + <th>Errors</th> | ||
171 | + <th>Failures</th> | ||
172 | + <th nowrap="nowrap">Time(s)</th> | ||
173 | + </tr> | ||
174 | + </xsl:template> | ||
175 | + | ||
176 | + <!-- class header --> | ||
177 | + | ||
178 | + <xsl:template name="testsuite.test.header"> | ||
179 | + <tr valign="top"> | ||
180 | + <th width="80%">Name</th> | ||
181 | + <th>Tests</th> | ||
182 | + <th>Errors</th> | ||
183 | + <th>Failures</th> | ||
184 | + <th nowrap="nowrap">Time(s)</th> | ||
185 | + | ||
186 | + </tr> | ||
187 | + </xsl:template> | ||
188 | + | ||
189 | + <!-- method header --> | ||
190 | + <xsl:template name="testcase.test.header"> | ||
191 | + <tr valign="top"> | ||
192 | + <th>Name</th> | ||
193 | + <th>Status</th> | ||
194 | + | ||
195 | + <th width="80%">Type</th> | ||
196 | + <th nowrap="nowrap">Time(s)</th> | ||
197 | + </tr> | ||
198 | + </xsl:template> | ||
199 | + | ||
200 | + <!-- class information --> | ||
201 | + <xsl:template match="testsuite" mode="print.test"> | ||
202 | + <tr valign="top"> | ||
203 | + <!-- set a nice color depending if there is an error/failure --> | ||
204 | + | ||
205 | + <xsl:attribute name="class"> | ||
206 | + <xsl:choose> | ||
207 | + <xsl:when test="@failures[.> 0]">Failure</xsl:when> | ||
208 | + <xsl:when test="@errors[.> 0]">Error</xsl:when> | ||
209 | + </xsl:choose> | ||
210 | + </xsl:attribute> | ||
211 | + <!-- print testsuite information --> | ||
212 | + <td> | ||
213 | + <a href="#{@name}"> | ||
214 | + <xsl:value-of select="@name"/> | ||
215 | + </a> | ||
216 | + </td> | ||
217 | + | ||
218 | + <td> | ||
219 | + <xsl:value-of select="@tests"/> | ||
220 | + </td> | ||
221 | + <td> | ||
222 | + <xsl:value-of select="@errors"/> | ||
223 | + </td> | ||
224 | + <td> | ||
225 | + <xsl:value-of select="@failures"/> | ||
226 | + </td> | ||
227 | + <td> | ||
228 | + <xsl:call-template name="display-time"> | ||
229 | + <xsl:with-param name="value" select="@time"/> | ||
230 | + </xsl:call-template> | ||
231 | + </td> | ||
232 | + </tr> | ||
233 | + | ||
234 | + </xsl:template> | ||
235 | + | ||
236 | + <xsl:template match="testcase" mode="print.test"> | ||
237 | + <tr valign="top"> | ||
238 | + <xsl:attribute name="class"> | ||
239 | + <xsl:choose> | ||
240 | + <xsl:when test="failure | error">Error</xsl:when> | ||
241 | + </xsl:choose> | ||
242 | + </xsl:attribute> | ||
243 | + | ||
244 | + <td> | ||
245 | + <xsl:value-of select="@name"/> | ||
246 | + </td> | ||
247 | + <xsl:choose> | ||
248 | + <xsl:when test="failure"> | ||
249 | + <td>Failure</td> | ||
250 | + <td> | ||
251 | + <xsl:apply-templates select="failure"/> | ||
252 | + </td> | ||
253 | + </xsl:when> | ||
254 | + <xsl:when test="error"> | ||
255 | + <td>Error</td> | ||
256 | + | ||
257 | + <td> | ||
258 | + <xsl:apply-templates select="error"/> | ||
259 | + </td> | ||
260 | + </xsl:when> | ||
261 | + <xsl:otherwise> | ||
262 | + <td>Success</td> | ||
263 | + <td></td> | ||
264 | + </xsl:otherwise> | ||
265 | + </xsl:choose> | ||
266 | + <td> | ||
267 | + | ||
268 | + <xsl:call-template name="display-time"> | ||
269 | + <xsl:with-param name="value" select="@time"/> | ||
270 | + </xsl:call-template> | ||
271 | + </td> | ||
272 | + </tr> | ||
273 | + </xsl:template> | ||
274 | + | ||
275 | + <xsl:template match="failure"> | ||
276 | + <xsl:call-template name="display-failures"/> | ||
277 | + </xsl:template> | ||
278 | + | ||
279 | + | ||
280 | + <xsl:template match="error"> | ||
281 | + <xsl:call-template name="display-failures"/> | ||
282 | + </xsl:template> | ||
283 | + | ||
284 | + <!-- Style for the error and failure in the tescase template --> | ||
285 | + <xsl:template name="display-failures"> | ||
286 | + <xsl:choose> | ||
287 | + <xsl:when test="not(@message)">N/A</xsl:when> | ||
288 | + <xsl:otherwise> | ||
289 | + | ||
290 | + <xsl:value-of select="@message"/> | ||
291 | + </xsl:otherwise> | ||
292 | + </xsl:choose> | ||
293 | + <!-- display the stacktrace --> | ||
294 | + <code> | ||
295 | + <p/> | ||
296 | + <xsl:call-template name="br-replace"> | ||
297 | + <xsl:with-param name="word" select="."/> | ||
298 | + </xsl:call-template> | ||
299 | + | ||
300 | + </code> | ||
301 | + </xsl:template> | ||
302 | + | ||
303 | + <!-- | ||
304 | + template that will convert a carriage return into a br tag | ||
305 | + @param word the text from which to convert CR to BR tag | ||
306 | + --> | ||
307 | + <xsl:template name="br-replace"> | ||
308 | + <xsl:param name="word"/> | ||
309 | + <xsl:choose> | ||
310 | + <xsl:when test="contains($word,'
')"> | ||
311 | + <xsl:value-of select="substring-before($word,'
')"/> | ||
312 | + <br/> | ||
313 | + | ||
314 | + <xsl:call-template name="br-replace"> | ||
315 | + <xsl:with-param name="word" select="substring-after($word,'
')"/> | ||
316 | + </xsl:call-template> | ||
317 | + </xsl:when> | ||
318 | + <xsl:otherwise> | ||
319 | + <xsl:value-of select="$word"/> | ||
320 | + </xsl:otherwise> | ||
321 | + </xsl:choose> | ||
322 | + </xsl:template> | ||
323 | + | ||
324 | + | ||
325 | + <xsl:template name="display-time"> | ||
326 | + <xsl:param name="value"/> | ||
327 | + <xsl:value-of select="format-number($value,'0.000')"/> | ||
328 | + </xsl:template> | ||
329 | + | ||
330 | + <xsl:template name="display-percent"> | ||
331 | + <xsl:param name="value"/> | ||
332 | + <xsl:value-of select="format-number($value,'0.00%')"/> | ||
333 | + </xsl:template> | ||
334 | + | ||
335 | + | ||
336 | +</xsl:stylesheet> | ||
337 | + |
1 | +<?xml version='1.0' encoding='UTF-8'?> | ||
2 | +<dataset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../src/test/dbschemaxsd/dataset.xsd"> | ||
3 | + <USERS ID="1" USERNAME="s4237@pjwstk.edu.pl" PASSWORD_DIGEST="WU+AOzgKQTlu1j3KOVA1Qg==" REGISTRATION_DATE="2010-10-01" ACTIVE="true"/> | ||
4 | +</dataset> |
war/src/test/resources/unitils.properties
0 → 100644
1 | +database.driverClassName=${ds.driver.class} | ||
2 | +database.url=${ds.connection.url} | ||
3 | +database.userName=${ds.user.name} | ||
4 | +database.password=${ds.password} | ||
5 | +database.schemaNames=${ds.schema} | ||
6 | +database.dialect=${unitils.dialect} | ||
7 | +DatabaseModule.Transactional.value.default=disabled | ||
8 | +# If set to true, the DBMaintainer will be used to update the unit test database schema. This is done once for each | ||
9 | +# test run, when creating the DataSource that provides access to the unit test database. | ||
10 | +updateDataBaseSchema.enabled=true | ||
11 | +# Comma separated list of directories and files in which the database update scripts are located. Directories in this | ||
12 | +# list are recursively searched for files. | ||
13 | +dbMaintainer.script.locations=${unitils.dbscripts.output} | ||
14 | +dbMaintainer.generateDataSetStructure.enabled=${unitils.generateDataSetStructure} | ||
15 | +# DbUnit database XSD directory | ||
16 | +dataSetStructureGenerator.xsd.dirName=${unitils.dbschema} | ||
17 | +# Set this property to true if the dbmaintain_scripts table should be created automatically if not found. | ||
18 | +# If false, an exception is thrown when the table is not found, indicating how to create it manually. | ||
19 | +# This property is false by default to be sure that a database is cleared by accident. If an executed | ||
20 | +# scripts table is available, we assume it to be a database managed by dbmaintain. | ||
21 | +dbMaintainer.autoCreateExecutedScriptsTable=true | ||
22 | +# If set to true, an implementation of org.unitils.dbmaintainer.sequences.SequenceUpdater will be used to update the | ||
23 | +# sequences to a suffiently high value, so that test data can be inserted without problems. | ||
24 | +# The SequenceUpdater is configured using the properties specified below. The property with key 'database.dialect' | ||
25 | +# specifies which implementation is used. | ||
26 | +dbMaintainer.updateSequences.enabled=true | ||
27 | +# Lowest acceptable value of a sequence in a unit test database. The SequenceUpdater will make sure all sequences | ||
28 | +# have this value or higher before proceeding | ||
29 | +sequenceUpdater.sequencevalue.lowestacceptable=1000 | ||
30 | + |
war/src/test/resources/web.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<web-app xmlns="http://java.sun.com/xml/ns/javaee" | ||
3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
4 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | ||
5 | + version="2.5"> | ||
6 | + | ||
7 | + <!-- For cluster, add distributable as the first child element, seam_reference-35.1.2 --> | ||
8 | + <!-- <distributable /> --> | ||
9 | + | ||
10 | + <display-name>${app.display.name}</display-name> | ||
11 | + | ||
12 | + <error-page> | ||
13 | + <error-code>404</error-code> | ||
14 | + <location>/404.xhtml</location> | ||
15 | + </error-page> | ||
16 | + | ||
17 | + <!-- RichFaces --> | ||
18 | + <context-param> | ||
19 | + <param-name>org.richfaces.SKIN</param-name> | ||
20 | + <param-value>glassX</param-value> | ||
21 | + </context-param> | ||
22 | + | ||
23 | + <!-- Suppress spurious stylesheets --> | ||
24 | + <context-param> | ||
25 | + <param-name>org.richfaces.CONTROL_SKINNING</param-name> | ||
26 | + <param-value>disable</param-value> | ||
27 | + </context-param> | ||
28 | + | ||
29 | + <context-param> | ||
30 | + <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> | ||
31 | + <param-value>disable</param-value> | ||
32 | + </context-param> | ||
33 | + | ||
34 | + <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs --> | ||
35 | + <context-param> | ||
36 | + <param-name>org.richfaces.LoadStyleStrategy</param-name> | ||
37 | + <param-value>DEFAULT</param-value> | ||
38 | + </context-param> | ||
39 | + | ||
40 | + <context-param> | ||
41 | + <param-name>org.richfaces.LoadScriptStrategy</param-name> | ||
42 | + <param-value>DEFAULT</param-value> | ||
43 | + </context-param> | ||
44 | + | ||
45 | + <!-- Seam --> | ||
46 | + <listener> | ||
47 | + <listener-class>org.jboss.seam.servlet.SeamListener</listener-class> | ||
48 | + </listener> | ||
49 | + | ||
50 | + <filter> | ||
51 | + <filter-name>Seam Filter</filter-name> | ||
52 | + <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> | ||
53 | + </filter> | ||
54 | + | ||
55 | + <filter-mapping> | ||
56 | + <filter-name>Seam Filter</filter-name> | ||
57 | + <url-pattern>/*</url-pattern> | ||
58 | + </filter-mapping> | ||
59 | + | ||
60 | + <servlet> | ||
61 | + <servlet-name>Seam Resource Servlet</servlet-name> | ||
62 | + <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class> | ||
63 | + </servlet> | ||
64 | + | ||
65 | + <servlet-mapping> | ||
66 | + <servlet-name>Seam Resource Servlet</servlet-name> | ||
67 | + <url-pattern>/seam/resource/*</url-pattern> | ||
68 | + </servlet-mapping> | ||
69 | + | ||
70 | + <!-- Facelets --> | ||
71 | + | ||
72 | + <!-- Facelets development mode (disable in production) --> | ||
73 | + <context-param> | ||
74 | + <param-name>facelets.DEVELOPMENT</param-name> | ||
75 | + <param-value>${app.debug}</param-value> | ||
76 | + </context-param> | ||
77 | + | ||
78 | + <context-param> | ||
79 | + <description> | ||
80 | + Strip html comments from the page before it is rendred - meaning that you will | ||
81 | + no longer be bugged down by EL evaluating expressions inside a comment tag | ||
82 | + </description> | ||
83 | + <param-name>facelets.SKIP_COMMENTS</param-name> | ||
84 | + <param-value>true</param-value> | ||
85 | + </context-param> | ||
86 | + | ||
87 | + <!-- SiA source code, ch11 --> | ||
88 | + <!-- | ||
89 | + <context-param> | ||
90 | + <description> | ||
91 | + If the view cannot be found in the session on a JSF postback, rebuild | ||
92 | + the view again before executing the Restore View phase. This step | ||
93 | + prevents "stale" public form pages. Enable this feature if you need it. | ||
94 | + </description> | ||
95 | + <param-name>facelets.BUILD_BEFORE_RESTORE</param-name> | ||
96 | + <param-value>false</param-value> | ||
97 | + </context-param> | ||
98 | + --> | ||
99 | + | ||
100 | + <!-- JSF --> | ||
101 | + <context-param> | ||
102 | + <param-name>javax.faces.DEFAULT_SUFFIX</param-name> | ||
103 | + <param-value>.xhtml</param-value> | ||
104 | + </context-param> | ||
105 | + | ||
106 | + <servlet> | ||
107 | + <servlet-name>Faces Servlet</servlet-name> | ||
108 | + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> | ||
109 | + <load-on-startup>1</load-on-startup> | ||
110 | + </servlet> | ||
111 | + | ||
112 | + <servlet-mapping> | ||
113 | + <servlet-name>Faces Servlet</servlet-name> | ||
114 | + <url-pattern>*.seam</url-pattern> | ||
115 | + </servlet-mapping> | ||
116 | + | ||
117 | + <!-- Not shure if this is needed | ||
118 | + <context-param> | ||
119 | + <description> | ||
120 | + JSF 1.2 detects the ViewHandler/StateManager version from the | ||
121 | + faces-config.xml DTD/XML schema name. The faces-config.xml files in | ||
122 | + the RichFaces JARs use the JSF 1.1 DTDs, causing JSF to use 1.1 | ||
123 | + behavior. Setting this flag to false ignores the version of the DTD | ||
124 | + used in these files, thus ensuring that JSF uses 1.2 behavior. | ||
125 | + | ||
126 | + One of the critical improvements in JSF 1.2 is that it throws a | ||
127 | + ViewExpiredException on a session timeout. | ||
128 | + | ||
129 | + See http://jira.jboss.com/jira/browse/RF-2294 and | ||
130 | + http://lists.jboss.org/pipermail/seam-dev/2008-February/000024.html. | ||
131 | + </description> | ||
132 | + <param-name>com.sun.faces.disableVersionTracking</param-name> | ||
133 | + <param-value>true</param-value> | ||
134 | + </context-param> | ||
135 | + --> | ||
136 | + | ||
137 | + <!-- URL Rewrite Filter - declare after seam filter --> | ||
138 | + <!-- | ||
139 | + There are two rewrite options in Seam, you can choose to either use the org.tuckey | ||
140 | + UrlRewriteFilter or the native Seam rewriting. You should not attempt to use both. | ||
141 | + The native Seam rewriting does not use the org.tuckey rewrite engine at all. | ||
142 | + If you are going to use Seam's native rewriting, then remove the org.tuckey | ||
143 | + UrlRewriteFilter from web.xml and nuke the urlrewrite.xml file. | ||
144 | + With Seam 2.1 or newer it is recommend to use Seam's native rewrite engine. | ||
145 | + --> | ||
146 | + <!-- | ||
147 | + <filter> | ||
148 | + <filter-name>UrlRewriteFilter</filter-name> | ||
149 | + <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> | ||
150 | + </filter> | ||
151 | + | ||
152 | + <filter-mapping> | ||
153 | + <filter-name>UrlRewriteFilter</filter-name> | ||
154 | + <url-pattern>/*</url-pattern> | ||
155 | + </filter-mapping> | ||
156 | + --> | ||
157 | + | ||
158 | + <session-config> | ||
159 | + <session-timeout>10</session-timeout> | ||
160 | + </session-config> | ||
161 | + | ||
162 | + <!-- --> | ||
163 | + <security-constraint> | ||
164 | + <display-name>Restrict raw XHTML Documents</display-name> | ||
165 | + <web-resource-collection> | ||
166 | + <web-resource-name>XHTML</web-resource-name> | ||
167 | + <url-pattern>*.xhtml</url-pattern> | ||
168 | + </web-resource-collection> | ||
169 | + <auth-constraint/> | ||
170 | + </security-constraint> | ||
171 | + | ||
172 | + | ||
173 | + <!--JSFUnit--> | ||
174 | + <filter> | ||
175 | + <filter-name>JSFUnitFilter</filter-name> | ||
176 | + <filter-class>org.jboss.jsfunit.framework.JSFUnitFilter</filter-class> | ||
177 | + </filter> | ||
178 | + | ||
179 | + <filter-mapping> | ||
180 | + <filter-name>JSFUnitFilter</filter-name> | ||
181 | + <servlet-name>ServletTestRunner</servlet-name> | ||
182 | + </filter-mapping> | ||
183 | + | ||
184 | + <filter-mapping> | ||
185 | + <filter-name>JSFUnitFilter</filter-name> | ||
186 | + <servlet-name>ServletRedirector</servlet-name> | ||
187 | + </filter-mapping> | ||
188 | + | ||
189 | + <servlet> | ||
190 | + <servlet-name>ServletRedirector</servlet-name> | ||
191 | + <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class> | ||
192 | + </servlet> | ||
193 | + | ||
194 | + <servlet> | ||
195 | + <servlet-name>ServletTestRunner</servlet-name> | ||
196 | + <servlet-class>org.apache.cactus.server.runner.ServletTestRunner</servlet-class> | ||
197 | + </servlet> | ||
198 | + | ||
199 | + <servlet-mapping> | ||
200 | + <servlet-name>ServletRedirector</servlet-name> | ||
201 | + <url-pattern>/ServletRedirector</url-pattern> | ||
202 | + </servlet-mapping> | ||
203 | + | ||
204 | + <servlet-mapping> | ||
205 | + <servlet-name>ServletTestRunner</servlet-name> | ||
206 | + <url-pattern>/ServletTestRunner</url-pattern> | ||
207 | + </servlet-mapping> | ||
208 | + | ||
209 | +</web-app> |
Please
register
or
login
to post a comment