Changeset 6025


Ignore:
Timestamp:
2003-11-28T17:37:52+13:00 (20 years ago)
Author:
jmt12
Message:

Added support for the storage and retrieval of the current users email

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Configuration.java

    r5983 r6025  
    6666    /** The string identifying an argument element. */
    6767    static final private String GATHERER_CONFIG_ARGUMENT = "Argument";
     68
     69    static final private String GENERAL_EMAIL_SETTING = "general.email";
    6870    /** The name of a Name Element. */
    6971    static final private String NAME = "Name";
     
    317319    } */
    318320
     321    /** Retrieve the current users email. These are always stored in the general settings.
     322     * @return the email address, if it is set, as a String
     323     */
     324    public String getEmail() {
     325    String email = getString(GENERAL_EMAIL_SETTING, true);
     326    return (email.length() > 0 ? email : null);
     327    }
     328
    319329    /** Retrieve the value of the named property as a FontUIResource. */
    320330    public FontUIResource getFont(String property, boolean general) {
     
    521531    setString(property, general, text.toString());
    522532    } */
     533
     534    /** Establish the current users email.
     535     * @param email the email as a String
     536     */
     537    public void setEmail(String email) {
     538    setString(GENERAL_EMAIL_SETTING, true, email);
     539    }
    523540
    524541    /** Set the named property, from the specified configuration, using the given Font value. */
Note: See TracChangeset for help on using the changeset viewer.