@Test public void getDocumentReferenceFromId() throws Exception { DocumentReference docRef = new DocumentReference("xwiki", XWiki.SYSTEM_SPACE, "XWikiServerWikiid1"); assertEquals(docRef, this.mocker.getComponentUnderTest().getDocumentReferenceFromId("wikiid1")); }
@Override public DocumentReference getDocumentReferenceFromId(String wikiId) { if (wikiId == null) { throw new IllegalArgumentException("Wiki id cannot be null"); } WikiDescriptorManager wikiDescriptorManager = wikiDescriptorManagerProvider.get(); return new DocumentReference(wikiDescriptorManager.getMainWikiId(), XWiki.SYSTEM_SPACE, String.format("XWikiServer%s", StringUtils.capitalize(wikiId))); }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public DocumentReference getDocumentReferenceFromId(String wikiId) { if (wikiId == null) { throw new IllegalArgumentException("Wiki id cannot be null"); } WikiDescriptorManager wikiDescriptorManager = wikiDescriptorManagerProvider.get(); return new DocumentReference(wikiDescriptorManager.getMainWikiId(), XWiki.SYSTEM_SPACE, String.format("XWikiServer%s", StringUtils.capitalize(wikiId))); } }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public DocumentReference getDocumentReferenceFromId(String wikiId) { if (wikiId == null) { throw new IllegalArgumentException("Wiki id cannot be null"); } WikiDescriptorManager wikiDescriptorManager = wikiDescriptorManagerProvider.get(); return new DocumentReference(wikiDescriptorManager.getMainWikiId(), XWiki.SYSTEM_SPACE, String.format("XWikiServer%s", StringUtils.capitalize(wikiId))); }  }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public DocumentReference getDocumentReferenceFromId(String wikiId) { if (wikiId == null) { throw new IllegalArgumentException("Wiki id cannot be null"); } WikiDescriptorManager wikiDescriptorManager = wikiDescriptorManagerProvider.get(); return new DocumentReference(wikiDescriptorManager.getMainWikiId(), XWiki.SYSTEM_SPACE, String.format("XWikiServer%s", StringUtils.capitalize(wikiId))); }  @Override DocumentReference getDocumentReferenceFromId(String wikiId); @Override String getWikiIdFromDocumentReference(DocumentReference descriptorDocumentReference); @Override String getWikiIdFromDocumentFullname(String descriptorDocumentFullname); @Override XWikiDocument getDocumentFromWikiId(String wikiId); @Override DocumentReference findXWikiServerClassDocumentReference(String wikiAlias); @Override XWikiDocument findXWikiServerClassDocument(String wikiAlias); @Override List<XWikiDocument> getAllXWikiServerClassDocument(); @Override List<String> getAllXWikiServerClassDocumentNames(); }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public DocumentReference getDocumentReferenceFromId(String wikiId) { if (wikiId == null) { throw new IllegalArgumentException("Wiki id cannot be null"); } WikiDescriptorManager wikiDescriptorManager = wikiDescriptorManagerProvider.get(); return new DocumentReference(wikiDescriptorManager.getMainWikiId(), XWiki.SYSTEM_SPACE, String.format("XWikiServer%s", StringUtils.capitalize(wikiId))); }  @Override DocumentReference getDocumentReferenceFromId(String wikiId); @Override String getWikiIdFromDocumentReference(DocumentReference descriptorDocumentReference); @Override String getWikiIdFromDocumentFullname(String descriptorDocumentFullname); @Override XWikiDocument getDocumentFromWikiId(String wikiId); @Override DocumentReference findXWikiServerClassDocumentReference(String wikiAlias); @Override XWikiDocument findXWikiServerClassDocument(String wikiAlias); @Override List<XWikiDocument> getAllXWikiServerClassDocument(); @Override List<String> getAllXWikiServerClassDocumentNames();  }