KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > user > provider > file > SerializableProfileProvider


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.user.provider.file;
6
7 import org.apache.commons.logging.Log;
8 import org.apache.commons.logging.LogFactory;
9
10
11 import java.util.Properties JavaDoc;
12
13
14 /**
15 * Following properties are <b>required</b>:
16 * <ul>
17 * <li><b>storeFile</b> - the absolute path to the store file
18 (<i>ex:c:\properties.store</i>)</li>
19 * </ul>
20 */

21 public class SerializableProfileProvider extends FileProfileProvider {
22     //~ Static fields/initializers /////////////////////////////////////////////
23

24     protected static final Log log = LogFactory.getLog(SerializableProfileProvider.class);
25
26     public boolean init(Properties JavaDoc properties) {
27         boolean retVal = super.init(properties);
28
29         if (retVal) {
30             propertySetCache = new SerializablePropertySetCache(properties.getProperty("storeFile"), properties.getProperty("storeFileType"));
31
32             return true;
33         }
34
35         return false;
36     }
37
38 }
39
40
Popular Tags