private boolean setReadOnlyEntries(UserRequest ureq, List<RepositoryEntry> entries) { boolean allOk = true; for (RepositoryEntry entry : entries) { RepositoryEntry reloadedEntry = repositoryService.loadByKey(entry.getKey()); if (reloadedEntry != null) { repositoryService.closeRepositoryEntry(reloadedEntry); ThreadLocalUserActivityLogger.log( LearningResourceLoggingAction.LEARNING_RESOURCE_DEACTIVATE, getClass(), LoggingResourceable.wrap(reloadedEntry, OlatResourceableType.genRepoEntry)); fireEvent( ureq, new EntryChangedEvent(reloadedEntry, getIdentity(), Change.closed, "closed")); } } return allOk; }
public ConfirmCloseController( UserRequest ureq, WindowControl wControl, List<RepositoryEntry> rows) { super( ureq, wControl, "confirm_close", Util.createPackageTranslator(RepositoryService.class, ureq.getLocale())); numOfMembers = repositoryService.countMembers(rows, getIdentity()); this.rows = rows; initForm(ureq); }
private RepositoryEntry createTemplate( Identity initialAuthor, String displayname, String description) { OLATResource resource = portfolioService.createBinderTemplateResource(); RepositoryEntry re = repositoryService.create( initialAuthor, null, "", displayname, description, resource, RepositoryEntry.ACC_OWNERS); portfolioService.createAndPersistBinderTemplate(initialAuthor, re, Locale.ENGLISH); return re; }