Package org.mcpjava.server.content
Interface Annotations.Builder
- Enclosing interface:
Annotations
public static interface Annotations.Builder
Builder for resource annotations
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the resource annotationssetAudience(Set<Role> roles) Sets the intended audience for the contentsetAudience(Role... roles) Sets the intended audience for the contentsetLastModified(Instant lastModified) Sets when the content was last modified.setPriority(double priority) Sets the priority of the content to indicate its importance.
-
Method Details
-
setAudience
Sets the intended audience for the content- Parameters:
roles- the audience roles- Returns:
- this builder
-
setAudience
Sets the intended audience for the content- Parameters:
roles- the set of audience roles- Returns:
- this builder
-
setPriority
Sets the priority of the content to indicate its importance.1.0indicates the greatest importance,0.0indicates the least importance- Parameters:
priority- the priority, between1.0and0.0- Returns:
- this builder
-
setLastModified
Sets when the content was last modified.- Parameters:
lastModified- the last modified timestamp- Returns:
- this builder
-
build
Annotations build()Builds the resource annotations- Returns:
- the new annotations object
-