Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(jsoup): remove useless Document type from method signature #403

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,20 @@
import io.cryostat.core.EventOptionsBuilder.EventOptionException;
import io.cryostat.core.EventOptionsBuilder.EventTypeException;
import io.cryostat.core.templates.Template;
import io.cryostat.core.templates.TemplateType;

import org.jsoup.nodes.Document;

public interface CryostatFlightRecorderService extends IFlightRecorderService {

IRecordingDescriptor start(
IConstrainedMap<String> recordingOptions,
String templateName,
TemplateType preferredTemplateType)
IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, Template eventTemplate)
throws io.cryostat.core.FlightRecorderException, FlightRecorderException,
ConnectionException, IOException, FlightRecorderException,
ConnectionException, ParseException, IOException, FlightRecorderException,
ServiceNotAvailableException, QuantityConversionException, EventOptionException,
EventTypeException;

default IRecordingDescriptor start(
IConstrainedMap<String> recordingOptions, Template eventTemplate)
default IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, String template)
throws io.cryostat.core.FlightRecorderException, FlightRecorderException,
ConnectionException, IOException, FlightRecorderException,
ServiceNotAvailableException, QuantityConversionException, EventOptionException,
EventTypeException {
return start(recordingOptions, eventTemplate.getName(), eventTemplate.getType());
}

default IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, Document template)
throws FlightRecorderException, ParseException, IOException {
XMLModel model = EventConfiguration.createModel(template.toString());
ConnectionException, ParseException, IOException, ServiceNotAvailableException,
QuantityConversionException, EventOptionException, EventTypeException {
XMLModel model = EventConfiguration.createModel(template);
IConstrainedMap<EventOptionID> eventOptions =
new EventConfiguration(model)
.getEventOptions(getDefaultEventOptions().emptyWithSameConstraints());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,13 @@ public IDescribedMap<EventOptionID> getDefaultEventOptions() {
}

@Override
public IRecordingDescriptor start(
IConstrainedMap<String> recordingOptions,
String templateName,
TemplateType preferredTemplateType)
public IRecordingDescriptor start(IConstrainedMap<String> recordingOptions, Template template)
throws io.cryostat.core.FlightRecorderException, FlightRecorderException,
ConnectionException, IOException, FlightRecorderException,
ServiceNotAvailableException, QuantityConversionException, EventOptionException,
EventTypeException {
return tryConnect()
.start(recordingOptions, enableEvents(templateName, preferredTemplateType));
.start(recordingOptions, enableEvents(template.getName(), template.getType()));
}

private IConstrainedMap<EventOptionID> enableEvents(
Expand Down
Loading