Class AudienceFilter
java.lang.Object
de.hsh.graja.comment.applicability.ApplicabilityFilter
de.hsh.graja.comment.applicability.AudienceFilter
- All Implemented Interfaces:
IncludeInfo,Serializable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AudienceFilterThis filter lets pass all artifacts with audienceAudience.STUDENTorAudience.BOTH.static final AudienceFilterThis filter lets pass all artifacts with audienceAudience.TEACHERorAudience.BOTH.Fields inherited from class de.hsh.graja.comment.applicability.ApplicabilityFilter
PASS_ALL -
Constructor Summary
ConstructorsConstructorDescriptionAudienceFilter(Audience audience) Create a filter, that lets pass all artifacts, whose audience is broader than or equals to the givenaudience. -
Method Summary
Modifier and TypeMethodDescriptionbooleanpassesThrough(Applicability applicability) This method checks, whether a artifact with givenapplicabilitywould pass the filter.toString()
-
Field Details
-
TEACHER_OR_BOTH
This filter lets pass all artifacts with audienceAudience.TEACHERorAudience.BOTH. -
STUDENT_OR_BOTH
This filter lets pass all artifacts with audienceAudience.STUDENTorAudience.BOTH.
-
-
Constructor Details
-
AudienceFilter
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 Details
-
passesThrough
Description copied from class:ApplicabilityFilterThis method checks, whether a artifact with givenapplicabilitywould pass the filter.- Specified by:
passesThroughin classApplicabilityFilter- Parameters:
applicability- the query applicability- Returns:
- true, if the parameter
applicabilityis broader than or equal to the audience represented by this filter.
-
toString
-