Class ResourceOperationEventBuilder

java.lang.Object
org.fcrepo.kernel.impl.observer.ResourceOperationEventBuilder
All Implemented Interfaces:
EventBuilder

public class ResourceOperationEventBuilder extends Object implements EventBuilder
Converts a ResourceOperation into an Event.
Author:
pwinckles
  • Method Details

    • fromResourceOperation

      public static ResourceOperationEventBuilder fromResourceOperation(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, org.fcrepo.kernel.api.operations.ResourceOperation operation, String userAgentBaseUri)
      Creates a new EventBuilder based on an ResourceOperation
      Parameters:
      fedoraId - the FedoraId the operation is on
      operation - the ResourceOperation to create an event for
      userAgentBaseUri - the base uri of the user agent, optional
      Returns:
      new builder
    • merge

      Description copied from interface: EventBuilder
      Merges another EventBuilder into this EventBuilder. This should be used to combine multiple events on the same resource.
      Specified by:
      merge in interface EventBuilder
      Parameters:
      other - another EventBuilder
      Returns:
      this builder
    • withResourceTypes

      public EventBuilder withResourceTypes(Set<String> resourceTypes)
      Description copied from interface: EventBuilder
      Sets the resource's RDF Types on the event
      Specified by:
      withResourceTypes in interface EventBuilder
      Parameters:
      resourceTypes - RDF Types
      Returns:
      this builder
    • withBaseUrl

      public EventBuilder withBaseUrl(String baseUrl)
      Description copied from interface: EventBuilder
      Sets the baseUrl of the requests
      Specified by:
      withBaseUrl in interface EventBuilder
      Parameters:
      baseUrl - the base url
      Returns:
      this builder
    • withUserAgent

      public EventBuilder withUserAgent(String userAgent)
      Description copied from interface: EventBuilder
      Sets the user's user-agent
      Specified by:
      withUserAgent in interface EventBuilder
      Parameters:
      userAgent - the user's user-agent
      Returns:
      this builder
    • build

      public org.fcrepo.kernel.api.observer.Event build()
      Description copied from interface: EventBuilder
      Constructs a new Event object from the details in the builder.
      Specified by:
      build in interface EventBuilder
      Returns:
      new event
    • toString

      public String toString()
      Overrides:
      toString in class Object