|Constructor and Description|
Builds a factory for generating JobRows containing values for every
Builds a factory for generating JobRows with a custom function for extracting a userid from a request's SecurityContext.
|Modifier and Type||Method and Description|
Builds a JobRow with values for every field defined in
public DefaultJobRowBuilder(Function<Map<JobField,String>,String> idGenerator, Function<javax.ws.rs.core.SecurityContext,String> userIdExtractor, Clock timestampGenerator)
idGenerator- A function that takes all the job metadata except for the job's id and generates a globally unique id
userIdExtractor- A function that given a SecurityContext, returns the id of the user who made the request
timestampGenerator- The clock to use to generate timestamps
The user id is extracted from the UserPrincipal of a request's SecurityContext, and timestamps are generated from the System clock.
idGenerator- A function that takes all the job metadata except for the job's id, and returns a globally unique id for the job
public JobRow buildJobRow(javax.ws.rs.core.UriInfo request, javax.ws.rs.container.ContainerRequestContext requestContext)
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.