src/java/isac/util/users/UserAdmin.java
author wneuper
Wed, 15 Jun 2005 18:31:02 +0200
branchjava_rename_format
changeset 3922 fcd5648113ca
permissions -rw-r--r--
java: isac.util.tactics .. end renamed, formatted, inst_var_, import cleaned
     1 /*
     2  * @author Walther Neuper, member of the ISAC-team, 
     3  * Copyright (c) 2005 by Walther Neuper 
     4  * created Mar 12, 2005 8:55:37 AM
     5  * Institute for Softwaretechnology, Graz University of Technology, Austria.
     6  * 
     7  * Use is subject to PGPL license terms.
     8  */
     9 package isac.util.users;
    10 
    11 import java.io.FileOutputStream;
    12 import java.io.IOException;
    13 import java.util.Properties;
    14 
    15 /**
    16  * @author Walther Neuper
    17  * 
    18  * contains administrative data (and nothing about the dialog !!!) looking
    19  * forward to be handled elsewhere outside isac
    20  */
    21 public class UserAdmin extends Properties {
    22 
    23     private String userpath_;
    24 
    25     private String username_;
    26 
    27     public UserAdmin(String userpath, String username) {
    28         userpath_ = userpath;
    29         username_ = username;
    30         //TODO.WN050311
    31     }
    32 
    33     //WN050311 just for creation of the first file
    34     //beware of the fix path !
    35     public static void main(String[] args) {
    36         UserAdmin a = new UserAdmin("isac/xmldata/users", "x");
    37         a.setProperty("firstName", "x-firstName");
    38         a.setProperty("lastName", "x-lastName");
    39 
    40         String filename = "isac/xmldata/users/x_admin.txt";
    41         try {
    42             FileOutputStream propOutFile = new FileOutputStream(filename);
    43             a.store(propOutFile, "administrative data of user 'x'");
    44 
    45         } catch (IOException e) {
    46             System.err.println("I/O failed.");
    47         }
    48 
    49     }
    50 
    51 }