Search in sources :

Example 11 with XarEntry

use of org.xwiki.xar.XarEntry in project xwiki-platform by xwiki.

the class HTTPPerformanceTest method readXarContents.

protected static List<DocumentReference> readXarContents(String fileName, String patternFilter) throws Exception {
    Collection<XarEntry> entries = XarPackage.getEntries(new File(fileName));
    List<DocumentReference> result = new ArrayList<DocumentReference>(entries.size());
    WikiReference wikiReference = new WikiReference("xwiki");
    for (XarEntry entry : entries) {
        result.add(new DocumentReference(entry, wikiReference));
    }
    return result;
}
Also used : XarEntry(org.xwiki.xar.XarEntry) ArrayList(java.util.ArrayList) WikiReference(org.xwiki.model.reference.WikiReference) File(java.io.File) LocalDocumentReference(org.xwiki.model.reference.LocalDocumentReference) DocumentReference(org.xwiki.model.reference.DocumentReference)

Aggregations

XarEntry (org.xwiki.xar.XarEntry)11 DocumentReference (org.xwiki.model.reference.DocumentReference)5 File (java.io.File)3 IOException (java.io.IOException)3 LocalExtension (org.xwiki.extension.LocalExtension)3 PackageConfiguration (org.xwiki.extension.xar.internal.handler.packager.PackageConfiguration)3 LocalDocumentReference (org.xwiki.model.reference.LocalDocumentReference)3 WikiReference (org.xwiki.model.reference.WikiReference)3 XWikiContext (com.xpn.xwiki.XWikiContext)2 XWikiDocument (com.xpn.xwiki.doc.XWikiDocument)2 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 Map (java.util.Map)2 Pattern (java.util.regex.Pattern)2 ExecutionContext (org.xwiki.context.ExecutionContext)2 XarException (org.xwiki.xar.XarException)2 XWikiException (com.xpn.xwiki.XWikiException)1 MergeConfiguration (com.xpn.xwiki.doc.merge.MergeConfiguration)1 MergeResult (com.xpn.xwiki.doc.merge.MergeResult)1 ComponentLookupException (org.xwiki.component.manager.ComponentLookupException)1