SeamFramework.orgCommunity Documentation

Seam Documentation

Reference Guide

3.1.0.Final


1. Credits
1.1. List of contributors
1.2. Would you like to contribute?
2. Seam
2.1. Overview
2.2. Seam Bill of Materials
I. Solder
Introduction
3. Getting Started
3.1. Maven dependency configuration
3.2. Transitive dependencies
3.3. Pre-Servlet 3.0 configuration
4. Enhancements to the CDI Programming Model
4.1. Preventing a class from being processed
4.1.1. @Veto
4.1.2. @Requires
4.2. @Exact
4.3. @Client
4.4. Named packages
4.5. @FullyQualified bean names
5. Annotation Literals
6. Evaluating Unified EL
6.1. @Resolver
7. Injecting Resources and System Properties
7.1. Resource Loading
7.1.1. Extending the Resource Loader
7.2. System Properties
8. Logging, redesigned
8.1. JBoss Logging: The foundation
8.2. Solder Logging: Feature set
8.3. Typed loggers
8.4. Native logger API
8.5. Typed message bundles
8.6. Implementation classes
8.6.1. Generating the implementation classes
8.6.2. Including the implementation classes in Arquillian tests
9. Annotation and AnnotatedType Utilities
9.1. Annotated Type Builder
9.2. Annotation Instance Provider
9.3. Annotation Inspector
9.4. Synthetic Qualifiers
9.5. Reflection Utilities
10. Obtaining a reference to the BeanManager
11. Bean Utilities
12. Property Utilities
12.1. Working with properties
12.2. Querying for properties
12.3. Property Criteria
12.3.1. AnnotatedPropertyCriteria
12.3.2. NamedPropertyCriteria
12.3.3. TypedPropertyCriteria
12.3.4. Creating a custom property criteria
12.4. Fetching the results
13. Unwrapping Producer Methods
14. Default Beans
15. Generic Beans
15.1. Using generic beans
15.2. Defining Generic Beans
16. Service Handler
17. XML Configuration Introduction
17.1. Getting Started
17.2. The Princess Rescue Example
18. Solder Config XML provider
18.1. XML Namespaces
18.2. Adding, replacing and modifying beans
18.3. Applying annotations using XML
18.4. Configuring Fields
18.4.1. Initial Field Values
18.4.2. Inline Bean Declarations
18.5. Configuring methods
18.6. Configuring the bean constructor
18.7. Overriding the type of an injection point
18.8. Configuring Meta Annotations
18.9. Virtual Producer Fields
18.10. More Information
Introduction
19. Installation
19.1. Pre-Servlet 3.0 configuration
20. Servlet event propagation
20.1. Servlet context lifecycle events
20.2. Application initialization
20.3. Servlet request lifecycle events
20.4. Servlet response lifecycle events
20.5. Servlet request context lifecycle events
20.6. Session lifecycle events
20.7. Session activation events
21. Injectable Servlet objects and request state
21.1. @Inject @RequestParam
21.2. @Inject @HeaderParam
21.3. @Inject ServletContext
21.4. @Inject ServletRequest / HttpServletRequest
21.5. @Inject ServletResponse / HttpServletResponse
21.6. @Inject HttpSession
21.7. @Inject HttpSessionStatus
21.8. @Inject @ContextPath
21.9. @Inject List<Cookie>
21.10. @Inject @CookieParam
21.11. @Inject @ServerInfo
21.12. @Inject @Principal
22. Servlet Exception Handling Integration
22.1. Background
22.2. Defining a exception handler for a web request
23. Retrieving the BeanManager from the servlet context
24. Loading web resources without ServletContext
25. Exception Handling - Introduction
25.1. How Solder's Exception Handling Works
26. Exception Handling - Usage
26.1. Eventing into the exception handling framework
26.1.1. Manual firing of the event
26.1.2. Using the @ExceptionHandled Interceptor
26.2. Exception handlers
26.3. Exception handler annotations
26.3.1. @HandlesExceptions
26.3.2. @Handles
26.4. Exception chain processing
26.5. Exception handler ordering
26.5.1. Traversal of exception type hierarchy
26.5.2. Handler precedence
26.6. APIs for exception information and flow control
26.6.1. CaughtException
26.6.2. ExceptionStack
27. Exception handling - Advanced Features
27.1. Exception Modification
27.1.1. Introduction
27.1.2. Usage
27.2. Filtering Stack Traces
27.2.1. Introduction
27.2.2. ExceptionStackOutput
27.2.3. StackFrameFilter
27.2.4. StackFrameFilterResult
27.2.5. StackFrame
28. Exception Handling - Framework Integration
28.1. Creating and Firing an ExceptionToCatch event
28.2. Default Handlers and Qualifiers
28.2.1. Default Handlers
28.2.2. Qualifiers
28.3. Supporting ServiceHandlers
28.4. Programmatic Handler Registration
Exception Handling - Glossary
II. Seam Persistence
29. Seam Persistence Reference
29.1. Introduction
29.2. Getting Started
29.3. Seam-managed persistence contexts
29.3.1. Using a Seam-managed persistence context with JPA
29.3.2. Seam-managed persistence contexts and atomic conversations
29.3.3. Using EL in EJB-QL/HQL
29.3.4. Setting up the EntityManager
III. Seam Transaction
30. Seam Transaction Reference
30.1. Introduction
30.2. Transaction Management
30.2.1. Configuration
30.2.2. Declarative Transaction Management
30.2.3. ServletRequestListener
IV. Seam Security
31. Security - Introduction
31.1. Overview
31.1.1. Authentication
31.1.2. Identity Management
31.1.3. External Authentication
31.1.4. Authorization
31.2. Configuration
31.2.1. Maven Dependencies
31.2.2. Enabling the Security Interceptor
32. Security - Authentication
32.1. Basic Concepts
32.2. Built-in Authenticators
32.3. Which Authenticator will Seam use?
32.4. Writing a custom Authenticator
33. Security - Identity Management
33.1. Overview
33.2. Configuring Seam to use Identity Management with JPA
33.2.1. Recommended database schema
33.2.2. The @IdentityEntity and @IdentityProperty annotations
33.2.3. Identity Object
33.2.4. Credential
33.2.5. Identity Object Relationship
33.2.6. Attributes
33.3. Managing Users, Groups and Roles
33.3.1. Managing Users and Groups
33.3.2. Managing Relationships
33.3.3. Managing Roles
34. Security - External Authentication
34.1. Introduction
34.1.1. Configuration
34.2. OpenID
34.2.1. Overview
34.2.2. Enabling OpenID for your application
34.2.3. Choosing which OpenID provider to use
34.2.4. Managing the OpenID authentication process
35. Security - Authorization
35.1. Configuration
35.2. Basic Concepts
35.2.1. IdentityType
35.2.2. User
35.2.3. Group
35.2.4. Role
35.2.5. RoleType
35.3. Role and Group-based authorization
35.4. Typesafe authorization
35.4.1. Creating a typesafe security binding
35.4.2. Creating an authorizer method
35.4.3. Applying the binding to your business methods
35.4.4. Built-in security binding annotations
36. Security - Events
36.1. Introduction
36.2. Event list
36.3. Usage Example
V. Seam International
Introduction
37. Installation
38. Locales
38.1. Application Locale
38.2. User Locale
38.3. Available Locales
39. Timezones
39.1. Joda Time
39.2. Application TimeZone
39.3. User TimeZone
39.4. Available TimeZones
40. Messages
40.1. Message Creation
40.2. Properties Files
VI. Seam Faces
Introduction
41. Installation
41.1. Maven dependency configuration
41.2. Pre-Servlet 3.0 configuration
41.3. How to setup JSF in a Java EE 6 webapp
42. Faces Scoping Support
42.1. @RenderScoped
42.2. @Inject javax.faces.context.Flash flash
42.3. @ViewScoped
43. Messages API
43.1. Adding Messages
43.2. Displaying pending messages
44. Locale
45. Seam Faces Components
45.1. Introduction
45.2. <s:validateForm>
45.3. <s:viewAction>
45.3.1. Motivation
45.3.2. Usage
45.3.3. View actions vs the PreRenderViewEvent
45.4. ObjectConverter
45.5. UI Input Container
46. Faces Artifact Injection
46.1. @*Scoped and @Inject in Validators and Converters
46.2. @Inject'able Faces Artifacts
47. Faces Events Propagation
47.1. JSF Phase events
47.1.1. Seam Faces Phase events
47.1.2. Phase events listing
47.2. JSF system events
47.2.1. Seam Faces System events
47.2.2. System events listing
47.2.3. Component system events
48. Project Stage Support
48.1. Project Stage Injection
48.2. Restricting Bean Activation
49. Faces View Configuration
49.1. Configuration With Annotated Enums
49.2. Configuring View Restrictions
49.2.1. Writing Seam security Annotations
49.2.2. Applying the Security Restrictions
49.2.3. Changing the Restriction Phases
49.3. Configuring URL Rewriting
49.4. Configuring "faces-redirect"
VII. Seam Reports
Introduction
50. Installation
50.1. Installation using Seam Forge
50.1.1. Plugin Installation
50.1.2. Plugin Configuration
51. Usage
51.1. Quick Start
51.2. Annotations
51.3. Troubleshooting
VIII. Seam Mail
52. Seam Mail Introduction
52.1. Getting Started
53. Configuration
53.1. Minimal Configuration
54. Core Usage
54.1. Intro
54.2. Contacts
54.2.1. String Based
54.2.2. InternetAddress
54.2.3. EmailContact
54.2.4. Content
54.2.5. Attachments
55. Templating
55.1. Velocity
55.2. Freemarker
56. Advanced Features
56.1. MailTransporter
56.2. MailConfig
IX. Seam Remoting
57. Seam Remoting - Basic Features
57.1. Configuration
57.1.1. Dynamic type loading
57.2. The "Seam" object
57.2.1. A Hello World example
57.2.2. Seam.createBean
57.3. The Context
57.3.1. Setting and reading the Conversation ID
57.3.2. Remote calls within the current conversation scope
57.4. Working with Data types
57.4.1. Primitives / Basic Types
57.4.2. JavaBeans
57.4.3. Dates and Times
57.4.4. Enums
57.4.5. Collections
57.5. Debugging
57.6. Messages
57.7. Handling Exceptions
57.8. The Loading Message
57.8.1. Changing the message
57.8.2. Hiding the loading message
57.8.3. A Custom Loading Indicator
57.9. Controlling what data is returned
57.9.1. Constraining normal fields
57.9.2. Constraining Maps and Collections
57.9.3. Constraining objects of a specific type
57.9.4. Combining Constraints
58. Seam Remoting - Model API
58.1. Introduction
58.2. Model Operations
58.3. Fetching a model
58.3.1. Fetching a bean value
58.4. Modifying model values
58.5. Expanding a model
58.6. Applying Changes
59. Seam Remoting - Bean Validation
59.1. Validating a single object
59.2. Validating a single property
59.3. Validating multiple objects and/or properties
59.4. Validation groups
59.5. Handling validation failures
X. Seam REST
Introduction
60. Installation
60.1. Basics
60.2. Transitive dependencies
60.3. Registering JAX-RS components explicitly
60.4. Servlet container support
61. Exception Handling
61.1. Solder Exception Handling Integration
61.2. Declarative Exception Mapping
61.2.1. Annotation-based configuration
61.2.2. XML configuration
61.2.3. Declarative exception mapping processing
62. Bean Validation Integration
62.1. Validating HTTP requests
62.1.1. Validating entity body
62.1.2. Validating resource fields
62.1.3. Validating other method parameters
62.2. Validation configuration
62.3. Using validation groups
63. Templating support
63.1. Creating JAX-RS responses using templates
63.1.1. Accessing the model
63.2. Built-in support for templating engines
63.2.1. FreeMarker
63.2.2. Apache Velocity
63.2.3. Pluggable support for templating engines
63.2.4. Selecting preferred templating engine
64. RESTEasy Client Framework Integration
64.1. Using RESTEasy Client Framework with Seam REST
64.2. Manual ClientRequest API
64.3. Client Executor Configuration
65. Seam REST Dependencies
65.1. Transitive Dependencies
65.2. Optional dependencies
65.2.1. FreeMarker
65.2.2. Apache Velocity
65.2.3. RESTEasy
XI. Seam JCR
66. Seam JCR - Introduction
66.1. Introduction
66.2. Maven dependency configuration
67. Seam JCR - JBoss ModeShape Integration
67.1. ModeShape Integration Installation
67.2. Usage
68. Seam JCR - JackRabbit Integration
68.1. JackRabbit Integration Installation
68.2. Usage
69. Seam JCR - Event Mapping
69.1. Introduction to Event Mapping
69.2. Observing JMS events
70. Seam JCR - Object Content Mapping
70.1. What is Object Content Mapping?
70.2. Mapping and Conversion Capabilities
70.3. JCR Data Access Objects
XII. Seam JMS
71. Introduction
71.1. Mission statement
71.2. Seam 3 JMS Module Overview
72. Installation
73. Resource Injection
73.1. JMS Resource Injection
73.1.1. Destination Based Injection
73.1.2. Resource Configuration
73.2. Module Extensions
74. Messaging API
74.1. QueueBuilder and TopicBuilder
74.2. Message Manager
74.3. Durable Messaging Capabilities
74.4. MessageListeners versus Message Driven Beans
75. Bridging the Gap
75.1. Event Routing
75.1.1. Routes
75.2. Routing CDI Events to JMS
75.2.1. Usage
75.3. CDI Events from JMS Messages
75.3.1. Usage
76. Annotation Routing APIs
76.1. Observer Method Interfaces
XIII. Seam Validation
77. Introduction
78. Installation
78.1. Prerequisites
78.2. Maven setup
78.3. Manual setup
79. Dependency Injection
79.1. Retrieving of validator factory and validators via dependency injection
79.2. Dependency injection for constraint validators
80. Method Validation
XIV. Seam Social
Introduction
81. Getting Started
82. Seam Social in 5 minutes
82.1. Declaring an OAuth Configuration
82.2. Configuration with a producer method or a bean definition
82.3. Injecting the Service Bean into your code
82.4. Request the OAuth authorization URL
82.5. Set the verifier and initiate connection
82.6. Send request to the service
83. Seam Social Qualifiers and Beans
83.1. Service Qualifiers
83.2. Basic JSON Beans
83.3. Beans created by @OAuthApplication
84. Seam Social Advanced Usage
84.1. Working with Multi Service Manager
84.2. Provided Modules
84.3. Extending Seam Social
XV. Seam Spring
85. Seam Spring - Introduction
85.1. Features
86. Seam Spring - Installation
86.1. Maven dependency configuration
87. Seam Spring - Architecture and Usage
87.1. Accessing Spring artifacts from CDI
87.1.1. Accessing Spring application contexts
87.1.2. Exposing Spring beans as CDI beans
87.2. Importing CDI beans into Spring applications
87.2.1. Registering a BeanManager
87.2.2. Importing a CDI bean as a Spring bean
XVI. Seam Wicket
Introduction
88. Installation
89. Seam for Apache Wicket Features
89.1. Injection
89.2. Conversation Control
89.3. Conversation Propagation