de.tuberlin.cs.flp.jspwiki.util
|
|||
public static
String
|
capitalize(String s)
Sets the first charcater in
s to upper case.
|
||
public static
int[]
|
determineImageSize(InputStream in)
|
||
public static
String
|
escape(String s, char c)
Escapes all occurrences of
c in s by a backslash.
|
||
public static
Attachment
|
findImageAttachment(WikiEngine engine, String pagename)
Returns first image-attachment, or null if no attachment is an image or no attachments at all exist.
|
||
public static
Attachment
|
findImageAttachment(WikiEngine engine, String pagename, Collection attachments)
Returns first image-attachment, or null if no attachment is an image or no attachments at all exist.
|
||
public static
String
|
format(Map m, String f)
Entries starting with % will be replaced by values in map.
|
||
public static
String
|
getProperty(WikiEngine engine, String propertyName, String defaultPagename)
|
||
public static
boolean
|
isImage(WikiEngine engine, String name)
|
||
public static
String
|
keyByValue(Properties p, String v)
Gets the key of a property entry by the given value.
|
||
public static
String
|
makePagename(WikiEngine engine, String s)
Creates a valid wiki page name from s.
I.e., blanks are removes and the string is converted to CamelCase.
### Is there any corresponding function available in JSPWiki?
|
||
public static
String
|
normalizeLF(String s)
Makes sure only '\n' is used as linebreak, not '\r\n'.
|
||
public static
String
|
normalizeName(String name)
Makes sure that an entry's name can be used as a filename.
|
||
public static
boolean
|
parseBoolean(String s)
|
||
public static
boolean
|
parseBoolean(String s, boolean deflt)
|
||
public static
Collection
|
parseList(String s)
Parses a comma-seperated list of strings.
|
||
public static
Collection
|
parseMultiParameter(HttpServletRequest request, String name)
|
||
public static
Properties
|
parseProperties(String s, String entryDelim)
|
||
public static
Collection
|
parseWikiLinks(String pagedata)
Parses Wiki-markup and returns a collection of all links included in the page.
The links are capitalized (first letter upper case), in order to be
usable as page-names, which seem to be all uppercase in JSPWiki.
(I.e., all strings that are enclosed by "[]".)
|
||
public static
Collection
|
parseWikiLinks(WikiEngine engine, String pagename)
Returns all Wiki-link targets included in a page.
These are all pages referenced by the specified page.
|
||
public static
byte[]
|
readInputStream(InputStream in)
|
||
public static
String
|
repeat(int cnt, char c)
Creates a string in which
c is repeated cnt times.
|
||
public static
String
|
replace(String s, String search, String repl)
|
||
public static
Collection
|
split(String s, char c)
Splits a string at the specified character occurrences.
|
||
public static
Collection
|
split(String s, String delim)
Splits a string at the specified substring occurrences.
|
||
public static
Collection
|
split(String s)
Split at commas (',').
|
||
public static
List
|
splitCamelCase(String s)
|
||
public static
Collection
|
splitLines(String s)
Split at line-feed ('\n').
|
||
public static
Map
|
subMap(Map map, String prefix)
|
||
public static
String
|
toCamelCase(String s)
|
Tagged Values | |
static
|
false
|
documentation#author
|
Jens Gulden
|
|
s
to upper case.
s
- The string to be capitalized.
public static
int[] determineImageSize(InputStream in)
in
-
public static
String
escape(String s, char c)
c
in s
by a backslash.
s
- The string to be escaped.
c
- The character to be escaped.
public static
Attachment findImageAttachment(WikiEngine engine, String pagename)
engine
-
pagename
-
public static
Attachment findImageAttachment(WikiEngine engine, String pagename, Collection attachments)
engine
-
pagename
-
attachments
-
public static
String
format(Map m, String f)
m
- The map.
f
- Template string including %xxx-substrings that will be replaced by map values.
public static
String
getProperty(WikiEngine engine, String propertyName, String defaultPagename)
engine
-
propertyName
-
defaultPagename
-
public static
boolean isImage(WikiEngine engine, String name)
engine
-
name
-
public static
String
keyByValue(Properties p, String v)
p
- The properties.
v
- The value string.
public static
String
makePagename(WikiEngine engine, String s)
engine
-
s
-
public static
String
normalizeLF(String s)
s
-
public static
String
normalizeName(String name)
name
- The entry name.
public static
boolean parseBoolean(String s)
s
-
public static
boolean parseBoolean(String s, boolean deflt)
s
-
deflt
-
public static
Collection
parseList(String s)
s
- comma-seperated list of string
public static
Collection
parseMultiParameter(HttpServletRequest request, String name)
request
-
name
-
public static
Properties
parseProperties(String s, String entryDelim)
s
-
entryDelim
-
public static
Collection
parseWikiLinks(String pagedata)
pagedata
- The page text.
public static
Collection
parseWikiLinks(WikiEngine engine, String pagename)
engine
- The WikiEngine
pagename
- name of the page to retrieve links from.
public static
byte[] readInputStream(InputStream in)
in
-
public static
String
repeat(int cnt, char c)
c
is repeated cnt
times.
cnt
- Number of repetitions.
c
- The characater to be repeated.
public static
String
replace(String s, String search, String repl)
s
-
search
-
repl
-
public static
Collection
split(String s, char c)
s
- The string to be split.
c
- The character at the occurrences of which the splitting is performed.
c
.
Contains a single element (whole s
) if c
is not contained in s
.
public static
Collection
split(String s, String delim)
s
- The string to be split.
delim
- The substring at the occurrences of which the splitting is performed.
c
.
Contains a single element (whole s
) if c
is not contained in s
.
public static
Collection
split(String s)
s
-
public static
List
splitCamelCase(String s)
s
-
public static
Collection
splitLines(String s)
s
-
public static
Map
subMap(Map map, String prefix)
map
-
prefix
-
public static
String
toCamelCase(String s)
s
-