Constructor and Description |
---|
ScoringServiceEndPoint() |
Modifier and Type | Method and Description |
---|---|
void |
createScoringDefinition(String scope,
String scoringId,
String scoringName,
String scoringDescription)
Creates a scoring with the specified scope, identifier, name and description from form-encoded data.
|
Scoring |
getScoringDefinition(String scoringId)
Retrieves the scoring identified by the specified identifier.
|
DependentMetadata |
getScoringDependentMetadata(String scoringId)
Retrieves the list of Segment and Scoring metadata depending on the specified scoring.
|
List<Metadata> |
getScoringMetadatas(int offset,
int size,
String sortBy)
Retrieves the set of all scoring metadata.
|
PartialList<Metadata> |
getScoringMetadatas(Query query)
Retrieves the set of scoring metadata for scorings matching the specified query.
|
DependentMetadata |
removeScoringDefinition(String scoringId,
boolean validate)
Removes the scoring definition identified by the specified identifier.
|
void |
resetQueries()
Deprecated.
As of version 1.1.0-incubating, not needed anymore
|
void |
setScoringDefinition(Scoring scoring)
Persists the specified scoring in the context server.
|
void |
setSegmentService(SegmentService segmentService) |
public void setSegmentService(SegmentService segmentService)
@GET @Path(value="/") public List<Metadata> getScoringMetadatas(@QueryParam(value="offset") @DefaultValue(value="0") int offset, @QueryParam(value="size") @DefaultValue(value="50") int size, @QueryParam(value="sort") String sortBy)
offset
- zero or a positive integer specifying the position of the first element in the total ordered collection of matching elementssize
- a positive integer specifying how many matching elements should be retrieved or -1
if all of them should be retrievedsortBy
- an optional (null
if no sorting is required) String of comma (,
) separated property names on which ordering should be performed, ordering
elements according to the property order in the
String, considering each in turn and moving on to the next one in case of equality of all preceding ones. Each property name is optionally followed by
a column (:
) and an order specifier: asc
or desc
.@POST @Path(value="/query") public PartialList<Metadata> getScoringMetadatas(Query query)
query
- the query the scorings must match for their metadata to be retrieved@GET @Path(value="/{scoringID}") public Scoring getScoringDefinition(@PathParam(value="scoringID") String scoringId)
scoringId
- the identifier of the scoring to be retrievednull
if no such scoring exists@POST @Path(value="/") public void setScoringDefinition(Scoring scoring)
scoring
- the scoring to be persisted@PUT @Path(value="/{scope}/{scoringID}") @Consumes(value="application/x-www-form-urlencoded") public void createScoringDefinition(@PathParam(value="scope") String scope, @PathParam(value="scoringID") String scoringId, @FormParam(value="scoringName") String scoringName, @FormParam(value="scoringDescription") String scoringDescription)
scope
- the scope for the new scoringscoringId
- the identifier for the new scoringscoringName
- the name of the new scoringscoringDescription
- the description of the new scoringItem's description for a discussion of scope
@DELETE @Path(value="/{scoringID}") public DependentMetadata removeScoringDefinition(@PathParam(value="scoringID") String scoringId, @QueryParam(value="validate") boolean validate)
validate
is set to false
, no
validation is performed. If set to true
, we will first check if any segment or scoring depends on the scoring we're trying to delete and if so we will not delete the
scoring but rather return the list of the metadata of the impacted items. If no dependents are found, then we properly delete the scoring.scoringId
- the identifier of the scoring we want to deletevalidate
- whether or not to perform validation@GET @Path(value="/{scoringID}/impacted") public DependentMetadata getScoringDependentMetadata(@PathParam(value="scoringID") String scoringId)
scoringId
- the segment identifier@Deprecated @GET @Path(value="/resetQueries") public void resetQueries()
Copyright © 2014–2023 Apache Software Foundation. All rights reserved.