Search in sources :

Example 1 with DefaultTestGroupDocument

use of org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestGroupDocument in project xwiki-platform by xwiki.

the class TestGroupFactory 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());
    EntityReference creator = parser.getResolver().resolve(attributes.getValue("creator"), DefaultTestDocument.TYPE, new EntityReference(XWikiConstants.XWIKI_SPACE, EntityType.SPACE, reference.getRoot()));
    return new DefaultTestGroupDocument(reference, creator, attributes.getValue("alt"), parent);
}
Also used : EntityReference(org.xwiki.model.reference.EntityReference) DefaultTestGroupDocument(org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestGroupDocument)

Aggregations

EntityReference (org.xwiki.model.reference.EntityReference)1 DefaultTestGroupDocument (org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestGroupDocument)1