class OnboardingResource extends ComponentSupport implements Resource {

  @PUT
  @RequiresAuthentication
  @RequiresPermissions("nexus:*")
  @Path("/change-admin-password")
  @Validate
  public void changeAdminPassword(@NotEmpty(message = PASSWORD_REQUIRED) final String password) {
    try {
      securitySystem.changePassword("admin", password, false);
      adminPasswordFileManager.removeFile();
    }
    catch (UserNotFoundException e) {
      log.error("Unable to locate 'admin' user to change password", e);
      throw new WebApplicationException(Response.Status.NOT_FOUND);
    }
  }

  @Inject public  OnboardingResource(final OnboardingManager onboardingManager,
                            final SecuritySystem securitySystem,
                            final AdminPasswordFileManager adminPasswordFileManager);

}