@Test public void testResolver() throws ComponentLookupException { assertEquals(new DocumentReference("defaultwiki", "XWiki", "Bosse"), this.mocker.getComponentUnderTest().resolve("Bosse")); assertEquals(new DocumentReference("defaultwiki", "bossesSpace", "Bosse"), this.mocker.getComponentUnderTest().resolve("bossesSpace.Bosse")); assertEquals(new DocumentReference("bossesWiki", "XWiki", "Bosse"), this.mocker.getComponentUnderTest().resolve("Bosse", new WikiReference("bossesWiki"))); assertEquals(new DocumentReference("bossesWiki", "bossesSpace", "Bosse"), this.mocker.getComponentUnderTest().resolve("bossesSpace.Bosse", new WikiReference("bossesWiki"))); assertEquals(new DocumentReference("bossesWiki", "bossesSpace", "Bosse"), this.mocker.getComponentUnderTest().resolve("bossesWiki:bossesSpace.Bosse")); assertNull(this.mocker.getComponentUnderTest().resolve(null)); }
@Override public DocumentReference resolve(String documentReferenceRepresentation, Object... parameters) { EntityReference entityReference = this.entityReferenceResolver.resolve(documentReferenceRepresentation, EntityType.DOCUMENT, parameters); return entityReference == null ? null : new DocumentReference(entityReference); }
UserAndGroupDocumentReferenceResolver implements DocumentReferenceResolver<String> { @Override public DocumentReference resolve(String documentReferenceRepresentation, Object... parameters) { EntityReference entityReference = this.entityReferenceResolver.resolve(documentReferenceRepresentation, EntityType.DOCUMENT, parameters); return entityReference == null ? null : new DocumentReference(entityReference); } }
UserAndGroupDocumentReferenceResolver implements DocumentReferenceResolver<String> { @Override public DocumentReference resolve(String documentReferenceRepresentation, Object... parameters) { EntityReference entityReference = this.entityReferenceResolver.resolve(documentReferenceRepresentation, EntityType.DOCUMENT, parameters); return entityReference == null ? null : new DocumentReference(entityReference); }  }
UserAndGroupDocumentReferenceResolver implements DocumentReferenceResolver<String> { @Override public DocumentReference resolve(String documentReferenceRepresentation, Object... parameters) { EntityReference entityReference = this.entityReferenceResolver.resolve(documentReferenceRepresentation, EntityType.DOCUMENT, parameters); return entityReference == null ? null : new DocumentReference(entityReference); }  @Override DocumentReference resolve(String documentReferenceRepresentation, Object... parameters); }
UserAndGroupDocumentReferenceResolver implements DocumentReferenceResolver<String> { @Override public DocumentReference resolve(String documentReferenceRepresentation, Object... parameters) { EntityReference entityReference = this.entityReferenceResolver.resolve(documentReferenceRepresentation, EntityType.DOCUMENT, parameters); return entityReference == null ? null : new DocumentReference(entityReference); }  @Override DocumentReference resolve(String documentReferenceRepresentation, Object... parameters);  }