@Override
  public void init(PortletConfig portletConfig) throws PortletException {
    if (portletConfig instanceof PortletConfigImpl) {
      PortletConfigurationPortletPortletConfig portletConfigurationPortletPortletConfig =
          new PortletConfigurationPortletPortletConfig((PortletConfigImpl) portletConfig);

      super.init(portletConfigurationPortletPortletConfig);
    } else {
      super.init(portletConfig);
    }
  }
  @Override
  public void init() throws PortletException {

    if (FirebaseApp.getApps().size() < 1) {
      FirebaseOptions options =
          new FirebaseOptions.Builder()
              .setDatabaseUrl("https://lfvo-test.firebaseio.com/")
              .setServiceAccount(
                  AppManagerPortlet.class
                      .getClassLoader()
                      .getResourceAsStream("firebase-service-account.json"))
              .build();
      FirebaseApp.initializeApp(options);
    }

    super.init();
  }