KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > suberic > pooka > StringSignatureGenerator


1 package net.suberic.pooka;
2
3 /**
4  * This is a simple SignatureGenerator which just returns a property
5  * value as a signature.
6  */

7 public class StringSignatureGenerator extends SignatureGeneratorImpl {
8
9     public StringSignatureGenerator() {
10     }
11
12     /**
13      * Returns the UserProfile.username.signature property as a signature.
14      */

15     
16     public String JavaDoc generateSignature(String JavaDoc text) {
17     if (profile != null) {
18         String JavaDoc returnValue = Pooka.getProperty("UserProfile." + profile.getName() + ".signature", "");
19         if (!returnValue.equals(""))
20         return returnValue;
21     }
22
23     return null;
24     }
25
26 }
27
Popular Tags