Search in sources :

Example 1 with ExtensionRepository

use of org.xwiki.extension.repository.xwiki.model.jaxb.ExtensionRepository in project xwiki-platform by xwiki.

the class AbstractExtensionRESTResource method toExtensionRepository.

protected ExtensionRepository toExtensionRepository(String repositoryString) throws URISyntaxException {
    if (repositoryString != null) {
        ExtensionRepositoryDescriptor descriptor = XWikiRepositoryModel.toRepositoryDescriptor(repositoryString, extensionFactory);
        ExtensionRepository restRepository = new ExtensionRepository();
        restRepository.setId(descriptor.getId());
        restRepository.setType(descriptor.getType());
        restRepository.setUri(descriptor.getURI().toString());
        return restRepository;
    }
    return null;
}
Also used : ExtensionRepository(org.xwiki.extension.repository.xwiki.model.jaxb.ExtensionRepository) ExtensionRepositoryDescriptor(org.xwiki.extension.repository.ExtensionRepositoryDescriptor)

Aggregations

ExtensionRepositoryDescriptor (org.xwiki.extension.repository.ExtensionRepositoryDescriptor)1 ExtensionRepository (org.xwiki.extension.repository.xwiki.model.jaxb.ExtensionRepository)1