Commit 39eab592 authored by Maxime Sinclair's avatar Maxime Sinclair
Browse files

[TASK] SourceInformation replaced by PlantumlUtils

a more complete implementation
parent 7d7bdca9
......@@ -42,7 +42,7 @@ import net.sourceforge.plantuml.SourceStringReader;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.code.Transcoder;
import net.sourceforge.plantuml.code.TranscoderUtil;
import net.sourceforge.plantuml.servlet.utility.SourceInformation;
import net.sourceforge.plantuml.api.PlantumlUtils;
import HTTPClient.CookieModule;
import HTTPClient.HTTPConnection;
import HTTPClient.HTTPResponse;
......@@ -144,7 +144,7 @@ public class PlantUmlServlet extends HttpServlet {
request.setAttribute("net.sourceforge.plantuml.servlet.encoded", encoded);
// check if an image map is necessary
if (text != null && SourceInformation.containsLink(text)) {
if (text != null && PlantumlUtils.hasCMapData(text)) {
request.setAttribute("net.sourceforge.plantuml.servlet.mapneeded", Boolean.TRUE);
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
* Project Info:
* This file is part of PlantUML.
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
package net.sourceforge.plantuml.servlet.utility;
* Utility class giving information about a diagram based on its source description.
public class SourceInformation {
* Check if there is a link ([[url]]) in the source of the diagram.
* @param source the full textual representation of a diagram
* @return true if there is at least one link
public static boolean containsLink(String source) {
// TODO build a better implementation
return source.contains("[[");
......@@ -4,7 +4,6 @@
<li>NullOutputStream is used by the Map feature.</li>
<li>UmlExtractor encapsulates the PlantUML library to decode the UML compressed source.</li>
<li>SourceInformation extracts useful information from the full textual source.</li>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment