Annotation Interface UseCase
@Documented
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@Repeatable(UseCases.class)
public @interface UseCase
An annotation that can be used for extension points in order to explain a specific use case that can be accomplished using this extension. For components that are able to be used for multiple use cases, the component may be annotated with multiple UseCase annotations.
Note that this annotation differs from CapabilityDescription
in that CapabilityDescription should describe the
general purpose of the extension point. UseCase, on the other hand, documents one very specific use case that
can be accomplished. Some extension points may use only a single UseCase annotation while others may accomplish
many use cases.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionA simple 1 (at most 2) sentence description of the use case. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionA description of how to configure the extension for this particular use case.Most Processors specify an InputRequirement of eitherINPUT_REQUIRED
orInputRequirement.Requirement.INPUT_FORBIDDEN
.String[]
An optional array of keywords that can be associated with the use case.Most of the time, 1-2 sentences is sufficient to describe a use case.
-
Element Details
-
description
String descriptionA simple 1 (at most 2) sentence description of the use case. This should not include any extraneous details, such as caveats, examples, etc. Those can be provided using thenotes()
method.- Returns:
- a simple description of the use case
-
notes
String notesMost of the time, 1-2 sentences is sufficient to describe a use case. Those 1-2 sentence should then be returned by thedescription()
. In the event that the description is not sufficient, details may be provided to further explain, by providing examples, caveats, etc.- Returns:
- any important notes that pertain to the use case
- Default:
""
-
inputRequirement
InputRequirement.Requirement inputRequirementMost Processors specify an InputRequirement of eitherINPUT_REQUIRED
orInputRequirement.Requirement.INPUT_FORBIDDEN
. However, some Processors useInputRequirement.Requirement.INPUT_ALLOWED
because some use cases require input while others do not. The inputRequirement here is only relevant for Processors that use an InputRequirement ofInputRequirement.Requirement.INPUT_ALLOWED
and can indicate whether or not the Processor should have input (aka incoming Connections) for this particular use case.- Returns:
- the
InputRequirement
that corresponds to this use case.
- Default:
INPUT_ALLOWED
-
keywords
String[] keywordsAn optional array of keywords that can be associated with the use case.- Returns:
- keywords associated with the use case
- Default:
{}
-
configuration
String configurationA description of how to configure the extension for this particular use case.- Returns:
- a description of how to configure the extension for this particular use case.
- Default:
""
-