use of org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestGroup in project xwiki-platform by xwiki.
the class TestGroupUserFactory method getNewInstance.
@Override
TestGroup getNewInstance(ElementParser parser, String name, TestEntity parent, Attributes attributes) throws SAXException {
EntityReference reference = parser.getResolver().resolve(attributes.getValue("name"), parent.getType(), parent.getReference());
TestEntity entity = parser.getWikis().searchEntity(reference);
if (entity == null) {
throw new SAXException(parser.getLocatedMessage("User/Group [%s] is undefined.", reference));
}
new DefaultTestGroup(parser.getSerializer().serialize(parent.getReference()), parent.getReference(), entity);
return null;
}
Aggregations