Search in sources :

Example 6 with SharedFolderFileResource

use of org.olat.fileresource.types.SharedFolderFileResource in project openolat by klemens.

the class SharedFolderHandler method createResource.

@Override
public RepositoryEntry createResource(Identity initialAuthor, String displayname, String description, Object createObject, Locale locale) {
    RepositoryService repositoryService = CoreSpringFactory.getImpl(RepositoryService.class);
    SharedFolderFileResource folderResource = SharedFolderManager.getInstance().createSharedFolder();
    OLATResource resource = OLATResourceManager.getInstance().findOrPersistResourceable(folderResource);
    RepositoryEntry re = repositoryService.create(initialAuthor, null, SharedFolderFileResource.RESOURCE_NAME, displayname, description, resource, RepositoryEntry.ACC_OWNERS);
    DBFactory.getInstance().commit();
    return re;
}
Also used : SharedFolderFileResource(org.olat.fileresource.types.SharedFolderFileResource) OLATResource(org.olat.resource.OLATResource) RepositoryEntry(org.olat.repository.RepositoryEntry) RepositoryService(org.olat.repository.RepositoryService)

Aggregations

SharedFolderFileResource (org.olat.fileresource.types.SharedFolderFileResource)6 OLATResource (org.olat.resource.OLATResource)6 VFSContainer (org.olat.core.util.vfs.VFSContainer)4 RepositoryEntry (org.olat.repository.RepositoryEntry)4 RepositoryService (org.olat.repository.RepositoryService)4 File (java.io.File)2 LocalFileImpl (org.olat.core.util.vfs.LocalFileImpl)2 CourseConfig (org.olat.course.config.CourseConfig)2 SharedFolderManager (org.olat.modules.sharedfolder.SharedFolderManager)2 RepositoryEntryImportExport (org.olat.repository.RepositoryEntryImportExport)2 OLATResourceManager (org.olat.resource.OLATResourceManager)2 ReferenceManager (org.olat.resource.references.ReferenceManager)2