Created
June 11, 2018 15:20
-
-
Save juancho088/ec11c2557dcda079812a3e81442249e9 to your computer and use it in GitHub Desktop.
MovieController using the service factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.myblockbuster.movies.controllers | |
import com.myblockbuster.core.Request | |
import com.myblockbuster.core.User | |
import com.myblockbuster.core.controllers.Controller | |
import com.myblockbuster.core.factories.ServiceFactory | |
import com.myblockbuster.core.services.Service | |
import com.myblockbuster.movies.Movie | |
class MovieController: Controller<Movie> { | |
fun movie(request: Request?) : Any { | |
val service: Service<Movie, User> = ServiceFactory<Movie>().getService(Movie::class.java) | |
return defaultRouting(Movie::class.java, request!!, service) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment