ObserverSpec.Builder
public final class ObserverSpec.Builder
Builder for ObserverSpec instances.
Summary
Public constructors |
|---|
Builder() |
Public methods |
|
|---|---|
@NonNull ObserverSpec.Builder |
addFilterDocumentClasses(@NonNull Class[] documentClasses)Restricts an observer using this spec to triggering only for documents of one of the provided document classes. |
@NonNull ObserverSpec.Builder |
addFilterDocumentClasses(Restricts an observer using this spec to triggering only for documents of one of the provided document classes. |
@NonNull ObserverSpec.Builder |
addFilterSchemas(@NonNull String[] schemas)Restricts an observer using this spec to triggering only for documents of one of the provided schema types. |
@NonNull ObserverSpec.Builder |
addFilterSchemas(@NonNull Collection<String> schemas)Restricts an observer using this spec to triggering only for documents of one of the provided schema types. |
@NonNull ObserverSpec |
build()Constructs a new |
Public constructors
Public methods
addFilterDocumentClasses
public @NonNull ObserverSpec.Builder addFilterDocumentClasses(@NonNull Class[] documentClasses)
Restricts an observer using this spec to triggering only for documents of one of the provided document classes.
If unset, the observer will match documents of all types.
Merged list available from getFilterSchemas.
addFilterDocumentClasses
public @NonNull ObserverSpec.Builder addFilterDocumentClasses(
@NonNull Collection<Class<Object>> documentClasses
)
Restricts an observer using this spec to triggering only for documents of one of the provided document classes.
If unset, the observer will match documents of all types.
Merged list available from getFilterSchemas.
| Parameters | |
|---|---|
@NonNull Collection<Class<Object>> documentClasses |
classes annotated with |
addFilterSchemas
public @NonNull ObserverSpec.Builder addFilterSchemas(@NonNull String[] schemas)
Restricts an observer using this spec to triggering only for documents of one of the provided schema types.
If unset, the observer will match documents of all types.
addFilterSchemas
public @NonNull ObserverSpec.Builder addFilterSchemas(@NonNull Collection<String> schemas)
Restricts an observer using this spec to triggering only for documents of one of the provided schema types.
If unset, the observer will match documents of all types.
build
public @NonNull ObserverSpec build()
Constructs a new ObserverSpec from the contents of this builder.