View Javadoc

1   package com.atlassian.johnson.setup;
2   
3   import javax.annotation.Nonnull;
4   
5   import static com.google.common.base.Preconditions.checkNotNull;
6   
7   /**
8    * A default, empty implementation of {@link SetupConfig} which always indicates the application is setup.
9    *
10   * @since 2.0
11   */
12  public class DefaultSetupConfig implements SetupConfig {
13  
14      /**
15       * Always {@code true}.
16       *
17       * @return {@code true}
18       */
19      @Override
20      public boolean isSetup() {
21          return true;
22      }
23  
24      /**
25       * Always {@code false}.
26       *
27       * @param uri the URI of a web page
28       * @return {@code false}
29       */
30      @Override
31      public boolean isSetupPage(@Nonnull String uri) {
32          checkNotNull(uri, "uri"); //Impose the proper API semantics
33  
34          return false;
35      }
36  }