Class UrlDataExtractor
java.lang.Object
net.sourceforge.plantuml.servlet.utility.UrlDataExtractor
Utility class to extract the index and diagram source from an URL, e.g., returned by `request.getRequestURI()`.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetEncodedDiagram(String url) Get encoded diagram source from URL.static StringgetEncodedDiagram(String url, String fallback) Get encoded diagram source from URL.static intGet diagram index from URL.static intGet diagram index from URL.
-
Constructor Details
-
UrlDataExtractor
public UrlDataExtractor()
-
-
Method Details
-
getIndex
Get diagram index from URL.- Parameters:
url- URL to analyse, e.g., returned by `request.getRequestURI()`- Returns:
- if exists diagram index; otherwise -1
-
getIndex
Get diagram index from URL.- Parameters:
url- URL to analyse, e.g., returned by `request.getRequestURI()`fallback- fallback index if no index exists inurl- Returns:
- if exists diagram index; otherwise
fallback
-
getEncodedDiagram
Get encoded diagram source from URL.- Parameters:
url- URL to analyse, e.g., returned by `request.getRequestURI()`- Returns:
- if exists diagram index; otherwise `null`
-
getEncodedDiagram
Get encoded diagram source from URL.- Parameters:
url- URL to analyse, e.g., returned by `request.getRequestURI()`fallback- fallback if no encoded diagram source exists inurl- Returns:
- if exists diagram index; otherwise
fallback
-