descriptorGeneratorManager.unregisterGenerator(getPluginKey(), getKey());
}
public Iterable<WebResourceModuleDescriptor> getDescriptorsToExposeForUsers(ConditionGenerator conditionGenerator, long state)
{
WebResourceModuleDescriptor descriptor = WebResourceUtil.instantiateDescriptor(moduleFactory, hostContainer);
Element userElement = (Element) originalElement.clone();
for (Element dep : new ArrayList<Element>(userElement.elements("dependency")))
{
WebResourceUtil.resolveDependency(plugin, dep, state);
}
userElement.addAttribute("key", getStatefulKey(userElement.attributeValue("key"), state));
conditionGenerator.addConditionElement(userElement);
if (log.isDebugEnabled())
{
StringWriter out = new StringWriter();
OutputFormat format = OutputFormat.createPrettyPrint();
XMLWriter writer = new XMLWriter( out, format );
try
{
writer.write(userElement);
}
catch (IOException e)
{
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
log.debug("Creating dynamic descriptor of key {}: {}", getCompleteKey(), out.toString());
}
descriptor.init(new ClassOverwrittingPlugin(getPlugin()), userElement);
return Collections.singleton(descriptor);
}