use of com.xpn.xwiki.objects.classes.PropertyClassInterface in project xwiki-platform by xwiki.
the class PropertyMetaClass method newObject.
/**
* {@inheritDoc}
* <p>
* This method is deprecated. Use directly the {@link PropertyClassProvider} if you need a new XClass property
* instance.
* </p>
*/
@Override
public BaseCollection newObject(XWikiContext context) throws XWikiException {
PropertyClassInterface instance = null;
try {
// Try to use the corresponding XClass property provider to create the new property instance.
PropertyClassProvider provider = Utils.getComponent(PropertyClassProvider.class, getName());
instance = provider.getInstance();
} catch (Exception e) {
// Fail silently.
}
return instance != null && instance instanceof BaseCollection ? (BaseCollection) instance : super.newObject(context);
}
Aggregations