All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.surati.gap.admin.module.web.xe.XeEventLogs Maven / Gradle / Ivy

There is a newer version: 0.5.2
Show newest version
package io.surati.gap.admin.module.web.xe;

/**
 * XeEventLogs
 * @since 0.1
 */
import io.surati.gap.admin.base.api.EventLog;
import io.surati.gap.admin.base.api.EventLogs;
import org.cactoos.iterable.Joined;
import org.cactoos.iterable.Mapped;
import org.takes.rs.xe.XeDirectives;
import org.takes.rs.xe.XeWrap;
import org.xembly.Directives;

public final class XeEventLogs extends XeWrap {

	public XeEventLogs(final EventLogs logs) {
		this(logs.iterate());
	}
	
	public XeEventLogs(final Iterable items) {
		super(
			new XeDirectives(
				new Directives()
					.add("event_logs")
					.append(
						new Joined<>(
							new Mapped<>(
								item -> new XeEventLog("event_log", item).toXembly(),
								items
							)
						)
					)
			)
		);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy