+ Hashtable rstrings = replacementArgs(ids, seqstr, string);
+ Object[] stubs = makeUrlsIf(false, rstrings, b);
+ if (stubs != null)
+ {
+ return new Object[] { stubs[0], stubs[1], rstrings,
+ new boolean[]
+ { b } };
+ }
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * generate the URL for the given URL stub object array returned from
+ * makeUrlStubs
+ *
+ * @param stubs
+ * @return URL string.
+ * @throws UrlStringTooLongException
+ */
+ public String constructFrom(Object[] stubs)
+ throws UrlStringTooLongException
+ {
+ Object[] results = makeUrlsIf(true, (Hashtable) stubs[2],
+ ((boolean[]) stubs[3])[0]);
+ return ((String[]) results[3])[0];
+ }
+
+ /**
+ * conditionally generate urls or stubs for a given input.
+ *
+ * @param createFullUrl
+ * set to false if you only want to test if URLs would be generated.
+ * @param repstrings
+ * @param onlyIfMatches
+ * @return null if no url is generated. Object[] { int[] { number of matches
+ * seqs }, boolean[] { which matched }, (if createFullUrl also has
+ * StringBuffer[] { segment generated from inputs that is used in URL
+ * }, String[] { url })}
+ * @throws UrlStringTooLongException
+ */
+ protected Object[] makeUrlsIf(boolean createFullUrl, Hashtable repstrings,
+ boolean onlyIfMatches) throws UrlStringTooLongException
+ {
+ int pass = 0;
+