Modified: websites/staging/deltaspike/trunk/content/draft/exception_draft.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/draft/exception_draft.html
(original)
+++ websites/staging/deltaspike/trunk/content/draft/exception_draft.html Sat
Aug 1 21:44:56 2015
@@ -80,7 +80,18 @@
<div class="page-title">
<h1>Exception Control Draft</h1>
</div>
- <h1 id="agreed-api">Agreed API</h1>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h1 id="agreed-api">Agreed API<a class="headerlink" href="#agreed-api"
title="Permanent link">¶</a></h1>
<div class="codehilite"><pre><span class="err">@</span><span
class="n">Retention</span><span class="p">(</span><span
class="n">RetentionPolicy</span><span class="p">.</span><span
class="n">RUNTIME</span><span class="p">)</span>
<span class="err">@</span><span class="n">Target</span><span
class="p">(</span><span class="n">ElementType</span><span
class="p">.</span><span class="n">PARAMETER</span><span class="p">)</span>
<span class="err">@</span><span class="n">Documented</span>
@@ -424,16 +435,16 @@
</pre></div>
-<h1 id="under-discussion">Under discussion</h1>
+<h1 id="under-discussion">Under discussion<a class="headerlink"
href="#under-discussion" title="Permanent link">¶</a></h1>
<ul>
<li>Exception Handlers</li>
<li>Entry into the Exception Handling system</li>
</ul>
-<h2 id="apispi">API/SPI</h2>
-<h1 id="use-cases">Use-cases</h1>
-<h2 id="fire-and-observe-exceptions">Fire and observe exceptions</h2>
+<h2 id="apispi">API/SPI<a class="headerlink" href="#apispi" title="Permanent
link">¶</a></h2>
+<h1 id="use-cases">Use-cases<a class="headerlink" href="#use-cases"
title="Permanent link">¶</a></h1>
+<h2 id="fire-and-observe-exceptions">Fire and observe exceptions<a
class="headerlink" href="#fire-and-observe-exceptions" title="Permanent
link">¶</a></h2>
<p>An exception happens either in some business logic or from the container
(maybe a session timed out or something like that). Developers need a simple,
easy to use way to handle exceptions in a uniform way. They also need to be
able to tell, after exception handling, if the exception was actually handled
(a handler was found for the particular exception type or super type) or if it
needs to be bubbled up to a higher level.</p>
-<h3 id="scenario">Scenario</h3>
+<h3 id="scenario">Scenario<a class="headerlink" href="#scenario"
title="Permanent link">¶</a></h3>
<div class="codehilite"><pre><span class="n">Business</span> <span
class="n">method</span> <span class="n">using</span> <span class="k">try</span>
<span class="o">/</span> <span class="k">catch</span>
<span class="n">public</span> <span class="n">void</span> <span
class="n">myBusinessMethod</span><span class="p">(...)</span> <span
class="p">{</span>
<span class="k">try</span> <span class="p">{</span>
@@ -465,10 +476,10 @@
</pre></div>
-<h1 id="message-module-draft">Message module draft</h1>
-<h1 id="features-to-merge">Features to merge</h1>
+<h1 id="message-module-draft">Message module draft<a class="headerlink"
href="#message-module-draft" title="Permanent link">¶</a></h1>
+<h1 id="features-to-merge">Features to merge<a class="headerlink"
href="#features-to-merge" title="Permanent link">¶</a></h1>
<p>original list: https://issues.apache.org/jira/browse/DELTASPIKE-119</p>
-<h2 id="part-1">Part 1</h2>
+<h2 id="part-1">Part 1<a class="headerlink" href="#part-1" title="Permanent
link">¶</a></h2>
<p>|| Feature || Comments || Objections || Discussion finished
| Basic API | | | (+) |
| Serializable messages | | not compatible with type-safe messages | |
@@ -481,7 +492,7 @@
| message interpolator | | | (+) |
| locale resolver | | | (+) due to type-safe messages it changed a bit - we
have to re-visit it |
| type safe messages | | | (+) |</p>
-<h2 id="part-2">Part 2</h2>
+<h2 id="part-2">Part 2<a class="headerlink" href="#part-2" title="Permanent
link">¶</a></h2>
<p>This part depends on decissions of part 1.</p>
<p>|| Feature || Comments || Objections || Discussion finished
| el support (= el interpolation) | | | |
@@ -495,7 +506,7 @@
| inline translated type safe messages | | | |
| pluralizer system for message i18n | | | |
| static helpers for simple messages | | | |</p>
-<h2 id="part-3">Part 3</h2>
+<h2 id="part-3">Part 3<a class="headerlink" href="#part-3" title="Permanent
link">¶</a></h2>
<p>This part depends on the planned integration with other technologies like
JSF, BV,...</p>
<p>|| Feature || Comments || Objections || Discussion finished
| add message to the "current" context | | | |
@@ -510,12 +521,21 @@
| ability to hook Bean Validation messages into same infrastructure | needs
clarification - reason: ConstraintViolation#getMessage returns a string | | |
| ability to hook JSF validation messages into same infrastructure | see
"current" context | | |
| messages surviving multiple http redirects | | | |</p>
-<h2 id="part-4">Part 4</h2>
+<h2 id="part-4">Part 4<a class="headerlink" href="#part-4" title="Permanent
link">¶</a></h2>
<p>This part contains features for integrating 3rd party libraries.</p>
-<p>|| Feature || Comments || Objections || Discussion finished
-| support joda-time dates | | | |</p>
-<h1 id="agreed-api_1">Agreed API</h1>
-<h2 id="basic-api">Basic API</h2>
+<table class="table">
+<thead>
+<tr>
+<th></th>
+<th>Feature</th>
+<th></th>
+<th>Comments</th>
+</tr>
+</thead>
+<tbody></tbody>
+</table>
+<h1 id="agreed-api_1">Agreed API<a class="headerlink" href="#agreed-api_1"
title="Permanent link">¶</a></h1>
+<h2 id="basic-api">Basic API<a class="headerlink" href="#basic-api"
title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Basic interface for all message-types</span>
<span class="cm"> */</span>
@@ -569,8 +589,8 @@
</pre></div>
-<h1 id="api-under-discussion-part-1">API under discussion - Part 1</h1>
-<h2 id="message-interface">Message Interface</h2>
+<h1 id="api-under-discussion-part-1">API under discussion - Part 1<a
class="headerlink" href="#api-under-discussion-part-1" title="Permanent
link">¶</a></h1>
+<h2 id="message-interface">Message Interface<a class="headerlink"
href="#message-interface" title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Basic interface for all message-types</span>
<span class="cm"> */</span>
@@ -598,7 +618,7 @@
</pre></div>
-<h2 id="localizable">Localizable</h2>
+<h2 id="localizable">Localizable<a class="headerlink" href="#localizable"
title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Classes which implement it can provide the message-text
based on the given {@link MessageContext}</span>
<span class="cm"> */</span>
@@ -613,7 +633,7 @@
</pre></div>
-<h2 id="messageinterpolator">MessageInterpolator</h2>
+<h2 id="messageinterpolator">MessageInterpolator<a class="headerlink"
href="#messageinterpolator" title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Implementations are responsible to replace placeholders in
a message with the final value</span>
<span class="cm"> */</span>
@@ -635,7 +655,7 @@
</pre></div>
-<h2 id="messageresolver">MessageResolver</h2>
+<h2 id="messageresolver">MessageResolver<a class="headerlink"
href="#messageresolver" title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Implementations have to resolve the text stored for a
given key in the message-source they are aware of</span>
<span class="cm"> */</span>
@@ -656,7 +676,7 @@
</pre></div>
-<h2 id="localeresolver">LocaleResolver</h2>
+<h2 id="localeresolver">LocaleResolver<a class="headerlink"
href="#localeresolver" title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Implementations have to provide the current locale</span>
<span class="cm"> */</span>
@@ -670,7 +690,7 @@
</pre></div>
-<h2 id="messagecontext">MessageContext</h2>
+<h2 id="messagecontext">MessageContext<a class="headerlink"
href="#messagecontext" title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Central context for handling messages</span>
<span class="cm"> */</span>
@@ -713,7 +733,7 @@
</pre></div>
-<h2 id="messagecontextconfig">MessageContextConfig</h2>
+<h2 id="messagecontextconfig">MessageContextConfig<a class="headerlink"
href="#messagecontextconfig" title="Permanent link">¶</a></h2>
<div class="codehilite"><pre><span class="cm">/**</span>
<span class="cm"> * Config for customizing a {@link MessageContext}</span>
<span class="cm"> */</span>
@@ -782,17 +802,17 @@
<p># Security Module draft</p>
-<h1 id="agreed-api_2">Agreed API</h1>
+<h1 id="agreed-api_2">Agreed API<a class="headerlink" href="#agreed-api_2"
title="Permanent link">¶</a></h1>
<ul>
<li>@Secured</li>
<li>@SecurityBindingType</li>
<li>AccessDecisionVoter</li>
<li>SecurityStrategy</li>
</ul>
-<h1 id="agreed-api-and-spi-of-part-1">Agreed API and SPI of Part 1</h1>
+<h1 id="agreed-api-and-spi-of-part-1">Agreed API and SPI of Part 1<a
class="headerlink" href="#agreed-api-and-spi-of-part-1" title="Permanent
link">¶</a></h1>
<p>commit: 1a2c7ffd0d0a1ad3dea34515a54958f0a6ce2932</p>
-<h2 id="api">API</h2>
-<h3 id="identity">Identity</h3>
+<h2 id="api">API<a class="headerlink" href="#api" title="Permanent
link">¶</a></h2>
+<h3 id="identity">Identity<a class="headerlink" href="#identity"
title="Permanent link">¶</a></h3>
<p>Session scoped result of the authentication process.</p>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">interface</span> <span class="n">Identity</span> <span
class="n">extends</span> <span class="n">Serializable</span>
<span class="p">{</span>
@@ -812,7 +832,7 @@
</pre></div>
-<h3 id="user">User</h3>
+<h3 id="user">User<a class="headerlink" href="#user" title="Permanent
link">¶</a></h3>
<p>Depending on further use-cases it can be refactored to an interface</p>
<p>The id is an unique identifier for an user. It isn't defined if it is an
internal identifier or an identifier known by the user (like the user-name).
If users login e.g. via their e-mail address, it's possible to lookup an
internal id in a custom implementation of {{LoginCredential}} or a bean which
is in between (and {{LoginCredential}} doesn't get called directly in the 2nd
case).</p>
@@ -836,7 +856,7 @@ If users login e.g. via their e-mail add
</pre></div>
-<h3 id="credential">Credential</h3>
+<h3 id="credential">Credential<a class="headerlink" href="#credential"
title="Permanent link">¶</a></h3>
<p>Credential is a holder for the "secret key" like a password.</p>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">interface</span> <span class="n">Credential</span><span
class="o"><</span><span class="n">T</span><span class="o">></span>
<span class="p">{</span>
@@ -845,7 +865,7 @@ If users login e.g. via their e-mail add
</pre></div>
-<h3 id="logincredential-former-credentials">LoginCredential (former
Credentials)</h3>
+<h3 id="logincredential-former-credentials">LoginCredential (former
Credentials)<a class="headerlink" href="#logincredential-former-credentials"
title="Permanent link">¶</a></h3>
<p>Request scoped holder for the authentication process.</p>
<p>[TODO] we need a better name for it</p>
<ul>
@@ -869,7 +889,7 @@ If users login e.g. via their e-mail add
<p>}</p>
</li>
</ul>
-<h3 id="events">Events</h3>
+<h3 id="events">Events<a class="headerlink" href="#events" title="Permanent
link">¶</a></h3>
<ul>
<li>LoggedInEvent</li>
<li>LoginFailedEvent</li>
@@ -879,8 +899,8 @@ If users login e.g. via their e-mail add
<li>PreAuthenticateEvent</li>
<li>PostAuthenticateEvent</li>
</ul>
-<h2 id="spi">SPI</h2>
-<h3 id="authenticatorselector">AuthenticatorSelector</h3>
+<h2 id="spi">SPI<a class="headerlink" href="#spi" title="Permanent
link">¶</a></h2>
+<h3 id="authenticatorselector">AuthenticatorSelector<a class="headerlink"
href="#authenticatorselector" title="Permanent link">¶</a></h3>
<p>Request scoped bean used to find the current {{Authenticator}} for the
authentication process - e.g. to provide different login-types used by the same
client (e.g. a component in an UI).</p>
<p>[TODO] discuss default (internal) Authenticator if there is no custom
implementation.</p>
<div class="codehilite"><pre><span class="kr">public</span> <span
class="kr">interface</span> <span class="nx">AuthenticatorSelector</span>
@@ -898,7 +918,7 @@ If users login e.g. via their e-mail add
</pre></div>
-<h3 id="authenticator">Authenticator</h3>
+<h3 id="authenticator">Authenticator<a class="headerlink"
href="#authenticator" title="Permanent link">¶</a></h3>
<p>Called by {{Identity}} and performs the final authentication based on the
information in {{LoginCredential}} .</p>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">interface</span> <span class="n">Authenticator</span>
<span class="p">{</span>
@@ -941,8 +961,8 @@ If users login e.g. via their e-mail add
</pre></div>
-<h2 id="usage">Usage</h2>
-<h3 id="simple-loginlogout-by-example-java-se">Simple Login/Logout by Example
(Java-SE)</h3>
+<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent
link">¶</a></h2>
+<h3 id="simple-loginlogout-by-example-java-se">Simple Login/Logout by Example
(Java-SE)<a class="headerlink" href="#simple-loginlogout-by-example-java-se"
title="Permanent link">¶</a></h3>
<div class="codehilite"><pre><span class="p">@</span><span
class="n">ApplicationScoped</span>
<span class="n">public</span> <span class="n">class</span> <span
class="n">LoginBean</span>
<span class="p">{</span>
@@ -1001,9 +1021,9 @@ If users login e.g. via their e-mail add
</pre></div>
-<h1 id="under-discussion_1">Under discussion</h1>
-<h2 id="apispi_1">API/SPI</h2>
-<h3 id="packages">Packages</h3>
+<h1 id="under-discussion_1">Under discussion<a class="headerlink"
href="#under-discussion_1" title="Permanent link">¶</a></h1>
+<h2 id="apispi_1">API/SPI<a class="headerlink" href="#apispi_1"
title="Permanent link">¶</a></h2>
+<h3 id="packages">Packages<a class="headerlink" href="#packages"
title="Permanent link">¶</a></h3>
<ul>
<li>*/authentication</li>
<li>*/authentication/events</li>
@@ -1011,14 +1031,14 @@ If users login e.g. via their e-mail add
<li>*/authorization/annotation</li>
<li>*/credential or */authentication/credential</li>
</ul>
-<h2 id="part-1_1">Part 1</h2>
+<h2 id="part-1_1">Part 1<a class="headerlink" href="#part-1_1"
title="Permanent link">¶</a></h2>
<p>|| Feature || Comments || Objections || Discussion finished ||
| Login via Username/Password | | | (+) |
| Logout | | | (+) |
| Authentication API and SPI | Credentials vs Credential (one of it needs a
better name) | | (+) |
| Basic User/Identity API | | | (+) |
| Duration of a valid authentication | ExpirationEvaluator SPI | | |</p>
-<h2 id="part-2_1">Part 2</h2>
+<h2 id="part-2_1">Part 2<a class="headerlink" href="#part-2_1"
title="Permanent link">¶</a></h2>
<p>|| Feature || Comments || Objections || Discussion finished ||
| Object level permission | | | |
| Grant or revoke permissions | | | |
@@ -1028,7 +1048,7 @@ If users login e.g. via their e-mail add
| User/Identity management | | | |
| Password-Hash-Service | | | |
| Group management | optional support for typ-safe groups/group-types | | |</p>
-<h2 id="part-3_1">Part 3</h2>
+<h2 id="part-3_1">Part 3<a class="headerlink" href="#part-3_1"
title="Permanent link">¶</a></h2>
<p>|| Feature || Comments || Objections || Discussion finished ||
| Support for deputies (see Impersonalization) | | | |
| Privileges concept | | | |
@@ -1038,16 +1058,16 @@ If users login e.g. via their e-mail add
| Identity Store SPI | | | |
| Query API | | | |
| Application roles | | | |</p>
-<h2 id="part-4_1">Part 4</h2>
+<h2 id="part-4_1">Part 4<a class="headerlink" href="#part-4_1"
title="Permanent link">¶</a></h2>
<p>|| Feature || Comments || Objections || Discussion finished ||
| Support of alternative authentication concepts | Extend the Authentication
SPI | | |
| Integration with authentication concepts of (application-) servers | Extend
the Authentication SPI | | |
| Personalization | | | |
| Alternatives for roles/groups | | | |
| Permission for external applications | | | |</p>
-<h1 id="use-cases_1">Use-cases</h1>
-<h2 id="authentication">Authentication</h2>
-<h3 id="scenario_1">Scenario</h3>
+<h1 id="use-cases_1">Use-cases<a class="headerlink" href="#use-cases_1"
title="Permanent link">¶</a></h1>
+<h2 id="authentication">Authentication<a class="headerlink"
href="#authentication" title="Permanent link">¶</a></h2>
+<h3 id="scenario_1">Scenario<a class="headerlink" href="#scenario_1"
title="Permanent link">¶</a></h3>
<p>The user must be able to log in by supplying a username and password</p>
<p>Example JSF code:</p>
<div class="codehilite"><pre><span class="n">Username</span><span
class="p">:</span> <span class="o"><</span><span class="n">h</span><span
class="p">:</span><span class="n">inputText</span> <span
class="n">value</span><span class="p">=</span>"#<span
class="p">{</span><span class="n">credentials</span><span
class="p">.</span><span class="n">username</span><span
class="p">}</span>"<span class="o">/></span>
@@ -1056,14 +1076,14 @@ If users login e.g. via their e-mail add
</pre></div>
-<h3 id="scenario_2">Scenario</h3>
+<h3 id="scenario_2">Scenario<a class="headerlink" href="#scenario_2"
title="Permanent link">¶</a></h3>
<p>The user must be able to log out</p>
<p>Example JSF codee</p>
<div class="codehilite"><pre><span class="o"><</span><span
class="n">h</span><span class="p">:</span><span class="n">commandButton</span>
<span class="n">value</span><span class="p">=</span>"<span
class="n">LOGOUT</span>" <span class="n">action</span><span
class="p">=</span>"#<span class="p">{</span><span
class="n">identity</span><span class="p">.</span><span
class="n">logout</span><span class="p">}</span>"<span
class="o">/></span>
</pre></div>
-<h3 id="scenario_3">Scenario</h3>
+<h3 id="scenario_3">Scenario<a class="headerlink" href="#scenario_3"
title="Permanent link">¶</a></h3>
<p>The developer must be able to easily implement their own custom
authentication logic using a provided SPI</p>
<p>Example</p>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">class</span> <span class="n">SimpleAuthenticator</span> <span
class="n">extends</span> <span class="n">BaseAuthenticator</span> <span
class="n">implements</span> <span class="n">Authenticator</span> <span
class="p">{</span>
@@ -1085,12 +1105,12 @@ If users login e.g. via their e-mail add
<p>{code}</p>
-<h3 id="scenario_4">Scenario</h3>
+<h3 id="scenario_4">Scenario<a class="headerlink" href="#scenario_4"
title="Permanent link">¶</a></h3>
<p>It should be possible to provide an optional password service to create a
password-hash based on the given password which will be stored instead of the
real password.
Maybe there should be different default implementations (provided via
qualifiers).</p>
-<h3 id="scenario_5">Scenario</h3>
+<h3 id="scenario_5">Scenario<a class="headerlink" href="#scenario_5"
title="Permanent link">¶</a></h3>
<p>The developer needs to authenticate application users stored inside
corporate LDAP server.</p>
-<h3 id="scenario_6">Scenario</h3>
+<h3 id="scenario_6">Scenario<a class="headerlink" href="#scenario_6"
title="Permanent link">¶</a></h3>
<p>The developer must be able to easily support alternative authentication
providers, such as those supporting services such as OpenID or token based
authentication. Those can be more complex then just âusername/passwordâ
scenario and require redirects to or communication with specific external ISP
(Identity Service Provider)</p>
<p>Examples:</p>
<ul>
@@ -1107,7 +1127,7 @@ For some of those technologies where aut
Ability to implement own authenticator that have access to IDM and
Securtiy/Permissions API in it.
Provide automatic mapping between attributes returned by the Identity
provider, and attributes stored in the local Identity store.
Allow authentication from alternative view technologies, (i.e. AJAX)</p>
-<h3 id="scenario_7">Scenario</h3>
+<h3 id="scenario_7">Scenario<a class="headerlink" href="#scenario_7"
title="Permanent link">¶</a></h3>
<p>The user must be able to authenticate automatically using a âRemember
Meâ feature, based on a unique cookie value stored by the userâs browser.
For authentication performed in this manner, it must be also possible for the
developer to configure a validation policy, which determines whether the user
is required to provide their actual credentials for critical application
operations such as changing passwords or e-mail address, placing orders,
etc.</p>
<p>The validation policy should also determine how long the validation window
lasts, with some possible options being:</p>
<ul>
@@ -1115,18 +1135,18 @@ Allow authentication from alternative vi
<li>Validated for X minutes</li>
<li>Validated until end of session</li>
</ul>
-<h3 id="scenario_8">Scenario</h3>
+<h3 id="scenario_8">Scenario<a class="headerlink" href="#scenario_8"
title="Permanent link">¶</a></h3>
<p>The developer must be able to easily integrate with AS security layer
(JAAS/JAAC). Ideally by plugging DeltaSpike security into LoginModule stack.</p>
-<h2 id="impersonalization">Impersonalization</h2>
-<h3 id="scenario_9">Scenario</h3>
+<h2 id="impersonalization">Impersonalization<a class="headerlink"
href="#impersonalization" title="Permanent link">¶</a></h2>
+<h3 id="scenario_9">Scenario<a class="headerlink" href="#scenario_9"
title="Permanent link">¶</a></h3>
<p>Administrator needs to verify assigned access, applied changes or exposed
resources for specific user. He authenticates âas a userâ or access
application imitating his identity - without knowing his password.</p>
<p>Examples:</p>
<ul>
<li>Facebook, see your profile as user 'bob'</li>
<li>Mary is away from the office and someone needs to execute something on her
behalf</li>
</ul>
-<h2 id="authorization">Authorization</h2>
-<h3 id="scenario_10">Scenario</h3>
+<h2 id="authorization">Authorization<a class="headerlink"
href="#authorization" title="Permanent link">¶</a></h2>
+<h3 id="scenario_10">Scenario<a class="headerlink" href="#scenario_10"
title="Permanent link">¶</a></h3>
<p>The developer must be able to control which elements of the user interface
are displayed to the user based on the user's privilege level</p>
<p>Example JSF code:</p>
<div class="codehilite"><pre><span class="nt"><div</span> <span
class="na">class=</span><span class="s">"menu"</span><span
class="nt">></span>
@@ -1135,7 +1155,7 @@ Allow authentication from alternative vi
</pre></div>
-<h3 id="scenario_11">Scenario</h3>
+<h3 id="scenario_11">Scenario<a class="headerlink" href="#scenario_11"
title="Permanent link">¶</a></h3>
<p>The developer must be able to control which elements of the user interface
are displayed to the user based on their assigned permissions</p>
<p>Example JSF code:</p>
<div class="codehilite"><pre><span class="nt"><table</span> <span
class="na">class=</span><span class="s">"customers"</span><span
class="nt">></span>
@@ -1150,20 +1170,20 @@ Allow authentication from alternative vi
</pre></div>
-<h3 id="scenario_12">Scenario</h3>
+<h3 id="scenario_12">Scenario<a class="headerlink" href="#scenario_12"
title="Permanent link">¶</a></h3>
<p>Sometimes developer may not have available instance of resource, which he
wants to protect. It may be useful to ask for permission without need to obtain
object from DB. It might be useful to have method:
identity.hasPermission(String resourceType, String resourceId, String
permission) in addition to current identity.hasPermission(Object resource,
String permission)</p>
<p>Example JSF code:</p>
<div class="codehilite"><pre> <span class="o"><</span><span
class="n">h</span><span class="p">:</span><span class="n">commandButton</span>
<span class="n">value</span><span class="p">=</span>"<span
class="n">Edit</span> <span class="n">page</span>" <span
class="n">rendered</span><span class="p">=</span>"#<span
class="p">{</span><span class="n">identity</span><span class="p">.</span><span
class="n">hasPermission</span><span class="p">(</span><span
class="s">'PAGE'</span><span class="p">,</span> <span
class="s">'AcmePage'</span><span class="p">,</span> <span
class="s">'EDIT'</span><span class="p">)}</span>" <span
class="n">action</span><span class="p">=</span>"<span
class="p">...</span>"<span class="o">/></span>
</pre></div>
-<h3 id="scenario_13">Scenario</h3>
+<h3 id="scenario_13">Scenario<a class="headerlink" href="#scenario_13"
title="Permanent link">¶</a></h3>
<p>The developer must be able to restrict method access based on the user's
privilege level.
Example:</p>
<p>(Already addressed with typesafe security annotations, e.g.
@SecurityBindingType)</p>
-<h3 id="scenario_14">Scenario</h3>
+<h3 id="scenario_14">Scenario<a class="headerlink" href="#scenario_14"
title="Permanent link">¶</a></h3>
<p>The framework must provide a system for resolving object permissions, and
the developer must have access to an SPI for easily providing their own custom
permission resolver logic.</p>
-<h3 id="scenario_15">Scenario</h3>
+<h3 id="scenario_15">Scenario<a class="headerlink" href="#scenario_15"
title="Permanent link">¶</a></h3>
<p>The user (with the necessary privileges) must be able assign permissions to
individual objects within the applicationâs business domain (i.e. ACL style
permissions) and have these permissions persisted. These permissions
should:</p>
<ul>
<li>Be assignable to either the individual user, a group, or a role</li>
@@ -1171,9 +1191,9 @@ Example:</p>
<li>Have configurable identifier policies, i.e. Entity beans will use an
identifier based on the primary key value</li>
<li>Have a configurable permission store, i.e. it must be possible to store
permissions in a database using JPA, etc.</li>
</ul>
-<h3 id="scenario_16">Scenario</h3>
+<h3 id="scenario_16">Scenario<a class="headerlink" href="#scenario_16"
title="Permanent link">¶</a></h3>
<p>Further to the previous requirement, there must be an API for managing
persistent permissions. Operations performed by the user on this API (such as
granting or revoking permissions to/from other users) may be subjected to an
additional security check.</p>
-<h3 id="scenario_17">Scenario</h3>
+<h3 id="scenario_17">Scenario<a class="headerlink" href="#scenario_17"
title="Permanent link">¶</a></h3>
<p>The developer needs to perform authorization checks based on information
stored in corporate LDAP server or dedicated database. This external store
contains information about all company employees and maps hierarchy including
groups present in the organization with information about their members.</p>
<p>Company has a Windows domain and whole security model build around
structure of group of users stored in Microsoft Active Directory. Application
developer needs to integrate security with this information.
Examples:</p>
@@ -1184,9 +1204,9 @@ Examples:</p>
<li>Restrict adding new members to a group only for its administrator</li>
<li>identityManager.hasRole(âadministratorâ, âjohnâ,
â/some/specific/groupâ);</li>
</ul>
-<h3 id="scenario_18">Scenario</h3>
+<h3 id="scenario_18">Scenario<a class="headerlink" href="#scenario_18"
title="Permanent link">¶</a></h3>
<p>The developer needs to control access to application resources based on
structure of groups and user roles</p>
-<h3 id="scenario_19">Scenario</h3>
+<h3 id="scenario_19">Scenario<a class="headerlink" href="#scenario_19"
title="Permanent link">¶</a></h3>
<p>Web application has a number of resources that needs to be secured with
more fine grained security model. Invoking operations on a given resource needs
to be restricted with a given permission. User can inherit set of permissions
to the given resource from group to which he belongs or from role he posses.</p>
<p>Examples:</p>
<ul>
@@ -1197,8 +1217,8 @@ Examples:</p>
*User belongs to group â/operators/content_creatorâ. Therefore he inherits
a set of permissions (CREATE, EDIT, REMOVE) to add new content on specified
page in the application.</li>
</ul>
<p>Requirements:</p>
-<h2 id="permissions-model">Permissions model</h2>
-<h3 id="scenario_20">Scenario</h3>
+<h2 id="permissions-model">Permissions model<a class="headerlink"
href="#permissions-model" title="Permanent link">¶</a></h2>
+<h3 id="scenario_20">Scenario<a class="headerlink" href="#scenario_20"
title="Permanent link">¶</a></h3>
<p>Application has a structure of resources. Permissions assigned to user for
a given resource in the tree are inherited by other resources. User is able to
edit all sub resources based on permissions assigned to parent resource.</p>
<p>Example:</p>
<ul>
@@ -1206,7 +1226,7 @@ Examples:</p>
<li>User assigned to manage specific page should also be able to manage all
sub pages.</li>
<li>Permissions are inherited.</li>
</ul>
-<h3 id="scenario_21">Scenario</h3>
+<h3 id="scenario_21">Scenario<a class="headerlink" href="#scenario_21"
title="Permanent link">¶</a></h3>
<p>Application persists a structure of groups and users that have roles in
those groups. Application developer needs to have some permissions related to
one group be inherited by their sub groups.</p>
<p>Example:</p>
<ul>
@@ -1214,14 +1234,14 @@ Examples:</p>
<li>Group â/organization/it_deptâ has assigned READ and CREATE permission
associated with âIT Security Event Logsâ page in the application.</li>
<li>All users with role in â/organizaiton/it_deptâ will be able to read
âCorporate newsâ page because READ permission will be inherited from
â/organizationâ group.</li>
</ul>
-<h3 id="scenario_22">Scenario</h3>
+<h3 id="scenario_22">Scenario<a class="headerlink" href="#scenario_22"
title="Permanent link">¶</a></h3>
<p>The developer needs to define several types of contexts in which user is
connected with a given group to enable flexible authorization of different
types of performed operations</p>
<p>Example:</p>
<p>John is an âadministratorâ of â/communities/base_jumpingâ group and
can perform administrative tasks on resources connected with this group
John is a âmemberâ of â/communities/base_jumpingâ group and he can
access and read resources connected with this group
John is a âcontent validatorâ of â/communities/base_jumpingâ group and
he will be asked to authorize any new content on pages related to this group
before it gets published.</p>
<p>In all examples described above single group can have several users with
same role.</p>
-<h4
id="this-specifically-can-be-addressed-with-the-domain-acl-type-approach-as-prototyped-in-seam-security">This
specifically can be addressed with the Domain ACL type approach, as prototyped
in Seam Security:</h4>
+<h4
id="this-specifically-can-be-addressed-with-the-domain-acl-type-approach-as-prototyped-in-seam-security">This
specifically can be addressed with the Domain ACL type approach, as prototyped
in Seam Security:<a class="headerlink"
href="#this-specifically-can-be-addressed-with-the-domain-acl-type-approach-as-prototyped-in-seam-security"
title="Permanent link">¶</a></h4>
<p>One of the biggest problems of Java web app security to date, and what will
also be a problem in our framework, is that Java EE, Seam Security have not
been able to satisfy a very common type of Authentication, domain
authentication, and have focused solely on global role-based security
authorisation:</p>
<p>E.g: Global authentication is "Is the user an Admin of the application," as
opposed to domain authentication, which asks, "Is the user an Admin of this
Domain Object,"</p>
<p>Developers typically have to implement their own security system (via
direct method calls, or etc...) for this type of business logic.</p>
@@ -1257,14 +1277,14 @@ John is a âcontent validatorâ
<p>Note that the @Project annotation is not a CDI bean Qualifier / Stereotype
annotation, it is a method parameter security binding annotation that tells
Seam Security to use the value of the Project passed to the method call in the
security binding check itself.</p>
-<h3 id="scenario_23">Scenario</h3>
+<h3 id="scenario_23">Scenario<a class="headerlink" href="#scenario_23"
title="Permanent link">¶</a></h3>
<p>The developer needs to define single user or group that will serve as super
users (aka root users. Those will have any available permissions.</p>
<p>Example:</p>
<ul>
<li>identity.isRootUser()</li>
<li>identityManager.getRootUsers();</li>
</ul>
-<h3 id="scenario_24">Scenario</h3>
+<h3 id="scenario_24">Scenario<a class="headerlink" href="#scenario_24"
title="Permanent link">¶</a></h3>
<p>Application needs to authorize access based on inherited group
membership.</p>
<p>Example:</p>
<p>Access to information about new trips is restricted to members of
â/communities/hikingâ group
@@ -1273,13 +1293,13 @@ On the other hand, access to information
<p>Example: You can configure that info about classic trips is available for
â/communities/hiking*â which would mean /communities/hiking and all itâs
subgroups. On the other hand info about climbing trips is available only for
individual groups â/communities/hikingâ and
â/communities/hiking/seniorsâ as we donât want to have group inheritance
here.
For this climbing usecase, it may be useful to DENY permission available from
parent groups.</p>
<p>Example: You can configure that info about climbing trips will be available
for â/communities/hiking*â but permission is denied for members for
â/communites/hiking/juniorsâ. In this case, groups
â/commuinites/hikingâ, â/communities/hiking/instructorsâ,
â/communities/hiking/seniorsâ will have permission. Members of group
â/communities/hiking/juniorsâ wonât hav permission.</p>
-<h3 id="scenario_25">Scenario</h3>
+<h3 id="scenario_25">Scenario<a class="headerlink" href="#scenario_25"
title="Permanent link">¶</a></h3>
<p>The developer may want to have permissions based on other criterias than
only roles/groups. Some of these requirements can be handled by XACML
integration mentioned below.</p>
<ul>
<li>I want page "hobby" to be accessible for employees only after 6pm, to
enforce that my employees won't go to hobby page during their working time.</li>
<li>I want forum portlet with "Retiree forum" to be accessible only for users
older than 60 years. Only exceptions can be "/platform/administrators" group,
whose members can access page everytime regardless of their age.</li>
</ul>
-<h3 id="scenario_26">Scenario</h3>
+<h3 id="scenario_26">Scenario<a class="headerlink" href="#scenario_26"
title="Permanent link">¶</a></h3>
<p>The developer needs to integrate application with more advanced security
resolution mechanisms.</p>
<p>Examples:</p>
<ul>
@@ -1289,10 +1309,10 @@ For this climbing usecase, it may be use
</ul>
<p>Requirements:</p>
<p>Well thought API/SPI that doesnât limit such integration.</p>
-<h3 id="scenario_27">Scenario</h3>
+<h3 id="scenario_27">Scenario<a class="headerlink" href="#scenario_27"
title="Permanent link">¶</a></h3>
<p>The developer needs to expose part of application features to be accessible
by external services and authorize their access.</p>
-<h2 id="delegated-administration">Delegated Administration</h2>
-<h3 id="scenario_28">Scenario</h3>
+<h2 id="delegated-administration">Delegated Administration<a
class="headerlink" href="#delegated-administration" title="Permanent
link">¶</a></h2>
+<h3 id="scenario_28">Scenario<a class="headerlink" href="#scenario_28"
title="Permanent link">¶</a></h3>
<p>Web application has a number of user groups or resources that needs to be
managed. It is desired that management permission to only part of those are
delegated to specific user</p>
<p>Examples:</p>
<ul>
@@ -1303,9 +1323,9 @@ For this climbing usecase, it may be use
</ul>
<p>Requirements:</p>
<p>Advanced enough security and identity model to map required permissions</p>
-<h2 id="identity-management-idm">Identity Management (IDM)</h2>
+<h2 id="identity-management-idm">Identity Management (IDM)<a
class="headerlink" href="#identity-management-idm" title="Permanent
link">¶</a></h2>
<p>All use cases with strong focus around concepts and operations on User,
Group and Role</p>
-<h3 id="scenario_29">Scenario</h3>
+<h3 id="scenario_29">Scenario<a class="headerlink" href="#scenario_29"
title="Permanent link">¶</a></h3>
<p>Application needs to expose basic user management capabilities. To register
new user, edit profile and remove old users. Basic provisioning and management
API for user, group and role.</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">User</span> <span
class="n">johnUser</span> <span class="p">=</span> <span
class="n">identityManager</span><span class="p">.</span><span
class="n">createUser</span><span class="p">(</span>â<span
class="n">john</span><span class="p">);</span>
@@ -1316,7 +1336,7 @@ For this climbing usecase, it may be use
</pre></div>
-<h3 id="scenario_30">Scenario</h3>
+<h3 id="scenario_30">Scenario<a class="headerlink" href="#scenario_30"
title="Permanent link">¶</a></h3>
<p>Application needs to enable groups management capabilities. Administrators
must be able to map organization structure in the application to be able to set
proper security restrictions</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">Group</span> <span
class="n">parisOffice</span> <span class="p">=</span> <span
class="n">identityManager</span><span class="p">.</span><span
class="n">createGroup</span><span class="p">(</span>â<span
class="n">paris</span>â<span class="p">,</span> â<span
class="o">/</span><span class="k">global</span><span class="o">/</span><span
class="n">offices</span><span class="o">/</span><span
class="n">emea</span><span class="o">/</span>â<span class="p">);</span>
@@ -1326,7 +1346,7 @@ For this climbing usecase, it may be use
</pre></div>
-<h3 id="scenario_31">Scenario</h3>
+<h3 id="scenario_31">Scenario<a class="headerlink" href="#scenario_31"
title="Permanent link">¶</a></h3>
<p>Application needs to enable group based security that maps relationships
from real organization structure. Therefore users need to be associated with
specific groups in organization hierarchy and have defined roles in context of
those groups</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">Group</span> <span
class="n">itsec</span> <span class="p">=</span> <span
class="n">identityManager</span><span class="p">.</span><span
class="n">createGroup</span><span class="p">(</span>â<span
class="n">itsec</span>â<span class="p">,</span> â<span
class="o">/</span><span class="n">organization</span><span
class="o">/</span><span class="n">engineering</span><span
class="o">/</span><span class="n">security</span>â<span class="p">);</span>
@@ -1339,7 +1359,7 @@ For this climbing usecase, it may be use
</pre></div>
-<h3 id="scenario_32">Scenario</h3>
+<h3 id="scenario_32">Scenario<a class="headerlink" href="#scenario_32"
title="Permanent link">¶</a></h3>
<p>Application needs to expose capabilities to associate authenticated user
with specific roles in application context.</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">identity</span><span
class="p">.</span><span class="n">addApplicationRole</span><span
class="p">(</span>â<span class="n">SuperUser</span>â<span
class="p">);</span>
@@ -1347,23 +1367,23 @@ For this climbing usecase, it may be use
</pre></div>
-<h3 id="scenario_33">Scenario</h3>
+<h3 id="scenario_33">Scenario<a class="headerlink" href="#scenario_33"
title="Permanent link">¶</a></h3>
<p>The developer needs to query user, groups and roles in a way that will not
affect performance. He needs to sync into database 500k user entries from
corporate LDAP server and quite big group structure. Methods like
identityManager.getAllUsers() will be performance bottlenecs. The developer
needs to obtain pagainated and sorted results.</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">identityManager</span><span
class="p">.</span><span class="n">createGroupQuery</span><span
class="p">().</span><span class="n">setRelatedUser</span><span
class="p">(</span>â<span class="n">john</span>â<span
class="p">).</span><span class="n">setParentGroup</span><span
class="p">(</span>â<span class="o">/</span><span
class="n">offices</span>â<span class="p">).</span><span
class="n">sort</span><span class="p">(</span><span class="n">true</span><span
class="p">).</span><span class="n">setRange</span><span class="p">(</span><span
class="n">Range</span><span class="p">.</span><span class="n">of</span><span
class="p">(</span>0<span class="p">,</span>10<span class="p">)).</span><span
class="n">execute</span><span class="p">();</span>
</pre></div>
-<h3 id="scenario_34">Scenario</h3>
+<h3 id="scenario_34">Scenario<a class="headerlink" href="#scenario_34"
title="Permanent link">¶</a></h3>
<p>The developer needs to query user by unique attribute (email) and group
membership when ânew user registrationâ form is submitted in the
application.</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">identityManager</span><span
class="p">.</span><span class="n">createUserQuery</span><span
class="p">().</span><span class="n">setRelatedGroup</span><span
class="p">(</span>â<span class="o">/</span><span
class="n">employees</span>â<span class="p">).</span><span
class="n">setAttributeFilter</span><span class="p">(</span>â<span
class="n">personal</span><span class="p">.</span><span
class="n">email</span>â<span class="p">,</span> <span
class="n">values</span><span class="p">).</span><span
class="n">setRange</span><span class="p">(</span><span
class="n">Range</span><span class="p">.</span><span class="n">of</span><span
class="p">(</span>0<span class="p">.</span>100<span class="p">));</span>
</pre></div>
-<h3 id="scenario_35">Scenario</h3>
+<h3 id="scenario_35">Scenario<a class="headerlink" href="#scenario_35"
title="Permanent link">¶</a></h3>
<p>The developer needs to persist user, group and role information in
database. JPA implementation is his dream.</p>
-<h3 id="scenario_36">Scenario</h3>
+<h3 id="scenario_36">Scenario<a class="headerlink" href="#scenario_36"
title="Permanent link">¶</a></h3>
<p>The developer want to give freedom to plug different type of identityStore
into his application in the future. Not all identity store expose equal
operations for pagination, sorting or querying by attributes. He needs to
design his GUI so it can query underlying IdentityStore if specific operations
are supported.</p>
<p>Examples:</p>
<div class="codehilite"><pre><span class="n">identityManager</span><span
class="p">.</span><span class="n">getSupportedFeatures</span><span
class="p">().</span><span class="n">isUserSortSupported</span><span
class="p">();</span>
@@ -1371,8 +1391,8 @@ For this climbing usecase, it may be use
</pre></div>
-<h2 id="events_1">Events</h2>
-<h3 id="scenario_37">Scenario</h3>
+<h2 id="events_1">Events<a class="headerlink" href="#events_1"
title="Permanent link">¶</a></h2>
+<h3 id="scenario_37">Scenario<a class="headerlink" href="#scenario_37"
title="Permanent link">¶</a></h3>
<p>Application developer needs to add specific hooks for common IDM or
Security operations</p>
<p>Examples:</p>
<p>Audit and logging for permission and IDM related changes or information
resolution
@@ -1380,28 +1400,28 @@ Assigning specific permissions for every
Synchronization based integration with LDAP. All changes to users and groups
are synced back to external store. On specific event LDAP is queried for a
changelog and based on that changes from external store are synced to the
internal store.</p>
<p>Requirements:</p>
<p>Event API.</p>
-<h2 id="personalization">Personalization</h2>
+<h2 id="personalization">Personalization<a class="headerlink"
href="#personalization" title="Permanent link">¶</a></h2>
<p>This is not fully related to security but it is tightly coupled with
identity model that is already in place</p>
-<h3 id="scenario_38">Scenario</h3>
+<h3 id="scenario_38">Scenario<a class="headerlink" href="#scenario_38"
title="Permanent link">¶</a></h3>
<p>The developer needs to let application users set their own locale. He also
needs to set default ones per group of users. For case that user is member of
more groups, we need to specify which group will have priority for determining
the defaultLocale (or other attribute) for user. Some groups can be ignored.
Examples:</p>
<p>Group â/application_usersâ have attribute âdefalutLocaleâ. All
users with role âmemberâ in this group inherit this attribute. Each user
can override this value
User is member of â/application_usersâ and â/partnersâ . Group
â/application_usersâ has default locale âfrâ and group â/partnersâ
has default locale âenâ. We assume that â/application_usersâ has bigger
priority so defaultLocale of user will be âfrâ.</p>
-<h3 id="scenario_39">Scenario</h3>
+<h3 id="scenario_39">Scenario<a class="headerlink" href="#scenario_39"
title="Permanent link">¶</a></h3>
<p>The developer needs to let application users set their own skin in their
application. He also needs to set default skins per group of users.
Examples:</p>
<p>Groups â/vendorsâ, â/partnersâ and â/employeesâ have different
value of attribute âdefaultSkinâ. Their members inherit this attribute
value.</p>
-<h2 id="ldap-or-external-identity-store-integration">LDAP or External Identity
Store Integration</h2>
+<h2 id="ldap-or-external-identity-store-integration">LDAP or External Identity
Store Integration<a class="headerlink"
href="#ldap-or-external-identity-store-integration" title="Permanent
link">¶</a></h2>
<p>Integrating external identity store is a common scenario for application
developers. Most common case is corporate LDAP or MSAD hosting users in Windows
Domain. However other custom solutions like Web Service or REST based services
for IDM are often spotted in organizations.</p>
<p>There are 3 ways such internal store can be integrated. At least âDirect
Integrationâ and âSynchronizationâ scenarios need to be addressed</p>
-<h3 id="scenario-direct-integration">Scenario - Direct Integration</h3>
+<h3 id="scenario-direct-integration">Scenario - Direct Integration<a
class="headerlink" href="#scenario-direct-integration" title="Permanent
link">¶</a></h3>
<p>In such case application developer replaces default JPA based identity
store implementation with custom one.</p>
<p>Few limitations apply in such case. Different identity storage services
(even LDAP) have certain limitations in compare to full blown IDM framework
API. For example LDAP cannot flexibly store any type of attribute unless LDAP
schema is extended - which is often not possible in the organization and
restricted by administrators. Other example is no direct or easy mapping of
roles - just simple notion if user is member of a group or not. Some of strict
LDAP schema implementations doesnât allow group without any member.</p>
<p>Other limitation is typically less flexible query mechanism. For example in
LDAP you cannot easily perform efficient query with multiple conditions that
would be sorted and paginated. With flexible Query API and big number of
identity entries in the store it is a rising issue. Implementing rich IDM
API/SPI can easily create performance bottlenecks</p>
-<h3 id="scenario-identity-store-routing">Scenario - Identity Store Routing</h3>
+<h3 id="scenario-identity-store-routing">Scenario - Identity Store Routing<a
class="headerlink" href="#scenario-identity-store-routing" title="Permanent
link">¶</a></h3>
<p>In this scenario application developer implements routing to invoke methods
on several identity stores and merge results. In simplest case part of user
attributes (limited by LDAP schema) and information about user roles are kept
in JPA implementation. Users and groups can be created in external store based
on routing configuration.</p>
<p>Limitations described in previous scenario still apply in this scenario.
Additionally it is easy to introduce serious performance bottlenecks. For
example If developer allows situation of having some users stored in database
and some in LDAP then queries become non trival. Any kind of more complex query
may involve retrieving all results from both sources, merging and applying sort
and pagination in the second step. With 500k entries in directory it is
impossible to perform such queries efficiently.</p>
-<h3 id="scenario-synchronization">Scenario - Synchronization</h3>
+<h3 id="scenario-synchronization">Scenario - Synchronization<a
class="headerlink" href="#scenario-synchronization" title="Permanent
link">¶</a></h3>
<p>In this scenario all identities are always kept in default JPA based
identity store. All queries are performed on it. External identity store
content is synchronized based on scheduled plan or event system. Many modern
LDAP stores expose feature called âchangelogâ. It is possible to obtain
small delta of frequent changes to apply.</p>
<p>Still some operations like authentication are performed directly on
external store. Reason is that modern authentication systems wonât expose
password but just validatePassword type of operation.</p>
<p>Examples:</p>
@@ -1418,7 +1438,7 @@ Examples:</p>
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified: websites/staging/deltaspike/trunk/content/draft/index2.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/draft/index2.html (original)
+++ websites/staging/deltaspike/trunk/content/draft/index2.html Sat Aug 1
21:44:56 2015
@@ -80,17 +80,28 @@
<div class="page-title">
<h1>Welcome to Apache DeltaSpike!</h1>
</div>
- <p>DeltaSpike consist of a number of portable CDI extensions
that provide useful features
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p>DeltaSpike consist of a number of portable CDI extensions that provide
useful features
for Java application developers.</p>
-<h2 id="goals">Goals</h2>
+<h2 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent
link">¶</a></h2>
<p>The goal of DeltaSpike is to create a de-facto standard of CDI-Extensions
that is
developed and maintained by a wealthy community. </p>
-<h2 id="portability">Portability</h2>
+<h2 id="portability">Portability<a class="headerlink" href="#portability"
title="Permanent link">¶</a></h2>
<p>We will also ensure true portability! We are testing DeltaSpike on
different CDI implementations like
Apache OpenWebBeans and JBoss Weld, and also on different Java EE servers like
Apache Tomcat and TomEE, JBoss AS7, Oracle GlassFish 3.1+, IBM WebSphere 8.x,
Oracle WebLogic Server 12c, Jetty, and others.</p>
-<h2 id="community">Community</h2>
+<h2 id="community">Community<a class="headerlink" href="#community"
title="Permanent link">¶</a></h2>
<p>For creating Apache DeltaSpike, we got many features contributed by
existing portable CDI extensions like Apache MyFaces CODI, JBoss Seam3 and
many others. Together they now form the base for the features of
DeltaSpike.</p>
@@ -100,7 +111,7 @@ many others. Together they now form the
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified:
websites/staging/deltaspike/trunk/content/draft/se-features-ranking.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/draft/se-features-ranking.html
(original)
+++ websites/staging/deltaspike/trunk/content/draft/se-features-ranking.html
Sat Aug 1 21:44:56 2015
@@ -80,14 +80,25 @@
<div class="page-title">
<h1>Features for JavaSE</h1>
</div>
- <p>This page is a starting point for the discussions to merge
features of MyFaces CODI and Seam3. This page just ranks <em>features which are
available for JavaSE applications</em> and the only dependency is the API of
CDI.</p>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<p>This page is a starting point for the discussions to merge features of
MyFaces CODI and Seam3. This page just ranks <em>features which are available
for JavaSE applications</em> and the only dependency is the API of CDI.</p>
<p>The donating teams list <em>all</em> features of the corresponding
code-base and rank them based on the priority for DeltaSpike (priority: 1...low
- 10...high).
In the 2nd column place a 'y' if a feature is important but the concept should
be changed a bit for DeltaSpike. Placing a 'n' doesn't mean that the
implementation won't change - it's just about the basic concept.
A team places a 'x' in the 4th column of the other project, if there are basic
objections about the <em>concept</em> itself.
The ranking as well as the objections will be discussed on the dev list.</p>
<p>This list does also contain a few Utils methods which will most times be of
public interest and thus be served in the +api+ modules.</p>
-<h1 id="myfaces-codi-feature-ranking">MyFaces CODI feature ranking</h1>
-<h2 id="core">Core</h2>
+<h1 id="myfaces-codi-feature-ranking">MyFaces CODI feature ranking<a
class="headerlink" href="#myfaces-codi-feature-ranking" title="Permanent
link">¶</a></h1>
+<h2 id="core">Core<a class="headerlink" href="#core" title="Permanent
link">¶</a></h2>
<p>|| Feature || "Requires" concept changes || Ranking || Objections ||
Discussion finished
| BeanManagerProvider | n | 10 | | (+) |
| ProjectStage | n | 10 | | (+) |
@@ -118,11 +129,11 @@ The ranking as well as the objections wi
* [https://cwiki.apache.org/confluence/display/EXTCDI/Core+Usage]
* [https://cwiki.apache.org/confluence/display/EXTCDI/Core+Config+and+SPI]
* [https://cwiki.apache.org/confluence/display/EXTCDI/Core+DevDoc]</p>
-<h2 id="i18n-module">I18n Module</h2>
+<h2 id="i18n-module">I18n Module<a class="headerlink" href="#i18n-module"
title="Permanent link">¶</a></h2>
<p>|| Feature || "Requires" concept changes || Ranking || Objections ||</p>
<p>(discussion postponed)</p>
-<h1 id="seam3-feature-ranking">Seam3 feature ranking</h1>
-<h2 id="solder">Solder</h2>
+<h1 id="seam3-feature-ranking">Seam3 feature ranking<a class="headerlink"
href="#seam3-feature-ranking" title="Permanent link">¶</a></h1>
+<h2 id="solder">Solder<a class="headerlink" href="#solder" title="Permanent
link">¶</a></h2>
<p>|| Feature || "Requires" changes || Ranking || Objections || Discussion
finished ||
|
[@Veto|https://github.com/seam/solder/blob/develop/api/src/main/java/org/jboss/solder/core/Veto.java]
| n | 10 | | (+) |
|
[@Requires|https://github.com/seam/solder/blob/develop/api/src/main/java/org/jboss/solder/core/Requires.java]
| y clean up, possibly rework for OWB. | 10 | x (behaviour non-spec conform;
doesn't work with OWB and Resin)| (+) |
@@ -141,16 +152,16 @@ The ranking as well as the objections wi
|
[VersionLoggerUtil|https://github.com/seam/solder/blob/develop/api/src/main/java/org/jboss/solder/core/VersionLoggerUtil.java]
| n | 2 |
| [Generic
Beans|https://github.com/seam/solder/tree/develop/impl/src/main/java/org/jboss/solder/bean/generic]
| y - need a better impl for hierarchical servers | up for debate |</p>
<p>[Solder
documentation|http://docs.jboss.org/seam/3/latest/reference/en-US/html/pt01.html]
not everything is completely documented as well as it ought to be :-( but
between that and the links to the source should be enough.</p>
-<h3 id="non-core-solder-parts">Non Core Solder Parts</h3>
+<h3 id="non-core-solder-parts">Non Core Solder Parts<a class="headerlink"
href="#non-core-solder-parts" title="Permanent link">¶</a></h3>
<p>|| Feature || "Requires" changes || Ranking || Objections ||
| Seam Config both xml and possible Java based \ | n | 10 |
| [Seam
Catch|https://github.com/seam/solder/tree/develop/api/src/main/java/org/jboss/solder/exception]
| n | 9 |
\</p>
-<h1 id="misc">Misc</h1>
-<h2 id="interdyn">InterDyn</h2>
+<h1 id="misc">Misc<a class="headerlink" href="#misc" title="Permanent
link">¶</a></h1>
+<h2 id="interdyn">InterDyn<a class="headerlink" href="#interdyn"
title="Permanent link">¶</a></h2>
<p>see https://github.com/struberg/InterDyn</p>
-<h1 id="approved-features-of-myfaces-codi-for-deltaspike">Approved features of
MyFaces CODI for DeltaSpike</h1>
-<h2 id="core_1">Core</h2>
+<h1 id="approved-features-of-myfaces-codi-for-deltaspike">Approved features of
MyFaces CODI for DeltaSpike<a class="headerlink"
href="#approved-features-of-myfaces-codi-for-deltaspike" title="Permanent
link">¶</a></h1>
+<h2 id="core_1">Core<a class="headerlink" href="#core_1" title="Permanent
link">¶</a></h2>
<p>|| Feature || Comment || Initial impl. finished || Tests finished ||
JavaDoc finished || Documentation finished || Review finished
| BeanManagerProvider | we move the util methods to BeanProvider | (+) | (+) |
(+) | (+) | (+) |
| BeanProvider | | (+) | (+) | (+) | (+) | (+) |
@@ -158,9 +169,9 @@ The ranking as well as the objections wi
| Deactivatable | | (+) | (+) | (+) | (+) | (+) |
| ProjectStageActivated | see Exclude | - | - | - | - | - |
| ExpressionActivated | see Exclude | - | - | - | - | - |</p>
-<h1 id="approved-features-of-seam3-for-deltaspike">Approved features of Seam3
for DeltaSpike</h1>
-<h2 id="solder_1">Solder</h2>
-<table>
+<h1 id="approved-features-of-seam3-for-deltaspike">Approved features of Seam3
for DeltaSpike<a class="headerlink"
href="#approved-features-of-seam3-for-deltaspike" title="Permanent
link">¶</a></h1>
+<h2 id="solder_1">Solder<a class="headerlink" href="#solder_1"
title="Permanent link">¶</a></h2>
+<table class="table">
<thead>
<tr>
<th></th>
@@ -184,17 +195,29 @@ The ranking as well as the objections wi
</tr>
</tbody>
</table>
-<h1 id="new-and-approved-deltaspike-features">New and approved DeltaSpike
features</h1>
-<h2 id="core_2">Core</h2>
-<p>|| Feature || Comment || Initial impl. finished || Tests finished ||
JavaDoc finished || Documentation finished || Review finished
-| Exclude | further discussions about the naming are needed.) | (+) | (+) |
(-) | (+) | (-) |</p>
+<h1 id="new-and-approved-deltaspike-features">New and approved DeltaSpike
features<a class="headerlink" href="#new-and-approved-deltaspike-features"
title="Permanent link">¶</a></h1>
+<h2 id="core_2">Core<a class="headerlink" href="#core_2" title="Permanent
link">¶</a></h2>
+<table class="table">
+<thead>
+<tr>
+<th></th>
+<th>Feature</th>
+<th></th>
+<th>Comment</th>
+<th></th>
+<th>Initial impl. finished</th>
+<th></th>
+</tr>
+</thead>
+<tbody></tbody>
+</table>
</div>
</div>
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified: websites/staging/deltaspike/trunk/content/index.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/index.html (original)
+++ websites/staging/deltaspike/trunk/content/index.html Sat Aug 1 21:44:56
2015
@@ -126,7 +126,7 @@
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified: websites/staging/deltaspike/trunk/content/retired/I18n.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/retired/I18n.html (original)
+++ websites/staging/deltaspike/trunk/content/retired/I18n.html Sat Aug 1
21:44:56 2015
@@ -80,7 +80,18 @@
<div class="page-title">
<h1>I18n</h1>
</div>
- <div class="toc">
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<div class="toc">
<ul>
<li><a href="#introduction">Introduction</a><ul>
<li><a href="#type-safe-messages">Type-safe messages</a><ul>
@@ -102,9 +113,9 @@
</ul>
</div>
<hr />
-<h1 id="introduction">Introduction</h1>
-<h2 id="type-safe-messages">Type-safe messages</h2>
-<h3 id="simple-use-case">Simple use-case</h3>
+<h1 id="introduction">Introduction<a class="headerlink" href="#introduction"
title="Permanent link">¶</a></h1>
+<h2 id="type-safe-messages">Type-safe messages<a class="headerlink"
href="#type-safe-messages" title="Permanent link">¶</a></h2>
+<h3 id="simple-use-case">Simple use-case<a class="headerlink"
href="#simple-use-case" title="Permanent link">¶</a></h3>
<p>The following implementation is the minimal effort to use type-safe
messages (which are hardcoded in this case).</p>
<p><strong>Simple type-safe message</strong></p>
<div class="codehilite"><pre><span class="p">@</span><span
class="n">MessageBundle</span>
@@ -178,23 +189,23 @@
</pre></div>
-<h2 id="dynamic-message-builder">Dynamic Message Builder</h2>
-<h3 id="creating-message-instances">Creating message instances</h3>
+<h2 id="dynamic-message-builder">Dynamic Message Builder<a class="headerlink"
href="#dynamic-message-builder" title="Permanent link">¶</a></h2>
+<h3 id="creating-message-instances">Creating message instances<a
class="headerlink" href="#creating-message-instances" title="Permanent
link">¶</a></h3>
<p>The following implementation creates an instance of <code>Message</code>
for the key <code>hello</code>. The final text will be resolved and
interpolated lazily. Later on it might be supported to provide a different
<code>MessageContext</code> via <code>#toString(MessageContext)</code> like it
is in MyFaces CODI right now.</p>
<p>[TODO]</p>
-<h3 id="customizing-the-message-context">Customizing the message context</h3>
-<h4 id="messageresolver">MessageResolver</h4>
+<h3 id="customizing-the-message-context">Customizing the message context<a
class="headerlink" href="#customizing-the-message-context" title="Permanent
link">¶</a></h3>
+<h4 id="messageresolver">MessageResolver<a class="headerlink"
href="#messageresolver" title="Permanent link">¶</a></h4>
<p>A message-resolver is responsible for creating the message-text based on
the message-descriptor (key or inline-text), the current locale (and in some
cases the message-payload).
(The supported format e.g. if it's required to escape a key, if inline-text is
supported,... depends on the concrete implementation.)
In case of a message-key, the message-resolver has to transform it to the
message-text by looking it up in a message source like a resource-bundle.</p>
<p><strong>Configuration of a message-resolver</strong></p>
<p>[TODO]</p>
<p>The result of a <code>MessageResolver</code> is the message-text. The text
might contain placeholders which are processed by a
<code>MessageInterpolator</code></p>
-<h4 id="messageinterpolator">MessageInterpolator</h4>
+<h4 id="messageinterpolator">MessageInterpolator<a class="headerlink"
href="#messageinterpolator" title="Permanent link">¶</a></h4>
<p>A <code>MessageInterpolator</code> replaces the placeholders in a
message-text with the arguments of the message.</p>
<p><strong>Configuration of a message-interpolator</strong></p>
<p>[TODO]</p>
-<h4 id="localeresolver">LocaleResolver</h4>
+<h4 id="localeresolver">LocaleResolver<a class="headerlink"
href="#localeresolver" title="Permanent link">¶</a></h4>
<p>A locale resolver provides the current locale. The locale is e.g. used to
by a <code>MessageResolver</code> to choose the correct language for the
message-text.</p>
<p><strong>Configuration of a locale-resolver</strong></p>
<p>[TODO]</p>
@@ -204,7 +215,7 @@ In case of a message-key, the message-re
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified: websites/staging/deltaspike/trunk/content/retired/_features.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/retired/_features.html (original)
+++ websites/staging/deltaspike/trunk/content/retired/_features.html Sat Aug 1
21:44:56 2015
@@ -80,7 +80,18 @@
<div class="page-title">
<h1>Feature Overview</h1>
</div>
- <h2 id="annotated-type-builder">Annotated Type Builder</h2>
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<h2 id="annotated-type-builder">Annotated Type Builder<a class="headerlink"
href="#annotated-type-builder" title="Permanent link">¶</a></h2>
<p>DeltaSpike provides an {{AnnotatedType}} implementation (and corresponding
implementations of the suite of Annotated interfaces from CDI) that should be
suitable for the needs of most portable extensions. The {{AnnotatedType}} is
created from {{AnnotatedTypeBuilder}}, typically in an extension's observer
method, as follows:</p>
<div class="codehilite"><pre><span class="nx">Modifying</span> <span
class="nx">an</span> <span class="nx">AnnotatedType</span>
<span class="kr">public</span> <span class="kr">class</span> <span
class="nx">NamingConventionAwareMetadataFilter</span> <span
class="kr">implements</span> <span class="nx">Extension</span>
@@ -136,7 +147,7 @@
* getJavaClass
* setJavaClass
* create</p>
-<h2 id="annotationinstanceprovider">AnnotationInstanceProvider</h2>
+<h2 id="annotationinstanceprovider">AnnotationInstanceProvider<a
class="headerlink" href="#annotationinstanceprovider" title="Permanent
link">¶</a></h2>
<p>DeltaSpike has the ability, with the AnnotationInstanceProvider class, to
dynamically create instances of annotations. These are useful for adding
annotations to bean metadata in extensions, adding qualifiers to events, etc.
Usage is very simple and straight forward. There are two public methods:
{{of(Class<T extends Annotation>)}} and {{of(Class<T extends Annotation>,
Map<String, ?>)}}. The first is simply a short cut passing an empty map to the
second. The map parameter is a map of values to be used for the members of the
annotation. The keys in the map must be the names of members in the annotation
(i.e. value, type, etc.). Simple usages are below.</p>
<div class="codehilite"><pre><span class="n">No</span> <span
class="n">Member</span> <span class="n">values</span>
<span class="n">RequestScoped</span> <span
class="n">requestScopedInstance</span> <span class="p">=</span> <span
class="n">AnnotationInstanceProvider</span><span class="p">.</span><span
class="n">of</span><span class="p">(</span><span
class="n">RequestScoped</span><span class="p">.</span><span
class="n">class</span><span class="p">);</span>
@@ -161,7 +172,7 @@
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified: websites/staging/deltaspike/trunk/content/retired/_modules.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/retired/_modules.html (original)
+++ websites/staging/deltaspike/trunk/content/retired/_modules.html Sat Aug 1
21:44:56 2015
@@ -80,7 +80,18 @@
<div class="page-title">
<h1>Modules</h1>
</div>
- <div class="toc">
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<div class="toc">
<ul>
<li><a href="#security">Security</a><ul>
<li><a
href="#securitybinding-for-class-and-method-invocations">SecurityBinding for
class and method invocations</a></li>
@@ -103,8 +114,8 @@
</ul>
</div>
<hr />
-<h1 id="security">Security</h1>
-<h2 id="securitybinding-for-class-and-method-invocations">SecurityBinding for
class and method invocations</h2>
+<h1 id="security">Security<a class="headerlink" href="#security"
title="Permanent link">¶</a></h1>
+<h2 id="securitybinding-for-class-and-method-invocations">SecurityBinding for
class and method invocations<a class="headerlink"
href="#securitybinding-for-class-and-method-invocations" title="Permanent
link">¶</a></h2>
<p>This feature of the security module functions by intercepting method calls,
and performing a security check before invocation is allowed to proceed.</p>
<p>In order to use the DeltaSpike security module, you must first have
installed the proper dependencies into your POM file. Once this is complete,
you may proceed to create a security parameter binding annotation. This is what
we will use to add security behavior to our business classes and methods.</p>
<div class="codehilite"><pre><span class="n">Create</span> <span
class="n">the</span> <span class="n">SecurityBinding</span>
@@ -188,8 +199,8 @@
<p>Our method is now secured, and we are able to use given parameter values as
part of our security authorizer!</p>
-<h2 id="integrating-3rd-party-security-frameworks">Integrating 3rd party
security frameworks</h2>
-<h3 id="secured">@Secured</h3>
+<h2 id="integrating-3rd-party-security-frameworks">Integrating 3rd party
security frameworks<a class="headerlink"
href="#integrating-3rd-party-security-frameworks" title="Permanent
link">¶</a></h2>
+<h3 id="secured">@Secured<a class="headerlink" href="#secured"
title="Permanent link">¶</a></h3>
<p>{{@Secured}} is build on {{@SecurityBindingType}} and a very simple
alternative to the rest of the security module.
It's a basic hook to integrate a custom security concept, 3rd party
frameworks,... . It doesn't provide a full blown security concept like the rest
of the security module, but other DeltaSpike modules ensure that the security
concepts are integrated properly (e.g. correct behaviour within custom scope
implementations,...). It just allows to integrate other security frameworks
easily.</p>
<p>(In MyFaces CODI it was originally a CDI interceptor. This part changed a
bit, because between the interceptor and {{@Secured}} is the
{{@SecurityBindingType}} concept which triggers {{@Secured}} as on possible
approach. Therefore the basic behaviour remains the same and you can think
about it like an interceptor.)</p>
@@ -217,7 +228,7 @@ It's a basic hook to integrate a custom
</pre></div>
-<h3 id="accessdecisionvoter">AccessDecisionVoter</h3>
+<h3 id="accessdecisionvoter">AccessDecisionVoter<a class="headerlink"
href="#accessdecisionvoter" title="Permanent link">¶</a></h3>
<p>This interface is (besides the {{Secured}} annotation) the most important
part of the concept. Both artifact types are also the only required parts.</p>
<div class="codehilite"><pre><span class="n">public</span> <span
class="n">class</span> <span class="n">CustomAccessDecisionVoter</span> <span
class="n">implements</span> <span class="n">AccessDecisionVoter</span>
<span class="p">{</span>
@@ -233,10 +244,10 @@ It's a basic hook to integrate a custom
<p>[TODO] hint about the changed parameter/s</p>
-<h3 id="securityviolation">SecurityViolation</h3>
+<h3 id="securityviolation">SecurityViolation<a class="headerlink"
href="#securityviolation" title="Permanent link">¶</a></h3>
<p>In case of a detected violation a {{SecurityViolation}} has to be added to
the result returned by the {{AccessDecisionVoter}}.</p>
<p>[TODO] AbstractAccessDecisionVoter</p>
-<h3 id="secured-and-stereotypes-with-custom-meta-data">@Secured and
Stereotypes with custom Meta-data</h3>
+<h3 id="secured-and-stereotypes-with-custom-meta-data">@Secured and
Stereotypes with custom Meta-data<a class="headerlink"
href="#secured-and-stereotypes-with-custom-meta-data" title="Permanent
link">¶</a></h3>
<p>If there are multiple {{AccessDecisionVoter}} and maybe in different
constellations, it's easier to provide an expressive CDI stereotypes for it.
Later on that also allows to change the behaviour in a central place.</p>
<div class="codehilite"><pre><span class="n">Stereotype</span> <span
class="n">support</span> <span class="n">of</span> <span
class="err">@</span><span class="n">Secured</span><span class="p">}</span>
<span class="err">@</span><span class="n">Named</span>
@@ -288,12 +299,12 @@ It's a basic hook to integrate a custom
<p>{code}</p>
-<h2 id="accessdecisionvotercontext">AccessDecisionVoterContext</h2>
+<h2 id="accessdecisionvotercontext">AccessDecisionVoterContext<a
class="headerlink" href="#accessdecisionvotercontext" title="Permanent
link">¶</a></h2>
<p>[TODO]</p>
-<h2 id="securitystrategy-spi">SecurityStrategy SPI</h2>
+<h2 id="securitystrategy-spi">SecurityStrategy SPI<a class="headerlink"
href="#securitystrategy-spi" title="Permanent link">¶</a></h2>
<p>[TODO]</p>
-<h1 id="jpa">JPA</h1>
-<h2 id="transactional">@Transactional</h2>
+<h1 id="jpa">JPA<a class="headerlink" href="#jpa" title="Permanent
link">¶</a></h1>
+<h2 id="transactional">@Transactional<a class="headerlink"
href="#transactional" title="Permanent link">¶</a></h2>
<p>This annotation is an alternative to transactional EJBs which allows to
execute a method within a transaction.
Before it's possible to start using the annotation, it's required to implement
a CDI producer for an {{EntityManager}} and it's needed to inject the
{{EntityManager}} in the bean which uses {{@Transactional}}. As shown later on
it's also possible to use multiple qualifiers for using different
{{EntityManager}}s.</p>
<p>The following example shows a simple producer for an {{EntityManager}} and
the corresponding dispose-method.
@@ -524,7 +535,7 @@ The example afterwards shows how to chan
<p>The final transaction handling for all {{EntityManager}} s is also done
after the outermost transactional method if {{NestedTransactionBean}} uses a
different {{EntityManager}}.
So it's possible to catch an exception in {{FirstLevelTransactionBean}} e.g.
to try an optional path instead of an immediate rollback.</p>
-<h2 id="transactionscoped">@TransactionScoped</h2>
+<h2 id="transactionscoped">@TransactionScoped<a class="headerlink"
href="#transactionscoped" title="Permanent link">¶</a></h2>
<p>{{@Transactional}} also starts a context which is available as long as the
transaction started by {{@Transactional}}. Besides other beans you can use this
scope for the {{EntityManager}} itself. That means the {{EntityManager}} will
be closed after leaving the method annotated with {{@Transactional}}.</p>
<div class="codehilite"><pre><span class="n">Producer</span> <span
class="k">for</span> <span class="n">the</span> <span class="n">default</span>
<span class="n">EntityManager</span> <span class="n">which</span> <span
class="n">should</span> <span class="n">be</span> <span class="n">used</span>
<span class="n">only</span> <span class="k">for</span> <span
class="n">one</span> <span class="n">transaction</span>
<span class="o">//</span><span class="p">...</span>
@@ -556,7 +567,7 @@ So it's possible to catch an exception i
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>
Modified: websites/staging/deltaspike/trunk/content/retired/bean-validation.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/retired/bean-validation.html
(original)
+++ websites/staging/deltaspike/trunk/content/retired/bean-validation.html Sat
Aug 1 21:44:56 2015
@@ -80,7 +80,18 @@
<div class="page-title">
<h1>Bean Validation Module</h1>
</div>
- <div class="toc">
+ <style type="text/css">
+/* The following code is added by mdx_elementid.py
+ It was originally lifted from http://subversion.apache.org/style/site.css */
+/*
+ * Hide class="elementid-permalink", except when an enclosing heading
+ * has the :hover property.
+ */
+.headerlink, .elementid-permalink {
+ visibility: hidden;
+}
+h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink,
h6:hover > .headerlink, h4:hover > .headerlink, h5:hover > .headerlink,
dt:hover > .elementid-permalink { visibility: visible }</style>
+<div class="toc">
<ul>
<li><a href="#introduction">Introduction</a><ul>
<li><a href="#scoping">Scoping</a></li>
@@ -90,11 +101,11 @@
</ul>
</div>
<hr />
-<h1 id="introduction">Introduction</h1>
+<h1 id="introduction">Introduction<a class="headerlink" href="#introduction"
title="Permanent link">¶</a></h1>
<p>The main feature of the Bean Validation module is to provide CDI
integration in to <code>ConstraintValidator</code>s. This allows you to inject
CDI objects, EJBs etc in to your validators.</p>
-<h2 id="scoping">Scoping</h2>
+<h2 id="scoping">Scoping<a class="headerlink" href="#scoping" title="Permanent
link">¶</a></h2>
<p><code>ConstraintValidator</code>s will inherit whatever scope as defined in
the bean class. Inherently, a <code>ConstraintValidator</code> may be invoked
by multiple threads so please keep that in mind when using them. You should
consider using at least <code>RequestScoped</code> validators.</p>
-<h2 id="code-requirements">Code Requirements</h2>
+<h2 id="code-requirements">Code Requirements<a class="headerlink"
href="#code-requirements" title="Permanent link">¶</a></h2>
<p>There are no compile dependencies to use the Bean Validation module. You
simply need to override the factory, either in Java:</p>
<div class="codehilite"><pre><span class="n">Validation</span><span
class="o">.</span><span class="na">byDefaultProvider</span><span
class="o">().</span><span class="na">configure</span><span
class="o">().</span><span class="na">constraintValidatorFactory</span><span
class="o">(</span><span class="k">new</span> <span
class="n">CDIAwareConstraintValidatorFactory</span><span
class="o">()).</span><span class="na">buildValidatorFactory</span><span
class="o">()</span>
</pre></div>
@@ -116,7 +127,7 @@
<hr>
<footer>
- <p>Copyright © 2011-2014 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
+ <p>Copyright © 2011-2015 The Apache Software Foundation, Licensed
under the Apache License, Version 2.0.</p>
<p>Apache and the Apache feather logo are trademarks of The Apache
Software Foundation.</p>
</footer>