/*
* @see org.apache.jetspeed.capabilities.Capabilities#createCapability(String)
*/
public Capability createCapability(String capabilityName) throws ClassNotFoundException
{
Capability capability = null;
if (capabilityName != null)
{
//try to find it in space
capability = this.getCapability(capabilityName);
if (capability != null)
return capability;
}
try
{
capability = (Capability) beanFactory.getBean(
this.capabilityBeanName, Capability.class);
capability.setName(capabilityName);
return capability;
} catch (Exception e)
{
log.error("Failed to create capability instance for " + this.capabilityBeanName
+ " error : " + e.getLocalizedMessage());