Create a way to list the IdentifierBundleFactories that are active.

This commit is contained in:
j2blake 2011-06-05 23:34:27 +00:00
parent 0b8127ea11
commit c3ba76acdc

View file

@ -51,6 +51,18 @@ public class ActiveIdentifierBundleFactories {
getActiveFactories(ctx).addFactory(factory); getActiveFactories(ctx).addFactory(factory);
} }
/**
* Just for diagnostics. Don't expose the factories themselves, only their names.
*/
public static List<String> getFactoryNames(ServletContext ctx) {
List<String> names = new ArrayList<String>();
ActiveIdentifierBundleFactories actFact = getActiveFactories(ctx);
for (IdentifierBundleFactory factory: actFact.factories) {
names.add(factory.toString());
}
return names;
}
/** /**
* Get the Identifiers from the list of factories. This might return an * Get the Identifiers from the list of factories. This might return an
* empty bundle, but it never returns null. * empty bundle, but it never returns null.
@ -118,5 +130,4 @@ public class ActiveIdentifierBundleFactories {
} }
return ib; return ib;
} }
} }