KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > common > util > Loader


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.common.util;
10
11 import java.io.InputStream JavaDoc;
12
13 /**
14  * A generic interface which define loading capabilities.
15  * The name format must follow the regular expression : ^(/[-a-zA-Z0-9_\.]+)+$
16  *
17  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
18  * @version $Revision: 1.1 $
19  */

20 public interface Loader
21 {
22
23    /** Helper to validate name. */
24    String JavaDoc REGEX_NAME_VALIDATOR = "^(/[-a-zA-Z0-9_\\.]+)+$";
25
26    /**
27     * Returns an InputStream or null if not found.
28     */

29    InputStream JavaDoc load(String JavaDoc name);
30 }
31
Popular Tags