Seam SVN: r9022 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-09-18 17:26:10 -0400 (Thu, 18 Sep 2008)
New Revision: 9022
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Security.xml
Log:
fix RunAsOperation example
Modified: trunk/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-09-18 18:43:25 UTC (rev 9021)
+++ trunk/doc/Seam_Reference_Guide/en-US/Security.xml 2008-09-18 21:26:10 UTC (rev 9022)
@@ -4918,21 +4918,17 @@
<para>
The following code example demonstrates how <literal>RunAsOperation</literal> is used, by
- overriding its <literal>getRoles()</literal> method to specify a set of roles to masquerade
+ calling its <literal>addRole()</literal> method to provide a set of roles to masquerade
as for the duration of the operation. The <literal>execute()</literal> method contains the
code that will be executed with the elevated privileges.
</para>
- <programlisting role="JAVA"><![CDATA[ new RunAsOperation() {
- @Override
- public String[] getRoles() {
- return new String[] { "admin" };
- }
-
+ <programlisting role="JAVA"><![CDATA[ new RunAsOperation() {
public void execute() {
executePrivilegedOperation();
}
- }.run();]]></programlisting>
+ }.addRole("admin")
+ .run();]]></programlisting>
<para>
In a similar way, the <literal>getPrincipal()</literal> or <literal>getSubject()</literal>
16 years, 2 months
Seam SVN: r9021 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-18 14:43:25 -0400 (Thu, 18 Sep 2008)
New Revision: 9021
Modified:
trunk/src/main/org/jboss/seam/pages-2.1.xsd
Log:
Initial work on JBSEAM-3414, thanks to Arron Ferguson
Modified: trunk/src/main/org/jboss/seam/pages-2.1.xsd
===================================================================
--- trunk/src/main/org/jboss/seam/pages-2.1.xsd 2008-09-18 18:35:49 UTC (rev 9020)
+++ trunk/src/main/org/jboss/seam/pages-2.1.xsd 2008-09-18 18:43:25 UTC (rev 9021)
@@ -3,6 +3,10 @@
elementFormDefault="qualified"
targetNamespace="http://jboss.com/products/seam/pages"
xmlns:pages="http://jboss.com/products/seam/pages">
+
+ <xs:annotation>
+ <xs:documentation>About this format ...</xs:documentation>
+ </xs:annotation>
<xs:element name="pages">
<xs:annotation>
@@ -16,13 +20,22 @@
</xs:choice>
<xs:attributeGroup ref="pages:attlist.pages"/>
</xs:complexType>
+ <xs:key name="conversation-key">
+ <xs:annotation>
+ <xs:documentation><p>You can read this as:</p>
+ <p>The pages element has a bunch of conversation elements, and for each of those conversation elements, they must have a unique name within this document.</p>
+ </xs:documentation>
+ </xs:annotation>
+ <xs:selector xpath="conversation"/>
+ <xs:field xpath="name"/>
+ </xs:key>
</xs:element>
<xs:attributeGroup name="attlist.pages">
<xs:attribute name="no-conversation-view-id" type="pages:view-id" />
<xs:attribute name="login-view-id" type="pages:view-id"/>
- <xs:attribute name="http-port" />
- <xs:attribute name="https-port" />
+ <xs:attribute name="http-port" type="xs:unsignedLong"/>
+ <xs:attribute name="https-port" type="xs:unsignedLong"/>
</xs:attributeGroup>
<xs:element name="exception">
@@ -41,9 +54,9 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.exception">
- <xs:attribute name="class"/>
- <xs:attribute name="log"/>
- <xs:attribute name="logLevel"/>
+ <xs:attribute name="class" type="xs:token"/>
+ <xs:attribute name="log" type="pages:tf-boolean"/>
+ <xs:attribute name="logLevel" type="pages:loglevel-values"/>
</xs:attributeGroup>
<xs:element name="conversation">
@@ -55,16 +68,16 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.conversation">
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="parameter-name" use="required"/>
- <xs:attribute name="parameter-value"/>
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="parameter-name" use="required" type="xs:token" />
+ <xs:attribute name="parameter-value" type="xs:token" />
</xs:attributeGroup>
<xs:element name="page">
<xs:annotation>
<xs:documentation>Configuration for a specific page or set up pages</xs:documentation>
</xs:annotation>
- <xs:complexType mixed="true">
+ <xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="pages:restrict"/>
<xs:element ref="pages:description"/>
@@ -87,36 +100,15 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.page">
- <xs:attribute name="action"/>
+ <xs:attribute name="action" type="xs:token" />
<xs:attribute name="view-id" type="pages:view-id"/>
- <xs:attribute name="switch" default="enabled">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="enabled"/>
- <xs:enumeration value="disabled"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="switch" default="enabled" type="pages:ableness"/>
<xs:attribute name="no-conversation-view-id" type="pages:view-id" />
- <xs:attribute name="conversation-required" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="login-required" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="scheme"/>
- <xs:attribute name="timeout"/>
- <xs:attribute name="concurrent-request-timeout">
+ <xs:attribute name="conversation-required" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="login-required" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="scheme" type="pages:schemes" />
+ <xs:attribute name="timeout" type="xs:unsignedLong" />
+ <xs:attribute name="concurrent-request-timeout" type="xs:unsignedLong" >
<xs:annotation>
<xs:documentation>
Requests to conversations are serialized by default, and if
@@ -126,9 +118,9 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="bundle"/>
- <xs:attribute name="conversation"/>
- <xs:attribute name="expires" />
+ <xs:attribute name="bundle" type="xs:token" />
+ <xs:attribute name="conversation" type="xs:token" />
+ <xs:attribute name="expires" type="xs:unsignedLong" />
</xs:attributeGroup>
<xs:element name="param">
@@ -141,40 +133,40 @@
</xs:element>
<xs:attributeGroup name="attlist.param">
- <xs:attribute name="name"/>
- <xs:attribute name="value"/>
- <xs:attribute name="converter"/>
- <xs:attribute name="converterId"/>
- <xs:attribute name="validator"/>
- <xs:attribute name="validatorId"/>
- <xs:attribute name="required" type="xs:boolean"/>
+ <xs:attribute name="name" type="xs:token" />
+ <xs:attribute name="value" type="xs:token" />
+ <xs:attribute name="converter" type="xs:token" />
+ <xs:attribute name="converterId" type="xs:token" />
+ <xs:attribute name="validator" type="xs:token" />
+ <xs:attribute name="validatorId" type="xs:token" />
+ <xs:attribute name="required" type="pages:tf-boolean"/>
</xs:attributeGroup>
<xs:element name="header">
<xs:annotation>
<xs:documentation>HTTP headers to be added</xs:documentation>
</xs:annotation>
- <xs:complexType mixed="true">
+ <xs:complexType>
<xs:attributeGroup ref="pages:attlist.header"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.header">
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="value" />
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="value" type="xs:token" />
</xs:attributeGroup>
<xs:element name="rewrite">
<xs:annotation>
<xs:documentation>URL rewriting pattern for this view</xs:documentation>
</xs:annotation>
- <xs:complexType mixed="true">
+ <xs:complexType>
<xs:attributeGroup ref="pages:attlist.rewrite"/>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.rewrite">
- <xs:attribute name="pattern" use="required"/>
+ <xs:attribute name="pattern" use="required" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="action">
@@ -186,8 +178,8 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.action">
- <xs:attribute name="if"/>
- <xs:attribute name="execute" use="required"/>
+ <xs:attribute name="if" type="xs:normalizedString" />
+ <xs:attribute name="execute" use="required" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="restrict" type="xs:string">
@@ -225,8 +217,8 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.navigation">
- <xs:attribute name="from-action"/>
- <xs:attribute name="evaluate"/>
+ <xs:attribute name="from-action" type="xs:normalizedString" />
+ <xs:attribute name="evaluate" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="rule">
@@ -252,8 +244,8 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.rule">
- <xs:attribute name="if-outcome"/>
- <xs:attribute name="if"/>
+ <xs:attribute name="if-outcome" type="xs:normalizedString" />
+ <xs:attribute name="if" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="raise-event">
@@ -265,7 +257,7 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.raise-event">
- <xs:attribute name="type" use="required"/>
+ <xs:attribute name="type" use="required" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="begin-conversation">
@@ -277,36 +269,12 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.begin-conversation">
- <xs:attribute name="join" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="nested" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="pageflow"/>
- <xs:attribute name="flush-mode">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="manual"/>
- <xs:enumeration value="auto"/>
- <xs:enumeration value="commit"/>
- <xs:enumeration value="MANUAL"/>
- <xs:enumeration value="AUTO"/>
- <xs:enumeration value="COMMIT"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="if"/>
+ <xs:attribute name="join" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="nested" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="pageflow" type="xs:normalizedString" />
+ <xs:attribute name="flush-mode" type="pages:flush-modes" />
+ <xs:attribute name="if" type="xs:normalizedString" />
+ <xs:attribute name="conversation" type="xs:token" />
</xs:attributeGroup>
<xs:element name="end-conversation">
@@ -318,23 +286,8 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.end-conversation">
- <xs:attribute name="before-redirect" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="root" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="if"/>
+ <xs:attribute name="before-redirect" default="false" type="pages:tf-boolean"/>
+ <xs:attribute name="if" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="begin-task">
@@ -346,20 +299,9 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.begin-task">
- <xs:attribute name="task-id"/>
- <xs:attribute name="pageflow"/>
- <xs:attribute name="flush-mode">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="manual"/>
- <xs:enumeration value="auto"/>
- <xs:enumeration value="commit"/>
- <xs:enumeration value="MANUAL"/>
- <xs:enumeration value="AUTO"/>
- <xs:enumeration value="COMMIT"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="task-id" type="xs:token" />
+ <xs:attribute name="pageflow" type="xs:normalizedString" />
+ <xs:attribute name="flush-mode" type="pages:flush-modes" />
</xs:attributeGroup>
<xs:element name="start-task">
@@ -371,20 +313,9 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.start-task">
- <xs:attribute name="task-id"/>
- <xs:attribute name="pageflow"/>
- <xs:attribute name="flush-mode">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="manual"/>
- <xs:enumeration value="auto"/>
- <xs:enumeration value="commit"/>
- <xs:enumeration value="MANUAL"/>
- <xs:enumeration value="AUTO"/>
- <xs:enumeration value="COMMIT"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="task-id" type="xs:token" />
+ <xs:attribute name="pageflow" type="xs:normalizedString" />
+ <xs:attribute name="flush-mode" type="pages:flush-modes" />
</xs:attributeGroup>
<xs:element name="end-task">
@@ -396,15 +327,8 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.end-task">
- <xs:attribute name="transition"/>
- <xs:attribute name="before-redirect" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="transition" type="xs:token" />
+ <xs:attribute name="before-redirect" default="false" type="pages:tf-boolean" />
</xs:attributeGroup>
<xs:element name="create-process">
@@ -416,7 +340,7 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.create-process">
- <xs:attribute name="definition"/>
+ <xs:attribute name="definition" type="xs:token" />
</xs:attributeGroup>
<xs:element name="resume-process">
@@ -428,7 +352,7 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.resume-process">
- <xs:attribute name="process-id"/>
+ <xs:attribute name="process-id" type="xs:token" />
</xs:attributeGroup>
<xs:element name="in">
@@ -440,28 +364,9 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.in">
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="scope">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="stateless"/>
- <xs:enumeration value="event"/>
- <xs:enumeration value="page"/>
- <xs:enumeration value="conversation"/>
- <xs:enumeration value="session"/>
- <xs:enumeration value="business_process"/>
- <xs:enumeration value="application"/>
- <xs:enumeration value="STATELESS"/>
- <xs:enumeration value="EVENT"/>
- <xs:enumeration value="PAGE"/>
- <xs:enumeration value="CONVERSATION"/>
- <xs:enumeration value="SESSION"/>
- <xs:enumeration value="BUSINESS_PROCESS"/>
- <xs:enumeration value="APPLICATION"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="value" use="required"/>
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="scope" type="pages:allowed-scopes" />
+ <xs:attribute name="value" use="required" type="xs:normalizedString" />
</xs:attributeGroup>
<xs:element name="out">
@@ -473,28 +378,9 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.out">
- <xs:attribute name="name" use="required"/>
- <xs:attribute name="scope" default="CONVERSATION">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="stateless"/>
- <xs:enumeration value="event"/>
- <xs:enumeration value="page"/>
- <xs:enumeration value="conversation"/>
- <xs:enumeration value="session"/>
- <xs:enumeration value="business_process"/>
- <xs:enumeration value="application"/>
- <xs:enumeration value="STATELESS"/>
- <xs:enumeration value="EVENT"/>
- <xs:enumeration value="PAGE"/>
- <xs:enumeration value="CONVERSATION"/>
- <xs:enumeration value="SESSION"/>
- <xs:enumeration value="BUSINESS_PROCESS"/>
- <xs:enumeration value="APPLICATION"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="value" use="required"/>
+ <xs:attribute name="name" use="required" type="xs:token" />
+ <xs:attribute name="scope" default="CONVERSATION" type="pages:allowed-scopes" />
+ <xs:attribute name="value" use="required" type="xs:token" />
</xs:attributeGroup>
<xs:element name="render">
@@ -527,7 +413,7 @@
</xs:element>
<xs:attributeGroup name="attlist.redirect">
<xs:attribute name="view-id" type="pages:view-id" />
- <xs:attribute name="url"/>
+ <xs:attribute name="url" type="pages:url" />
</xs:attributeGroup>
<xs:element name="http-error">
@@ -542,44 +428,168 @@
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.http-error">
- <xs:attribute name="error-code" use="required"/>
+ <xs:attribute name="error-code" use="required" type="xs:unsignedLong" />
</xs:attributeGroup>
<xs:element name="message">
<xs:annotation>
<xs:documentation>Add a message to the faces messages</xs:documentation>
</xs:annotation>
- <xs:complexType mixed="true">
- <xs:attributeGroup ref="pages:attlist.message"/>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="pages:attlist.message"/>
+ </xs:extension>
+ </xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.message">
- <xs:attribute name="for"/>
- <xs:attribute name="severity" default="INFO">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="info"/>
- <xs:enumeration value="warn"/>
- <xs:enumeration value="error"/>
- <xs:enumeration value="fatal"/>
- <xs:enumeration value="INFO"/>
- <xs:enumeration value="WARN"/>
- <xs:enumeration value="ERROR"/>
- <xs:enumeration value="FATAL"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
+ <xs:attribute name="for" type="xs:token"/>
+ <xs:attribute name="severity" default="INFO" type="pages:loglevel-values" />
</xs:attributeGroup>
+ <xs:element name="description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>A page description for workflow switching</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:simpleType name="url">
+ <xs:restriction base="xs:token">
+ <xs:pattern value="http://.*|https://.*"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="schemes">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="https"/>
+ <xs:enumeration value="http"/>
+ </xs:restriction>
+ </xs:simpleType>
+
<xs:simpleType name="view-id">
<xs:restriction base="xs:string">
<xs:pattern value="(/.*)|\*"/>
</xs:restriction>
</xs:simpleType>
-
- <xs:element name="description" type="xs:string">
+
+ <xs:simpleType name="ableness">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="enabled"/>
+ <xs:enumeration value="disabled"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="tf-boolean">
<xs:annotation>
- <xs:documentation>A page description for workflow switching</xs:documentation>
+ <xs:documentation>
+ <p>Allows for the following values:</p>
+ <ul>
+ <li>true</li>
+ <li>false</li>
+ </ul>
+ </xs:documentation>
</xs:annotation>
- </xs:element>
+ <xs:restriction base="xs:boolean">
+ <xs:pattern value="true"/>
+ <xs:pattern value="false"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="allowed-scopes">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="stateless"/>
+ <xs:enumeration value="event"/>
+ <xs:enumeration value="page"/>
+ <xs:enumeration value="conversation"/>
+ <xs:enumeration value="session"/>
+ <xs:enumeration value="business_process"/>
+ <xs:enumeration value="application"/>
+ <xs:enumeration value="STATELESS"/>
+ <xs:enumeration value="EVENT"/>
+ <xs:enumeration value="PAGE"/>
+ <xs:enumeration value="CONVERSATION"/>
+ <xs:enumeration value="SESSION"/>
+ <xs:enumeration value="BUSINESS_PROCESS"/>
+ <xs:enumeration value="APPLICATION"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="loglevel-values">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="info"/>
+ <xs:enumeration value="warn"/>
+ <xs:enumeration value="error"/>
+ <xs:enumeration value="fatal"/>
+ <xs:enumeration value="debug"/>
+ <xs:enumeration value="trace"/>
+ <xs:enumeration value="INFO"/>
+ <xs:enumeration value="WARN"/>
+ <xs:enumeration value="ERROR"/>
+ <xs:enumeration value="FATAL"/>
+ <xs:enumeration value="DEBUG"/>
+ <xs:enumeration value="TRACE"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="http-error-codes">
+ <xs:annotation>
+ <xs:documentation><p><b>Note:</b> These do not include the HTTP extensions.</p></xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="100"/>
+ <xs:enumeration value="101"/>
+ <xs:enumeration value="200"/>
+ <xs:enumeration value="201"/>
+ <xs:enumeration value="202"/>
+ <xs:enumeration value="203"/>
+ <xs:enumeration value="204"/>
+ <xs:enumeration value="205"/>
+ <xs:enumeration value="206"/>
+ <xs:enumeration value="300"/>
+ <xs:enumeration value="301"/>
+ <xs:enumeration value="302"/>
+ <xs:enumeration value="303"/>
+ <xs:enumeration value="304"/>
+ <xs:enumeration value="305"/>
+ <xs:enumeration value="306"/>
+ <xs:enumeration value="307"/>
+ <xs:enumeration value="400"/>
+ <xs:enumeration value="401"/>
+ <xs:enumeration value="402"/>
+ <xs:enumeration value="403"/>
+ <xs:enumeration value="404"/>
+ <xs:enumeration value="405"/>
+ <xs:enumeration value="406"/>
+ <xs:enumeration value="407"/>
+ <xs:enumeration value="408"/>
+ <xs:enumeration value="409"/>
+ <xs:enumeration value="410"/>
+ <xs:enumeration value="411"/>
+ <xs:enumeration value="412"/>
+ <xs:enumeration value="413"/>
+ <xs:enumeration value="414"/>
+ <xs:enumeration value="415"/>
+ <xs:enumeration value="416"/>
+ <xs:enumeration value="417"/>
+ <xs:enumeration value="500"/>
+ <xs:enumeration value="501"/>
+ <xs:enumeration value="502"/>
+ <xs:enumeration value="503"/>
+ <xs:enumeration value="504"/>
+ <xs:enumeration value="505"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="flush-modes">
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="manual"/>
+ <xs:enumeration value="auto"/>
+ <xs:enumeration value="commit"/>
+ <xs:enumeration value="MANUAL"/>
+ <xs:enumeration value="AUTO"/>
+ <xs:enumeration value="COMMIT"/>
+ </xs:restriction>
+ </xs:simpleType>
+
</xs:schema>
16 years, 2 months
Seam SVN: r9020 - trunk/src/main/org/jboss/seam/exception.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-18 14:35:49 -0400 (Thu, 18 Sep 2008)
New Revision: 9020
Modified:
trunk/src/main/org/jboss/seam/exception/Exceptions.java
Log:
allow uppercase log levels
Modified: trunk/src/main/org/jboss/seam/exception/Exceptions.java
===================================================================
--- trunk/src/main/org/jboss/seam/exception/Exceptions.java 2008-09-18 18:34:52 UTC (rev 9019)
+++ trunk/src/main/org/jboss/seam/exception/Exceptions.java 2008-09-18 18:35:49 UTC (rev 9020)
@@ -158,7 +158,7 @@
try
{
logLevel = exception.attributeValue("logLevel") != null ?
- LogLevel.valueOf(exception.attributeValue("logLevel")) : null;
+ LogLevel.valueOf(exception.attributeValue("logLevel").toLowerCase()) : null;
}
catch (IllegalArgumentException ex)
{
16 years, 2 months
Seam SVN: r9019 - trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-18 14:34:52 -0400 (Thu, 18 Sep 2008)
New Revision: 9019
Modified:
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java
trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java
Log:
slight change to allow mysql to be used as the database
Modified: trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java
===================================================================
--- trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java 2008-09-18 12:55:01 UTC (rev 9018)
+++ trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Artist.java 2008-09-18 18:34:52 UTC (rev 9019)
@@ -4,6 +4,7 @@
import java.util.List;
import javax.persistence.CascadeType;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -20,9 +21,10 @@
private String name;
@OneToMany(mappedBy="artist", cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
- @OrderBy("release")
+ @OrderBy("_release")
private List<Disc> discs;
+ @Column(length=5000)
private String description;
public Artist()
Modified: trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java
===================================================================
--- trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java 2008-09-18 12:55:01 UTC (rev 9018)
+++ trunk/examples/seamdiscs/src/org/jboss/seam/example/seamdiscs/model/Disc.java 2008-09-18 18:34:52 UTC (rev 9019)
@@ -3,6 +3,7 @@
import java.util.Date;
import javax.persistence.CascadeType;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -19,12 +20,12 @@
private String name;
- private Integer release;
+ private Integer _release;
@ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
private Artist artist;
-
+ @Column(length=5000)
private String description;
public Disc()
@@ -78,12 +79,12 @@
public Integer getRelease()
{
- return release;
+ return _release;
}
public void setRelease(Integer release)
{
- this.release = release;
+ this._release = release;
}
}
16 years, 2 months
Seam SVN: r9018 - trunk/src/main/org/jboss/seam/mock.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-09-18 08:55:01 -0400 (Thu, 18 Sep 2008)
New Revision: 9018
Modified:
trunk/src/main/org/jboss/seam/mock/MockExternalContext.java
Log:
JBSEAM-2921
Modified: trunk/src/main/org/jboss/seam/mock/MockExternalContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockExternalContext.java 2008-09-18 11:45:03 UTC (rev 9017)
+++ trunk/src/main/org/jboss/seam/mock/MockExternalContext.java 2008-09-18 12:55:01 UTC (rev 9018)
@@ -313,7 +313,7 @@
public String getRequestServletPath()
{
String path = (String) request.getAttribute("org.jboss.seam.web.requestServletPath");
- return path!=null ? path : request.getPathInfo();
+ return path!=null ? path : request.getServletPath();
}
@Override
16 years, 2 months
Seam SVN: r9017 - trunk/src/main/org/jboss/seam/mock.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-18 07:45:03 -0400 (Thu, 18 Sep 2008)
New Revision: 9017
Modified:
trunk/src/main/org/jboss/seam/mock/MockViewHandler.java
Log:
JBSEA-3426 part 1
Modified: trunk/src/main/org/jboss/seam/mock/MockViewHandler.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockViewHandler.java 2008-09-18 11:41:48 UTC (rev 9016)
+++ trunk/src/main/org/jboss/seam/mock/MockViewHandler.java 2008-09-18 11:45:03 UTC (rev 9017)
@@ -8,6 +8,7 @@
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+import org.jboss.seam.util.Faces;
import org.jboss.seam.util.Strings;
public class MockViewHandler extends ViewHandler {
@@ -35,25 +36,34 @@
{
String contextPath = ctx.getExternalContext().getRequestContextPath();
String pathInfo = ctx.getExternalContext().getRequestPathInfo();
- String servletPath = ctx.getExternalContext().getRequestServletPath();
-
+ String servletPath = ctx.getExternalContext().getRequestServletPath();
+
if (Strings.isEmpty(pathInfo))
{
- int loc = viewId.lastIndexOf('.');
- if (loc < 0)
- throw new IllegalArgumentException("no file extension in view id: " + viewId);
int sploc = servletPath.lastIndexOf('.');
if (sploc < 0)
+ {
throw new IllegalArgumentException("no file extension in servlet path: " + servletPath);
- return contextPath + viewId.substring(0, loc) + servletPath.substring(sploc);
+ }
+ return contextPath + getViewIdSansSuffix(viewId) + servletPath.substring(sploc);
}
else
{
- return contextPath + servletPath + viewId;
+ return contextPath + viewId;
}
}
+ private static String getViewIdSansSuffix(String viewId)
+ {
+ int loc = viewId.lastIndexOf('.');
+ if (loc < 0)
+ {
+ throw new IllegalArgumentException("no file extension in view id: " + viewId);
+ }
+ return viewId.substring(0, loc);
+ }
+
@Override
public String getResourceURL(FacesContext ctx, String url)
{
16 years, 2 months
Seam SVN: r9016 - trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-09-18 07:41:48 -0400 (Thu, 18 Sep 2008)
New Revision: 9016
Modified:
trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/RegisterTest.java
Log:
fixed test
Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/RegisterTest.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/RegisterTest.java 2008-09-18 11:31:58 UTC (rev 9015)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/RegisterTest.java 2008-09-18 11:41:48 UTC (rev 9016)
@@ -25,15 +25,15 @@
@Override
protected void updateModelValues() throws Exception
{
- setValue("#{newMember.email}", "shane(a)test.com");
- setValue("#{newMember.firstName}", "Shane");
- setValue("#{newMember.lastName}", "Bryzak");
- setValue("#{newMember.memberName}", "shane123");
+ setValue("#{register.member.email}", "shane(a)test.com");
+ setValue("#{register.member.firstName}", "Shane");
+ setValue("#{register.member.lastName}", "Bryzak");
+ setValue("#{register.member.memberName}", "shane123");
setValue("#{register.username}", "sbryzak");
setValue("#{register.password}", "secret");
setValue("#{register.confirm}", "secret");
setValue("#{register.gender}", "Male");
- setValue("#{newMember.dob}", new Date(107100000000L));
+ setValue("#{register.member.dob}", new Date(107100000000L));
}
@Override
16 years, 2 months
Seam SVN: r9015 - in trunk/src/main/org/jboss/seam: util and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-18 07:31:58 -0400 (Thu, 18 Sep 2008)
New Revision: 9015
Added:
trunk/src/main/org/jboss/seam/util/Faces.java
Modified:
trunk/src/main/org/jboss/seam/document/DocumentStore.java
Log:
refactor out the getSuffix method
Modified: trunk/src/main/org/jboss/seam/document/DocumentStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/document/DocumentStore.java 2008-09-18 11:21:46 UTC (rev 9014)
+++ trunk/src/main/org/jboss/seam/document/DocumentStore.java 2008-09-18 11:31:58 UTC (rev 9015)
@@ -13,6 +13,7 @@
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.util.Faces;
@Name("org.jboss.seam.document.documentStore")
@Scope(ScopeType.CONVERSATION)
@@ -85,16 +86,9 @@
FacesContext context = FacesContext.getCurrentInstance();
ViewHandler handler = context.getApplication().getViewHandler();
String url = handler.getActionURL(context,
- DOCSTORE_BASE_URL + getDefaultSuffix(context));
+ DOCSTORE_BASE_URL + Faces.getDefaultSuffix(context));
return context.getExternalContext().encodeActionURL(url);
}
}
-
- public static String getDefaultSuffix(FacesContext context)
- throws FacesException
- {
- String viewSuffix = context.getExternalContext().getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
- return (viewSuffix != null) ? viewSuffix : ViewHandler.DEFAULT_SUFFIX;
- }
+
}
-
Added: trunk/src/main/org/jboss/seam/util/Faces.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Faces.java (rev 0)
+++ trunk/src/main/org/jboss/seam/util/Faces.java 2008-09-18 11:31:58 UTC (rev 9015)
@@ -0,0 +1,16 @@
+package org.jboss.seam.util;
+
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.context.FacesContext;
+
+public class Faces
+{
+
+ public static String getDefaultSuffix(FacesContext context) throws FacesException
+ {
+ String viewSuffix = context.getExternalContext().getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
+ return (viewSuffix != null) ? viewSuffix : ViewHandler.DEFAULT_SUFFIX;
+ }
+
+}
Property changes on: trunk/src/main/org/jboss/seam/util/Faces.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 2 months
Seam SVN: r9014 - trunk/src/main/org/jboss/seam/mock.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-18 07:21:46 -0400 (Thu, 18 Sep 2008)
New Revision: 9014
Modified:
trunk/src/main/org/jboss/seam/mock/MockViewHandler.java
Log:
ws
Modified: trunk/src/main/org/jboss/seam/mock/MockViewHandler.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockViewHandler.java 2008-09-18 09:13:58 UTC (rev 9013)
+++ trunk/src/main/org/jboss/seam/mock/MockViewHandler.java 2008-09-18 11:21:46 UTC (rev 9014)
@@ -31,24 +31,29 @@
}
@Override
- public String getActionURL(FacesContext ctx, String viewId)
+ public String getActionURL(FacesContext ctx, String viewId)
{
- String contextPath = ctx.getExternalContext().getRequestContextPath();
- String pathInfo = ctx.getExternalContext().getRequestPathInfo();
- String servletPath = ctx.getExternalContext().getRequestServletPath();
-
- if (Strings.isEmpty(pathInfo)) {
- int loc = viewId.lastIndexOf('.');
- if (loc<0) throw new IllegalArgumentException("no file extension in view id: " + viewId);
- int sploc = servletPath.lastIndexOf('.');
- if (sploc<0) throw new IllegalArgumentException("no file extension in servlet path: " + servletPath);
- return contextPath + viewId.substring(0, loc) + servletPath.substring(sploc);
-
- } else {
- return contextPath + servletPath + viewId;
- }
- }
+ String contextPath = ctx.getExternalContext().getRequestContextPath();
+ String pathInfo = ctx.getExternalContext().getRequestPathInfo();
+ String servletPath = ctx.getExternalContext().getRequestServletPath();
+ if (Strings.isEmpty(pathInfo))
+ {
+ int loc = viewId.lastIndexOf('.');
+ if (loc < 0)
+ throw new IllegalArgumentException("no file extension in view id: " + viewId);
+ int sploc = servletPath.lastIndexOf('.');
+ if (sploc < 0)
+ throw new IllegalArgumentException("no file extension in servlet path: " + servletPath);
+ return contextPath + viewId.substring(0, loc) + servletPath.substring(sploc);
+
+ }
+ else
+ {
+ return contextPath + servletPath + viewId;
+ }
+ }
+
@Override
public String getResourceURL(FacesContext ctx, String url)
{
16 years, 2 months
Seam SVN: r9013 - trunk/src/main/org/jboss/seam/init.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-09-18 05:13:58 -0400 (Thu, 18 Sep 2008)
New Revision: 9013
Modified:
trunk/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-3404
Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java 2008-09-18 08:42:10 UTC (rev 9012)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java 2008-09-18 09:13:58 UTC (rev 9013)
@@ -635,8 +635,6 @@
Contexts.getEventContext().set(StandardDeploymentStrategy.NAME, standardDeploymentStrategy);
Contexts.getEventContext().set(HotDeploymentStrategy.NAME, hotDeploymentStrategy);
- installComponents(init);
-
if (hotDeploymentStrategy.isEnabled())
{
hotDeploymentStrategy.scan();
@@ -647,8 +645,10 @@
// TODO Hack
hotDeploymentStrategy.getFiles().add(warRootDirectory);
init.setHotDeployPaths( hotDeploymentStrategy.getHotDeploymentPaths() );
- }
+ }
+ installComponents(init);
+
for (String globalImport: globalImports)
{
init.importNamespace(globalImport);
16 years, 2 months