Move Views config into component
This commit is contained in:
18
src/main/kotlin/component/views/ViewManager.kt
Normal file
18
src/main/kotlin/component/views/ViewManager.kt
Normal file
@@ -0,0 +1,18 @@
|
||||
package fr.dcproject.component.views
|
||||
|
||||
import fr.dcproject.component.citizen.CitizenI
|
||||
import fr.dcproject.entity.ViewAggregation
|
||||
import org.elasticsearch.client.Response
|
||||
import org.joda.time.DateTime
|
||||
|
||||
interface ViewManager <T> {
|
||||
/**
|
||||
* Add view to one entity
|
||||
*/
|
||||
fun addView(ip: String, entity: T, citizen: CitizenI? = null, dateTime: DateTime = DateTime.now()): Response?
|
||||
|
||||
/**
|
||||
* Get Views aggregations
|
||||
*/
|
||||
fun getViewsCount(entity: T): ViewAggregation
|
||||
}
|
||||
Reference in New Issue
Block a user