use of org.olat.portfolio.manager.EPStructureManager in project OpenOLAT by OpenOLAT.
the class PortfolioCourseNode method getReferencedRepositoryEntry.
@Override
public RepositoryEntry getReferencedRepositoryEntry() {
Object repoSoftkey = getModuleConfiguration().get(PortfolioCourseNodeConfiguration.REPO_SOFT_KEY);
if (repoSoftkey instanceof String) {
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey((String) repoSoftkey, false);
if (entry != null) {
return entry;
}
}
Long mapKey = (Long) getModuleConfiguration().get(PortfolioCourseNodeConfiguration.MAP_KEY);
if (mapKey != null) {
EPStructureManager eSTMgr = (EPStructureManager) CoreSpringFactory.getBean("epStructureManager");
RepositoryEntry re = eSTMgr.loadPortfolioRepositoryEntryByMapKey(mapKey);
return re;
}
return null;
}
use of org.olat.portfolio.manager.EPStructureManager in project openolat by klemens.
the class PortfolioHandler method importResource.
@Override
public RepositoryEntry importResource(Identity initialAuthor, String initialAuthorAlt, String displayname, String description, boolean withReferences, Locale locale, File file, String filename) {
EPFrontendManager ePFMgr = CoreSpringFactory.getImpl(EPFrontendManager.class);
EPStructureManager eSTMgr = CoreSpringFactory.getImpl(EPStructureManager.class);
RepositoryEntry re = null;
PortfolioStructure structure = EPXStreamHandler.getAsObject(file, false);
if (structure != null) {
OLATResource resource = eSTMgr.createPortfolioMapTemplateResource();
re = CoreSpringFactory.getImpl(RepositoryService.class).create(initialAuthor, null, "", displayname, description, resource, RepositoryEntry.ACC_OWNERS);
ePFMgr.importPortfolioMapTemplate(structure, resource);
}
return re;
}
use of org.olat.portfolio.manager.EPStructureManager in project openolat by klemens.
the class PortfolioCourseNode method getReferencedRepositoryEntry.
@Override
public RepositoryEntry getReferencedRepositoryEntry() {
Object repoSoftkey = getModuleConfiguration().get(PortfolioCourseNodeConfiguration.REPO_SOFT_KEY);
if (repoSoftkey instanceof String) {
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry entry = rm.lookupRepositoryEntryBySoftkey((String) repoSoftkey, false);
if (entry != null) {
return entry;
}
}
Long mapKey = (Long) getModuleConfiguration().get(PortfolioCourseNodeConfiguration.MAP_KEY);
if (mapKey != null) {
EPStructureManager eSTMgr = (EPStructureManager) CoreSpringFactory.getBean("epStructureManager");
RepositoryEntry re = eSTMgr.loadPortfolioRepositoryEntryByMapKey(mapKey);
return re;
}
return null;
}
Aggregations