Annotation Type PortletLifecycleFilter
-
@Retention(RUNTIME) @Target(TYPE) public @interface PortletLifecycleFilter
Designates a portlet request filter class. The request filter performs filtering tasks on either the request to a portlet, on the response from a portlet, or on both.Request filters perform filtering in the doFilter method. Every Filter has access to a FilterConfig object from which it can obtain its initialization parameters and a reference to the PortletContext object. It can to load resources needed for filtering tasks through the PortletContext object.
Request filters can be applied to the Action phase, the Event phase, the Render phase or the Resource phase depending on which of the filter interfaces the request filter class implements.
The annotated type must implement one or more of the following interfaces:
- jakarta.portlet.filter.PortletFilter
- jakarta.portlet.filter.ActionFilter
- jakarta.portlet.filter.EventFilter
- jakarta.portlet.filter.RenderFilter
- jakarta.portlet.filter.ResourceFilter
- Since:
- 3.0
- See Also:
PortletFilter,ActionFilter,EventFilter,RenderFilter,ResourceFilter
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description LocaleString[]descriptionThe portlet filter description providing locale-specific text describing the portlet filter for use by the portal application or by tools.LocaleString[]displayNameThe display-name type contains a language-specific short name that is intended to be displayed by tools.StringfilterNameThe filter name.InitParameter[]initParamsThe filter initialization parameters.intordinalThe ordinal number for this annotated method.String[]portletNamesThe portlet names for which the request filter applies.
-
-
-
Element Detail
-
filterName
String filterName
The filter name.The filter name is not required. If a filter name is provided, the filter configuration may be addressed through the filter name in the portlet deployment descriptor to modify the filter or filter mapping.
- Returns:
- The filter name
- Default:
- ""
-
-
-
portletNames
String[] portletNames
The portlet names for which the request filter applies.The annotated request filter can apply to multiple portlets within the portlet application. The names of the portlets to which the request filter applies must be specified in this field.
A wildcard character '*' can be specified in the first portletName array element to indicate that the request filter is to apply to all portlets in the portlet application. If specified, the wildcard character must appear alone in the first array element.
- Returns:
- The portlet names
- Default:
- {"*"}
-
-
-
initParams
InitParameter[] initParams
The filter initialization parameters.- Returns:
- An array of initialization parameters
- Default:
- {}
-
-
-
displayName
LocaleString[] displayName
The display-name type contains a language-specific short name that is intended to be displayed by tools.- Returns:
- The display name
- Default:
- {}
-
-
-
description
LocaleString[] description
The portlet filter description providing locale-specific text describing the portlet filter for use by the portal application or by tools.- Returns:
- The portlet description
- Default:
- {}
-
-
-
ordinal
int ordinal
The ordinal number for this annotated method.The ordinal number determines the order of execution if multiple methods are annotated for a given request type. Annotated methods with a lower ordinal number are executed before methods with a higher ordinal number.
- Returns:
- The ordinal number
- Default:
- 0
-
-