diff --git a/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java b/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java index 88da8b8..fc5163c 100644 --- a/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java +++ b/src/main/java/net/sourceforge/plantuml/servlet/PlantUmlServlet.java @@ -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); } diff --git a/src/main/java/net/sourceforge/plantuml/servlet/utility/SourceInformation.java b/src/main/java/net/sourceforge/plantuml/servlet/utility/SourceInformation.java deleted file mode 100644 index 7565fb6..0000000 --- a/src/main/java/net/sourceforge/plantuml/servlet/utility/SourceInformation.java +++ /dev/null @@ -1,40 +0,0 @@ -/* ======================================================================== - * PlantUML : a free UML diagram generator - * ======================================================================== - * - * Project Info: http://plantuml.sourceforge.net - * - * 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("[["); - } - -} diff --git a/src/main/java/net/sourceforge/plantuml/servlet/utility/package.html b/src/main/java/net/sourceforge/plantuml/servlet/utility/package.html index 0ce2b66..570e7b4 100644 --- a/src/main/java/net/sourceforge/plantuml/servlet/utility/package.html +++ b/src/main/java/net/sourceforge/plantuml/servlet/utility/package.html @@ -4,7 +4,6 @@