Package org.fcrepo.kernel.impl.observer
Class ResourceOperationEventBuilder
java.lang.Object
org.fcrepo.kernel.impl.observer.ResourceOperationEventBuilder
- All Implemented Interfaces:
EventBuilder
Converts a ResourceOperation into an Event.
- Author:
- pwinckles
-
Method Summary
Modifier and TypeMethodDescriptionorg.fcrepo.kernel.api.observer.Eventbuild()Constructs a new Event object from the details in the builder.fromResourceOperation(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, org.fcrepo.kernel.api.operations.ResourceOperation operation, String userAgentBaseUri) Creates a new EventBuilder based on an ResourceOperationmerge(EventBuilder other) Merges another EventBuilder into this EventBuilder.toString()withBaseUrl(String baseUrl) Sets the baseUrl of the requestswithResourceTypes(Set<String> resourceTypes) Sets the resource's RDF Types on the eventwithUserAgent(String userAgent) Sets the user's user-agent
-
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 onoperation- the ResourceOperation to create an event foruserAgentBaseUri- the base uri of the user agent, optional- Returns:
- new builder
-
merge
Description copied from interface:EventBuilderMerges another EventBuilder into this EventBuilder. This should be used to combine multiple events on the same resource.- Specified by:
mergein interfaceEventBuilder- Parameters:
other- another EventBuilder- Returns:
- this builder
-
withResourceTypes
Description copied from interface:EventBuilderSets the resource's RDF Types on the event- Specified by:
withResourceTypesin interfaceEventBuilder- Parameters:
resourceTypes- RDF Types- Returns:
- this builder
-
withBaseUrl
Description copied from interface:EventBuilderSets the baseUrl of the requests- Specified by:
withBaseUrlin interfaceEventBuilder- Parameters:
baseUrl- the base url- Returns:
- this builder
-
withUserAgent
Description copied from interface:EventBuilderSets the user's user-agent- Specified by:
withUserAgentin interfaceEventBuilder- Parameters:
userAgent- the user's user-agent- Returns:
- this builder
-
build
Description copied from interface:EventBuilderConstructs a new Event object from the details in the builder.- Specified by:
buildin interfaceEventBuilder- Returns:
- new event
-
toString
-