Class AudienceFilter
- java.lang.Object
-
- de.hsh.graja.comment.applicability.ApplicabilityFilter
-
- de.hsh.graja.comment.applicability.AudienceFilter
-
- All Implemented Interfaces:
IncludeInfo
,Serializable
public class AudienceFilter extends ApplicabilityFilter
This class can filter artifacts with an applicablity depending on the audience. If you want to construct more complex filters, have a look at
ApplicabilityFilterChain
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AudienceFilter
STUDENT_OR_BOTH
This filter lets pass all artifacts with audienceAudience.STUDENT
orAudience.BOTH
.static AudienceFilter
TEACHER_OR_BOTH
This filter lets pass all artifacts with audienceAudience.TEACHER
orAudience.BOTH
.-
Fields inherited from class de.hsh.graja.comment.applicability.ApplicabilityFilter
PASS_ALL
-
-
Constructor Summary
Constructors Constructor Description AudienceFilter(Audience audience)
Create a filter, that lets pass all artifacts, whose audience is broader than or equals to the givenaudience
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
passesThrough(Applicability applicability)
This method checks, whether a artifact with givenapplicability
would pass the filter.String
toString()
-
-
-
Field Detail
-
TEACHER_OR_BOTH
public static final AudienceFilter TEACHER_OR_BOTH
This filter lets pass all artifacts with audienceAudience.TEACHER
orAudience.BOTH
.
-
STUDENT_OR_BOTH
public static final AudienceFilter STUDENT_OR_BOTH
This filter lets pass all artifacts with audienceAudience.STUDENT
orAudience.BOTH
.
-
-
Constructor Detail
-
AudienceFilter
public AudienceFilter(Audience audience)
Create a filter, that lets pass all artifacts, whose audience is broader than or equals to the givenaudience
.- Parameters:
audience
- specifies the passing artifacts.
-
-
Method Detail
-
passesThrough
public boolean passesThrough(Applicability applicability)
Description copied from class:ApplicabilityFilter
This method checks, whether a artifact with givenapplicability
would pass the filter.- Specified by:
passesThrough
in classApplicabilityFilter
- Parameters:
applicability
- the query applicability- Returns:
- true, if the parameter
applicability
is broader than or equal to the audience represented by this filter.
-
-