001/*
002 * The contents of this file are subject to the license and copyright
003 * detailed in the LICENSE and NOTICE files at the root of the source
004 * tree.
005 */
006package org.fcrepo.kernel.api.services;
007
008import org.fcrepo.kernel.api.Transaction;
009import org.fcrepo.kernel.api.exception.AccessDeniedException;
010import org.fcrepo.kernel.api.exception.MalformedRdfException;
011import org.fcrepo.kernel.api.identifiers.FedoraId;
012
013/**
014 * @author peichman
015 * @since 6.0.0
016 */
017public interface UpdatePropertiesService {
018  /**
019   * Update the provided properties with a SPARQL Update query. The updated
020   * properties may be serialized to the persistence layer.
021   *
022   * @param tx the Transaction
023   * @param userPrincipal the user performing the service
024   * @param fedoraId the internal Id of the fedora resource to update
025   * @param sparqlUpdateStatement sparql update statement
026   * @throws MalformedRdfException if malformed rdf exception occurred
027   * @throws AccessDeniedException if access denied in updating properties
028   */
029  void updateProperties(final Transaction tx,
030                        final String userPrincipal,
031                        final FedoraId fedoraId,
032                        final String sparqlUpdateStatement) throws MalformedRdfException, AccessDeniedException;
033}