use of org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestDocument in project xwiki-platform by xwiki.
the class TestDocumentFactory method getNewInstance.
@Override
TestDocument getNewInstance(ElementParser parser, String name, TestEntity parent, Attributes attributes) {
EntityReference reference = parser.getResolver().resolve(attributes.getValue("name"), DefaultTestDocument.TYPE, parent.getReference());
String creatorString = attributes.getValue("creator");
EntityReference creator = (creatorString) != null ? parser.getResolver().resolve(creatorString, DefaultTestDocument.TYPE, new EntityReference(XWikiConstants.XWIKI_SPACE, EntityType.SPACE, reference.getRoot())) : null;
return new DefaultTestDocument(reference, creator, attributes.getValue("alt"), parent);
}
Aggregations