use of org.olat.fileresource.types.WikiResource in project openolat by klemens.
the class WikiHandler method importResource.
@Override
public RepositoryEntry importResource(Identity initialAuthor, String initialAuthorAlt, String displayname, String description, boolean withReferences, Locale locale, File file, String filename) {
WikiResource wikiResource = new WikiResource();
OLATResource resource = OLATResourceManager.getInstance().findOrPersistResourceable(wikiResource);
File rootDirectory = WikiManager.getInstance().getWikiRootContainer(resource).getBasefile();
WikiManager.getInstance().importWiki(file, filename, rootDirectory);
RepositoryEntry re = CoreSpringFactory.getImpl(RepositoryService.class).create(initialAuthor, null, WikiManager.WIKI_RESOURCE_FOLDER_NAME, displayname, description, resource, RepositoryEntry.ACC_OWNERS);
DBFactory.getInstance().commit();
return re;
}
use of org.olat.fileresource.types.WikiResource in project openolat by klemens.
the class WikiHandler method createResource.
@Override
public RepositoryEntry createResource(Identity initialAuthor, String displayname, String description, Object createObject, Locale locale) {
RepositoryService repositoryService = CoreSpringFactory.getImpl(RepositoryService.class);
WikiResource wikiResource = WikiManager.getInstance().createWiki();
OLATResource resource = OLATResourceManager.getInstance().findOrPersistResourceable(wikiResource);
RepositoryEntry re = repositoryService.create(initialAuthor, null, WikiManager.WIKI_RESOURCE_FOLDER_NAME, displayname, description, resource, RepositoryEntry.ACC_OWNERS);
DBFactory.getInstance().commit();
return re;
}
use of org.olat.fileresource.types.WikiResource in project openolat by klemens.
the class WikiManager method createWiki.
// ---- end controller factory -----
/**
* @return the new created resource
*/
public WikiResource createWiki() {
WikiResource resource = new WikiResource();
createFolders(resource);
OLATResourceManager rm = getResourceManager();
OLATResource ores = rm.createOLATResourceInstance(resource);
rm.saveOLATResource(ores);
return resource;
}
use of org.olat.fileresource.types.WikiResource in project OpenOLAT by OpenOLAT.
the class WikiHandler method importResource.
@Override
public RepositoryEntry importResource(Identity initialAuthor, String initialAuthorAlt, String displayname, String description, boolean withReferences, Locale locale, File file, String filename) {
WikiResource wikiResource = new WikiResource();
OLATResource resource = OLATResourceManager.getInstance().findOrPersistResourceable(wikiResource);
File rootDirectory = WikiManager.getInstance().getWikiRootContainer(resource).getBasefile();
WikiManager.getInstance().importWiki(file, filename, rootDirectory);
RepositoryEntry re = CoreSpringFactory.getImpl(RepositoryService.class).create(initialAuthor, null, WikiManager.WIKI_RESOURCE_FOLDER_NAME, displayname, description, resource, RepositoryEntry.ACC_OWNERS);
DBFactory.getInstance().commit();
return re;
}
use of org.olat.fileresource.types.WikiResource in project OpenOLAT by OpenOLAT.
the class WikiHandler method createResource.
@Override
public RepositoryEntry createResource(Identity initialAuthor, String displayname, String description, Object createObject, Locale locale) {
RepositoryService repositoryService = CoreSpringFactory.getImpl(RepositoryService.class);
WikiResource wikiResource = WikiManager.getInstance().createWiki();
OLATResource resource = OLATResourceManager.getInstance().findOrPersistResourceable(wikiResource);
RepositoryEntry re = repositoryService.create(initialAuthor, null, WikiManager.WIKI_RESOURCE_FOLDER_NAME, displayname, description, resource, RepositoryEntry.ACC_OWNERS);
DBFactory.getInstance().commit();
return re;
}
Aggregations