Update the memento resource.

@param builder the Trellis response builder
@return a response builder promise
550929
public CompletionStage<ResponseBuilder> updateMemento(final ResponseBuilder builder) {
        return getServices().getMementoService().put(getServices().getResourceService(), getInternalId())
            .exceptionally(ex -> {
                    LOGGER.warn("Unable to store memento for {}: {}", getInternalId(), ex.getMessage());
                    return null;
                })
            .thenApply(stage -> builder);
    }
1142604
def _on_delete(self, builder):
        
        column = self._get_deleted_at_column(builder)

        return builder.update({column: builder.get_model().fresh_timestamp()})
865674
public CompletionStage<ResponseBuilder> setResource(final ResponseBuilder builder) {
        LOGGER.debug("Setting resource as {}", getIdentifier());

        final IRI ldpType = getLdpType();

        // Verify that the persistence layer supports the given interaction model
        if (!supportsInteractionModel(ldpType)) {
            throw new BadRequestException("Unsupported interaction model provided",
                    status(BAD_REQUEST).link(UnsupportedInteractionModel.getIRIString(),
                        LDP.constrainedBy.getIRIString()).build());
        }

        // It is not possible to change the LDP type to a type that is not a subclass
        if (getResource() != null && !isBinaryDescription()
                && ldpResourceTypes(ldpType).noneMatch(getResource().getInteractionModel()::equals)) {
            LOGGER.error("Cannot change the LDP type to {} for {}", ldpType, getIdentifier());
            throw new ClientErrorException("Cannot change the LDP type to " + ldpType, status(CONFLICT).build());
        }

        LOGGER.debug("Using LDP Type: {}", ldpType);

        final TrellisDataset mutable = TrellisDataset.createDataset();
        final TrellisDataset immutable = TrellisDataset.createDataset();
        LOGGER.debug("Persisting {} with mutable data:\n{}\n and immutable data:\n{}", getIdentifier(), mutable,
                        immutable);
        return handleResourceUpdate(mutable, immutable, builder, ldpType)
            .whenComplete((a, b) -> mutable.close())
            .whenComplete((a, b) -> immutable.close());
    }
1056772
public ResponseBuilder addMementoHeaders(final ResponseBuilder builder, final SortedSet<Instant> mementos) {
        // Only show memento links for the user-managed graph (not ACL)
        if (!ACL.equals(getRequest().getExt())) {
            builder.link(getIdentifier(), "original timegate")
                .links(MementoResource.getMementoLinks(getIdentifier(), mementos)
                        .map(link -> MementoResource.filterLinkParams(link, !includeMementoDates))
                        .toArray(Link[]::new));
        }
        return builder;
    }
477405
public <T extends Message> ObjectOrStatus<T> delete(T.Builder builder, String path)
      throws ApiException, IOException {
    return request(builder, path, "DELETE", null, null, null);
  }
87602
@PATCH
    @Timed
    public void updateResource(@Suspended final AsyncResponse response, @Context final Request request,
            @Context final UriInfo uriInfo, @Context final HttpHeaders headers,
            @Context final SecurityContext secContext, final String body) {
        final TrellisRequest req = new TrellisRequest(request, uriInfo, headers, secContext);
        final String urlBase = getBaseUrl(req);
        final IRI identifier = rdf.createIRI(TRELLIS_DATA_PREFIX + req.getPath());
        final PatchHandler patchHandler = new PatchHandler(req, body, trellis, defaultJsonLdProfile, urlBase);

        getParent(identifier).thenCombine(trellis.getResourceService().get(identifier), patchHandler::initialize)
            .thenCompose(patchHandler::updateResource).thenCompose(patchHandler::updateMemento)
            .thenApply(ResponseBuilder::build).exceptionally(this::handleException).thenApply(response::resume);
    }
680469
public static <L> Builder<L> builder(Resource<L> template) {
        return new Builder<L>(template);
    }
778961
public Datatype.Builder setNullableBuilderFactory(BuilderFactory builderFactory) {
    if (builderFactory != null) {
      return setBuilderFactory(builderFactory);
    } else {
      return clearBuilderFactory();
    }
  }
63194
protected function addArchive(Builder $builder): void
    {
        $builder->macro('archive', function (Builder $builder) {
            return $builder->update(['archived_at' => Date::now()]);
        });
    }
