File tree Expand file tree Collapse file tree
src/main/java/org/cryptomator/integrations/filemanagersidebar Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,23 +17,21 @@ public interface SidebarService {
1717 *
1818 * @param displayName The display name of the sidebar entry
1919 * @param target The filesystem path the sidebar entry points to.
20- * @return a @{link SidebarEntry } object
20+ * @return a @{link SidebarEntry } object, used to remove the entry again
21+ * @apiNote Depending on the implemenation, the display name may not be used.
2122 */
22- SidebarEntry add (@ NotNull String displayName , @ NotNull Path target ) throws SidebarServiceException ;
23+ SidebarEntry add (@ NotNull Path target , @ NotNull String displayName ) throws SidebarServiceException ;
2324
2425 /**
25- * An entry of the filemanager sidebar, created with this service.
26+ * An entry of the filemanager sidebar, created by an implementation of this service.
2627 */
27- interface SidebarEntry extends Closeable {
28+ interface SidebarEntry {
2829
2930 /**
3031 * Removes this entry from the sidebar. Once removed, this object cannot be added again.
3132 */
32- void remove () throws SidebarServiceException ;
33+ void remove ();
3334
34- default void close () {
35- remove ();
36- }
3735 }
3836
3937 static Optional <SidebarService > get () {
Original file line number Diff line number Diff line change 11package org .cryptomator .integrations .filemanagersidebar ;
22
3- public class SidebarServiceException extends RuntimeException {
3+ public class SidebarServiceException extends Exception {
4+
5+ public SidebarServiceException (String message ) {
6+ super (message );
7+ }
8+
9+ public SidebarServiceException (String message , Throwable t ) {
10+ super (message , t );
11+ }
412}
You can’t perform that action at this time.
0 commit comments