io.hypertrack.factory.EventFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hypertrack-java Show documentation
Show all versions of hypertrack-java Show documentation
A Java wrapper for the HyperTrack API https://hypertrack.io
The newest version!
package io.hypertrack.factory;
import io.hypertrack.model.Event;
import io.hypertrack.net.HyperTrackClient;
import java.util.Map;
/**
* Factory class for Event model.
*/
public class EventFactory extends HyperTrackFactory {
private static String modelUrl = "events/";
public EventFactory(HyperTrackClient client) {
super(client);
}
@Override
protected Event makeNew(Map params) {
return new Event(params);
}
@Override
protected String getModelUrl() {
return modelUrl;
}
/**
* Overriding create method as events cannot be created.
*
* @param params Map of instance parameters
* @return
*/
@Override
public Event create(Map params) {
throw new UnsupportedOperationException("Events cannot be created.");
}
/**
* Overriding patch method as events cannot be patched.
*
* @param event Event object to be patched
* @param params New params to be patched in instance
*/
@Override
public void patch(Event event, Map params) {
throw new UnsupportedOperationException("Events cannot be patched.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy