@ejbgen:method-permission-pattern Annotation

This specifies security roles authorized to invoke the methods matching a given pattern.

Scope

Class tag on session and entity beans.

Syntax

@ejbgen:method-permission-pattern

[id="TagID"]

[interface="InterfaceOption"]

pattern="Pattern"

roles="RolesList"

Attributes

id

Optional. Specifies the ID of the tag. For more information, see EJBGen Tag Inheritance.

interface

Optional. Specifies the interface containing the methods that will be tested against the pattern. Valid values are Home, Remote, LocalHome, and Local. In other words, you can for instance specify that the pattern given in this attribute should only be matched against the methods defined in the local (business) interface. If not specified, all methods are considered.

pattern

Required. Specifies the method to which the specified roles applies. To make these applicable to all methods, use the '*' wildcard. It is not possible to use a combination of wildcard and letters.

roles

Required. Defines a comma-separated list of EJB-scoped security roles that are allowed to invoke the methods matching the pattern and interface attributes. These EJB-scoped security roles must be defined using the @ejbgen:role-mapping Annotation. For more information, see Role-Based Security.

Remarks

Security roles are not set on finder methods, and are not considered by the @ejbgen:method-permission-pattern tag during pattern matching.

Related Topics

Role-Based Security

@ejbgen:local-home-method Annotation

@ejbgen:local-method Annotation