org.apache.felix.scr.annotations.sling
Annotation Type SlingFilter


@Target(value=TYPE)
@Retention(value=SOURCE)
@Documented
public @interface SlingFilter

Marks servlet classes as SCR component, and allows to add a filter to Sling's processing. This annotation generates to private properties for the order and the scope. By default it also generates a component and a service tag, but this generation can be overriden.


Required Element Summary
 int order
          The order of the filter.
 
Optional Element Summary
 String description
          This is generally used as a description for the object described by the meta type.
 boolean generateComponent
          Whether to generate a default SCR component tag with.
 boolean generateService
          Whether to generate a default SCR service tag with "interface=javax.servlet.Filter".
 String label
          This is generally used as a title for the object described by the meta type.
 boolean metatype
          Whether Metatype Service data is generated or not.
 String name
          Defines the Component name also used as the PID for the Configuration Admin Service.
 SlingFilterScope scope
          The scope of a filter.
 

Element Detail

order

public abstract int order
The order of the filter. This value is used to sort the filters. Filters with a lower order are executed before a filter with a higher order. If two filters have the same order, they are executed in an undefined order.

scope

public abstract SlingFilterScope scope
The scope of a filter. If the filter has request scope, it is run once for a request. If the filter has component scope, it is run once for every included component (rendering).

Default:
org.apache.felix.scr.annotations.sling.SlingFilterScope.REQUEST

generateComponent

public abstract boolean generateComponent
Whether to generate a default SCR component tag with. If set to false, a Component annotation can be added manually with defined whatever configuration needed.

Default:
true

generateService

public abstract boolean generateService
Whether to generate a default SCR service tag with "interface=javax.servlet.Filter". If set to false, a Service annotation can be added manually with defined whatever configuration needed.

Default:
true

name

public abstract String name
Defines the Component name also used as the PID for the Configuration Admin Service. Default value: Fully qualified name of the Java class.

Default:
""

metatype

public abstract boolean metatype
Whether Metatype Service data is generated or not. If this parameter is set to true Metatype Service data is generated in the metatype.xml file for this component. Otherwise no Metatype Service data is generated for this component.

Default:
false

label

public abstract String label
This is generally used as a title for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default value: %<name>.name

Default:
""

description

public abstract String description
This is generally used as a description for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default value: %<name>.description

Default:
""


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.