/**
  * Gets the {@link AccessControlManager} that is used internally in this web service.
  *
  * <p>This is obtained from {@link Resources} and hence it depends on the Spring configuration,
  * accessed through {@link WebInitializer}
  *
  * <p>TODO: AOP
  */
 private AccessControlManager getAccessControlManager(
     String email, String userPassword, String apiPassword) {
   log.trace(
       String.format(
           "Returning access manager for the user %s, %s, %s",
           email, userPassword == null ? null : "***", apiPassword == null ? null : "***"));
   ManagerFactory fact = Resources.getInstance().getMyEqManagerFactory();
   return userPassword == null
       ? fact.newAccessControlManager(email, apiPassword)
       : fact.newAccessControlManagerFullAuth(email, userPassword);
 }
 /**
  * What it does in practice is to get 'myequivalents.config-location' from web.xml and pass such
  * value to {@link Resources#setConfigLocation(String)}, which will later use it as necessary.
  */
 @Override
 public void contextInitialized(ServletContextEvent sce) {
   String configLoc = sce.getServletContext().getInitParameter("myequivalents.config-location");
   if (configLoc != null) Resources.getInstance().setConfigLocation(configLoc);
 }