1347346
def build(self, builder):
        
        params = {}

        if self.value is not None:
            params['Value'] = str(self.value)

        if self.query_repeat_key is not None:
            params['QueryRepeatKey'] = str(self.query_repeat_key)

        if self.recipient is not None:
            params['Recipient'] = str(self.recipient)

        if self.status is not None:
            params['Status'] = self.status.value

        if self.requires_response is not None:
            params['RequiresResponse'] = bool_to_yes_no(self.requires_response)

        # When closing a query
        if self.response is not None:
            params['Response'] = str(self.response)

        builder.start("mdsol:Query", params)
        builder.end("mdsol:Query")
864338
public static base_responses update(nitro_service client, sslocspresponder resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			sslocspresponder updateresources[] = new sslocspresponder[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new sslocspresponder();
				updateresources[i].name = resources[i].name;
				updateresources[i].url = resources[i].url;
				updateresources[i].cache = resources[i].cache;
				updateresources[i].cachetimeout = resources[i].cachetimeout;
				updateresources[i].batchingdepth = resources[i].batchingdepth;
				updateresources[i].batchingdelay = resources[i].batchingdelay;
				updateresources[i].resptimeout = resources[i].resptimeout;
				updateresources[i].respondercert = resources[i].respondercert;
				updateresources[i].trustresponder = resources[i].trustresponder;
				updateresources[i].producedattimeskew = resources[i].producedattimeskew;
				updateresources[i].signingcert = resources[i].signingcert;
				updateresources[i].usenonce = resources[i].usenonce;
				updateresources[i].insertclientcert = resources[i].insertclientcert;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
348825
public ResponseBuilder getTimeMapBuilder(final SortedSet<Instant> mementos, final TrellisRequest req,
            final String baseUrl) {

        final List<MediaType> acceptableTypes = req.getAcceptableMediaTypes();
        final String identifier = fromUri(baseUrl).path(req.getPath()).build().toString();
        final List<Link> links = getMementoLinks(identifier, mementos).collect(toList());

        final ResponseBuilder builder = ok().link(identifier, ORIGINAL + " " + TIMEGATE);
        builder.links(links.stream().map(this::filterLinkParams).toArray(Link[]::new))
            .link(Resource.getIRIString(), TYPE).link(RDFSource.getIRIString(), TYPE)
            .header(ALLOW, join(",", GET, HEAD, OPTIONS));

        final RDFSyntax syntax = getSyntax(trellis.getIOService(), acceptableTypes, APPLICATION_LINK_FORMAT);

        if (syntax != null) {
            final IRI profile = getProfile(acceptableTypes, syntax);
            final IRI jsonldProfile = profile != null ? profile : compacted;

            final StreamingOutput stream = new StreamingOutput() {
                @Override
                public void write(final OutputStream out) throws IOException {
                    trellis.getIOService().write(timemap.asRdf(identifier, links), out, syntax, jsonldProfile);
                }
            };

            return builder.type(syntax.mediaType()).entity(stream);
        }

        return builder.type(APPLICATION_LINK_FORMAT)
            .entity(links.stream().map(this::filterLinkParams).map(Link::toString).collect(joining(",\n")) + "\n");
    }
857689
protected function addPostponed(Builder $builder)
    {
        $builder->macro('postponed', function (Builder $builder) {
            $model = $builder->getModel();

            $this->remove($builder, $model);

            $builder->where($model->getQualifiedStatusColumn(), '=', Status::POSTPONED);

            return $builder;
        });
    }
1298815
public function update(Builder $builder, $value)
    {
        $this->behavior->update($builder->field, $value, $builder->id);
    }
778621
public static void putAuthenticationResultBuilder(final AuthenticationResultBuilder builder, final RequestContext ctx) {
        ctx.getConversationScope().put(PARAMETER_AUTHENTICATION_RESULT_BUILDER, builder);
    }
508660
public static GsonBuilder registerInterval(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(INTERVAL_TYPE, new IntervalConverter());

    return builder;
  }
815921
public RedGBuilder<T> withPreparedStatementParameterSetter(final PreparedStatementParameterSetter setter) {
        if (instance == null) {
            throw new IllegalStateException("Using the builder after build() was called is not allowed!");
        }
        instance.setPreparedStatementParameterSetter(setter);
        return this;
    }