Esempio n. 1
0
 /**
  * Instantiates a new form that wraps the specified class.
  *
  * @deprecated inject a {@link FormFactory} instead, since 2.5.0
  */
 @Deprecated
 public static <T> Form<T> form(Class<T> clazz) {
   return new Form<>(
       clazz,
       play.api.Play.current().injector().instanceOf(MessagesApi.class),
       play.api.Play.current().injector().instanceOf(Formatters.class));
 }
Esempio n. 2
0
 /**
  * Instantiates a new form that wraps the specified class.
  *
  * @deprecated inject a {@link FormFactory} instead, since 2.5.0
  */
 @Deprecated
 public static <T> Form<T> form(String name, Class<T> clazz, Class<?> group) {
   return new Form<>(
       name,
       clazz,
       group,
       play.api.Play.current().injector().instanceOf(MessagesApi.class),
       play.api.Play.current().injector().instanceOf(Formatters.class));
 }
Esempio n. 3
0
 /** Stops an application. */
 public static void stop(FakeApplication fakeApplication) {
   play.api.Play.stop();
 }
Esempio n. 4
0
  /** Starts a new application. */
  public static void start(FakeApplication fakeApplication) {

    play.api.Play.start(fakeApplication.getWrappedApplication());
  }
Esempio n. 5
0
 /**
  * Instantiates a dynamic form.
  *
  * @deprecated inject a {@link FormFactory} instead, since 2.5.0
  */
 @Deprecated
 public static DynamicForm form() {
   return new DynamicForm(
       play.api.Play.current().injector().instanceOf(MessagesApi.class),
       play.api.Play.current().injector().instanceOf(Formatters.class));
 }
Esempio n. 6
0
 /** Returns `true` if the current application is `DEV` mode. */
 private static boolean isDev() {
   return play.api.Play.isDev(play.api.Play.current());
 }
Esempio n. 7
0
 /** Stops an application. */
 public static void stop(Application application) {
   play.api.Play.stop(application.getWrappedApplication());
 }