use of com.canoo.platform.remoting.server.RemotingAction in project dolphin-platform by canoo.
the class LogFilterController method clearStartDate.
@RemotingAction
public void clearStartDate() {
final LocalDateTime minTime = LocalDateTime.MIN;
model.setStartDate(ZonedDateTime.of(minTime, ZoneId.systemDefault()));
}
use of com.canoo.platform.remoting.server.RemotingAction in project dolphin-platform by canoo.
the class LogFilterController method search.
@RemotingAction
public void search() {
final LoggerSearchRequest request = getCurrentRequest();
searchListener.forEach(l -> l.accept(request));
}
use of com.canoo.platform.remoting.server.RemotingAction in project dolphin-platform by canoo.
the class ControllerUtils method getActionMethodName.
public static String getActionMethodName(final Method method) {
Assert.requireNonNull(method, "method");
if (method.isAnnotationPresent(RemotingAction.class)) {
RemotingAction actionAnnotation = method.getAnnotation(RemotingAction.class);
String currentActionName = method.getName();
if (actionAnnotation.value() != null && !actionAnnotation.value().trim().isEmpty()) {
currentActionName = actionAnnotation.value();
}
return currentActionName;
} else {
throw new IllegalArgumentException("Method " + method.getName() + " is not annotated with " + RemotingAction.class);
}
}
use of com.canoo.platform.remoting.server.RemotingAction in project dolphin-platform-examples by canoo.
the class DetailController method reload.
@RemotingAction("reload")
public void reload() {
Long id = model.getId();
LOGGER.debug("Reload with id {}", id);
if (id != null) {
final DataItem item = dataService.find(id);
model.setName(item.getName());
model.setDescription(item.getDescription());
} else {
model.setName("");
model.setDescription("");
}
}
use of com.canoo.platform.remoting.server.RemotingAction in project dolphin-platform by canoo.
the class LogListController method update.
@RemotingAction(UPDATE_ACTION)
public void update() {
final ZonedDateTime startDate = ZonedDateTime.now().minusDays(1);
final ZonedDateTime endDateTime = ZonedDateTime.now();
final Set<Level> level = new HashSet<>(Arrays.asList(Level.values()));
final int maxResults = 100;
final LoggerSearchRequest request = new LoggerSearchRequest(startDate, endDateTime, level, maxResults);
update(request);
}
Aggregations