Search in sources :

Example 1 with DefaultTestSpace

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

the class TestSpaceFactory method getNewInstance.

@Override
TestSpace getNewInstance(ElementParser parser, String name, TestEntity parent, Attributes attributes) {
    EntityReference reference = parser.getResolver().resolve(attributes.getValue("name"), DefaultTestSpace.TYPE, parent.getReference());
    TestSpace space = (TestSpace) parent.getEntity(reference);
    if (space == null) {
        space = new DefaultTestSpace(reference, attributes.getValue("alt"), parent);
    }
    return space;
}
Also used : DefaultTestSpace(org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestSpace) EntityReference(org.xwiki.model.reference.EntityReference) TestSpace(org.xwiki.security.authorization.testwikis.TestSpace) DefaultTestSpace(org.xwiki.security.authorization.testwikis.internal.entities.DefaultTestSpace)

Aggregations

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