-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #53 ui init * #53 add resources to ui module * update handler mapping * update handler mapping * working example of resourcehandler inside of module * working example of resourcehandler inside of module * #53 add servlet support * #53 remove servlet test support * #53 backend for filesystem manipulation * #53 backend for filesystem manipulation * #61 remove ui module * #61 ready to merge --------- Co-authored-by: Thorsten Marx <[email protected]>
- Loading branch information
Showing
59 changed files
with
292 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
cms-api/src/main/java/com/github/thmarx/cms/api/extensions/Mapping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.github.thmarx.cms.api.extensions; | ||
|
||
/*- | ||
* #%L | ||
* cms-api | ||
* %% | ||
* Copyright (C) 2023 Marx-Software | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* #L% | ||
*/ | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
import org.eclipse.jetty.http.pathmap.PathSpec; | ||
import org.eclipse.jetty.server.Handler; | ||
|
||
/** | ||
* | ||
* @author thmar | ||
*/ | ||
public class Mapping { | ||
|
||
private Map<PathSpec, Handler> handlerMapping; | ||
|
||
public Mapping () { | ||
handlerMapping = new HashMap<>(); | ||
} | ||
|
||
public void add (PathSpec pathSpec, Handler handler) { | ||
handlerMapping.put(pathSpec, handler); | ||
} | ||
|
||
public Optional<Handler> getMatchingHandler (String uri) { | ||
return handlerMapping.entrySet().stream().filter(entry -> entry.getKey().matches(uri)).map(entry -> entry.getValue()).findFirst(); | ||
} | ||
|
||
public List<Handler> getHandlers () { | ||
return new ArrayList<>(handlerMapping.values()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Das ist der neue Titel | ||
--- | ||
|
||
Das ist der ganz aktuelle Inhalt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
POST http://localhost:1010/module/ui-module/file-system/create?path=.technical&filename=test&type=folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE http://localhost:1010/module/ui-module/file-system/delete?path=.technical/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
POST http://localhost:1010/module/ui-module/file-system/create?path=.technical/test&filename=example.md&type=file | ||
|
||
--- | ||
title: Das ist der Titel | ||
--- | ||
\# Neue Datei | ||
|
||
Das ist der Inhalt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GET http://localhost:1010/module/ui-module/file-system/read?path=.technical/test/example.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PUT http://localhost:1010/module/ui-module/file-system/write?path=.technical/test/example.md | ||
|
||
--- | ||
title: Das ist der neue Titel | ||
--- | ||
# Neuerer Datei | ||
|
||
Das ist der ganz aktuelle Inhalt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GET http://localhost:1010/module/ui-module/file-system/list?path=.technical |
Binary file modified
BIN
-62 Bytes
(99%)
cms-server/modules/example-module/libs/example-module-2.5.0-SNAPSHOT.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-114 KB
cms-server/modules/pug-module/libs/concurrentlinkedhashmap-lru-1.4.2.jar
Binary file not shown.
Binary file removed
BIN
-16.4 KB
cms-server/modules/pug-module/libs/error_prone_annotations-2.21.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-5.15 KB
cms-server/modules/pug-module/libs/flexmark-util-builder-0.62.2.jar
Binary file not shown.
Binary file removed
BIN
-65.1 KB
cms-server/modules/pug-module/libs/flexmark-util-collection-0.62.2.jar
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-16 KB
cms-server/modules/pug-module/libs/flexmark-util-dependency-0.62.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-218 KB
cms-server/modules/pug-module/libs/flexmark-util-sequence-0.62.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.