diff --git a/src/main/java/org/olat/core/commons/editor/htmleditor/WysiwygFactory.java b/src/main/java/org/olat/core/commons/editor/htmleditor/WysiwygFactory.java index 4ece1a0c8b59938fa53ace9e762fd2f97f5dade6..bbe50594acfa3a3d69d45149e527007c2dda9e0f 100644 --- a/src/main/java/org/olat/core/commons/editor/htmleditor/WysiwygFactory.java +++ b/src/main/java/org/olat/core/commons/editor/htmleditor/WysiwygFactory.java @@ -62,8 +62,8 @@ public class WysiwygFactory { * true: check if file has been created with another tool and * warn user about potential data loss; false: ignore other * authoring tools - * @param userActivityLogger - * the userActivity Logger if used + * @param versions + * * @return */ public static HTMLEditorController createWysiwygController(UserRequest ureq, WindowControl wControl, @@ -74,17 +74,9 @@ public class WysiwygFactory { public static HTMLEditorController createWysiwygController(UserRequest ureq, WindowControl wControl, VFSContainer rootDir, String filePath, boolean editorCheckEnabled, boolean versions, VFSEdusharingProvider edusharingProvider) { - return new HTMLEditorController(ureq, wControl, rootDir, filePath, null, null, editorCheckEnabled, versions, - edusharingProvider); + return createWysiwygController(ureq, wControl, rootDir, filePath, null, editorCheckEnabled, versions, edusharingProvider); } - - public static HTMLEditorController createWysiwygController( - UserRequest ureq, WindowControl wControl, VFSContainer rootDir, - String filePath, String mediaPath, boolean editorCheckEnabled, boolean versions) { - return new HTMLEditorController(ureq, wControl, rootDir, filePath, - null, mediaPath, editorCheckEnabled, versions, null); - } - + public static HTMLEditorController createWysiwygController(UserRequest ureq, WindowControl wControl, VFSContainer rootDir, String filePath, String mediaPath, boolean editorCheckEnabled, boolean versions, VFSEdusharingProvider edusharingProvider) { diff --git a/src/main/java/org/olat/core/commons/services/doceditor/wopi/WopiRestHelper.java b/src/main/java/org/olat/core/commons/services/doceditor/wopi/WopiRestHelper.java index 4642099a7ef1c56c7fba47d7e8f5e859370a7f80..7548b8a3eb2b6ab643e3cd5caddc968ced120968 100644 --- a/src/main/java/org/olat/core/commons/services/doceditor/wopi/WopiRestHelper.java +++ b/src/main/java/org/olat/core/commons/services/doceditor/wopi/WopiRestHelper.java @@ -39,11 +39,6 @@ public class WopiRestHelper { return requestHeader != null && !requestHeader.isEmpty()? requestHeader.get(0): null; } - public static String getLastModifiedAsIso8601(File file) { - long lastModified = file.lastModified(); - return Instant.ofEpochMilli(lastModified).toString(); - } - public static String getAsIso8601(Date date) { long lastModified = date.getTime(); return Instant.ofEpochMilli(lastModified).toString(); diff --git a/src/main/java/org/olat/core/gui/components/Window.java b/src/main/java/org/olat/core/gui/components/Window.java index ae1568993509e105c60283f5d0e4eaebc6b720e0..601014bec2b65ebbc0d2c136bf745e6eab6e0c2e 100644 --- a/src/main/java/org/olat/core/gui/components/Window.java +++ b/src/main/java/org/olat/core/gui/components/Window.java @@ -195,7 +195,7 @@ public class Window extends AbstractComponent implements CustomCSSDelegate { /** * @param name - * @param chiefController + * @param wbackoffice */ public Window(String name, String csrfToken, WindowBackOfficeImpl wbackoffice) { super(name); @@ -221,7 +221,7 @@ public class Window extends AbstractComponent implements CustomCSSDelegate { /** * - * @param guiThemeBaseUri the URI of the base folder of the current Gui theme, r.g. 'http://www.myserver.com/olat/raw/themes/default/' + * @param guiTheme the URI of the base folder of the current Gui theme, r.g. 'http://www.myserver.com/olat/raw/themes/default/' */ public void setGuiTheme(Theme guiTheme) { this.guiTheme = guiTheme; @@ -241,8 +241,9 @@ public class Window extends AbstractComponent implements CustomCSSDelegate { return title; } - /** - * @param title The new title of this window (for browser history) + /** + * @param translator + * @param newTitle The new title of this window (for browser history) */ public void setTitle(Translator translator, String newTitle) { this.title = translator.translate("page.appname") + " - " + newTitle; @@ -1159,9 +1160,7 @@ public class Window extends AbstractComponent implements CustomCSSDelegate { * * @param win the window id the new url * @param timestampId - * @param componentId * @param moduleUri - * @param bc the businesscontrolpath * @return the new (relative) url as a string */ public String buildURIFor(Window win, String timestampId, String moduleUri) { diff --git a/src/main/java/org/olat/core/gui/control/generic/wizard/WizardController.java b/src/main/java/org/olat/core/gui/control/generic/wizard/WizardController.java index 2d0d3728bb491ead7d14061bd8d76d82a101ad73..c587030c742e44d6e6019bea316d0da65b44bbfc 100644 --- a/src/main/java/org/olat/core/gui/control/generic/wizard/WizardController.java +++ b/src/main/java/org/olat/core/gui/control/generic/wizard/WizardController.java @@ -75,12 +75,6 @@ public class WizardController extends BasicController { wizardVC.put("wic", wic.getInitialComponent()); putInitialPanel(wizardVC); } - - public String getAndRemoveWizardTitle() { - String wizardTitle = (String)wizardVC.contextGet("wizardTitle"); - wizardVC.contextRemove("wizardTitle"); - return wizardTitle; - } /** * @param wizardTitle @@ -89,15 +83,6 @@ public class WizardController extends BasicController { wizardVC.contextPut("wizardTitle", wizardTitle); } - /** - * @param stepTitle - * @param component - */ - public void setBackWizardStep(String stepTitle, Component component) { - this.currentStep--; - setWizardVcContent(stepTitle, component); - } - /** * @param stepTitle * @param component diff --git a/src/main/java/org/olat/core/util/ZipUtil.java b/src/main/java/org/olat/core/util/ZipUtil.java index 12d2edbb0008de624c7a1098c1db958d6a2522cc..c34e63cb2b97dea5ede94b2f5cc4d12ae5d01cbe 100644 --- a/src/main/java/org/olat/core/util/ZipUtil.java +++ b/src/main/java/org/olat/core/util/ZipUtil.java @@ -431,76 +431,12 @@ public class ZipUtil { } vfsRepositoryService.updateMetadata(info); } - - /** - * Check if a file in the zip is already in the path - * @param zipLeaf - * @param targetDir - * @param identity - * @param isAdmin - * @return the list of files which already exist - */ - public static List<String> checkLockedFileBeforeUnzip(VFSLeaf zipLeaf, VFSContainer targetDir, Identity identity) { - List<String> lockedFiles = new ArrayList<>(); - VFSLockManager vfsLockManager = CoreSpringFactory.getImpl(VFSLockManager.class); - - try(InputStream in = zipLeaf.getInputStream(); - ZipInputStream oZip = new ZipInputStream(in)) { - // unzip files - ZipEntry oEntr = oZip.getNextEntry(); - while (oEntr != null) { - if (oEntr.getName() != null && !oEntr.getName().startsWith(DIR_NAME__MACOSX)) { - if (oEntr.isDirectory()) { - // skip MacOSX specific metadata directory - // directories aren't locked - oZip.closeEntry(); - oEntr = oZip.getNextEntry(); - continue; - } else { - // search file - VFSContainer createIn = targetDir; - String name = oEntr.getName(); - // check if entry has directories which did not show up as - // directories above - int dirSepIndex = name.lastIndexOf('/'); - if (dirSepIndex == -1) { - // try it windows style, backslash is also valid format - dirSepIndex = name.lastIndexOf('\\'); - } - if (dirSepIndex > 0) { - // get subdirs - createIn = getAllSubdirs(targetDir, name.substring(0, dirSepIndex), identity, false); - if (createIn == null) { - //sub directories don't exist, and aren't locked - oZip.closeEntry(); - oEntr = oZip.getNextEntry(); - continue; - } - name = name.substring(dirSepIndex + 1); - } - - VFSLeaf newEntry = (VFSLeaf)createIn.resolve(name); - if(vfsLockManager.isLockedForMe(newEntry, identity, VFSLockApplicationType.vfs, null)) { - lockedFiles.add(name); - } - } - } - oZip.closeEntry(); - oEntr = oZip.getNextEntry(); - } - } catch (IOException e) { - return null; - } - return lockedFiles; - } - /** * * @param zipLeaf * @param targetDir * @param identity - * @param roles * @return */ public static List<String> checkLockedFileBeforeUnzipNonStrict(VFSLeaf zipLeaf, VFSContainer targetDir, Identity identity) { diff --git a/src/main/java/org/olat/core/util/xml/XMLParser.java b/src/main/java/org/olat/core/util/xml/XMLParser.java index b237ae9b373f58504a32206cef4285813dfd7048..0f5a51d2c088651a8240280e1f48dd342703cdc8 100644 --- a/src/main/java/org/olat/core/util/xml/XMLParser.java +++ b/src/main/java/org/olat/core/util/xml/XMLParser.java @@ -77,18 +77,4 @@ public class XMLParser { return document; } - /** - * @return entity resolver instance - */ - public EntityResolver getEntityResolver() { - return er; - } - - /** - * @param resolver - */ - public void setEntityResolver(EntityResolver resolver) { - er = resolver; - } - } \ No newline at end of file diff --git a/src/main/java/org/olat/course/nodes/video/VideoEditController.java b/src/main/java/org/olat/course/nodes/video/VideoEditController.java index 0f4c60e7721dd572a138e659e7828fbe9ca4191e..8306f361c1b5cd007d68052163c888a73c3cb502 100644 --- a/src/main/java/org/olat/course/nodes/video/VideoEditController.java +++ b/src/main/java/org/olat/course/nodes/video/VideoEditController.java @@ -361,10 +361,6 @@ class VideoOptionsForm extends FormBasicController{ initForm(ureq); } - public boolean isVideoComments() { - return videoComments.isSelected(0); - } - @Override protected void formOK(UserRequest ureq) { config.setBooleanEntry(VideoEditController.CONFIG_KEY_COMMENTS, videoComments.isSelected(0));