Ignore:
Timestamp:
Apr 20, 2010, 5:21:42 PM (14 years ago)
Author:
tobias
Message:

comments added
all methods of the wsdl file implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vanHelsing/trunk/gui/src/de/dass_it/vanhelsing/gui/PropertyBundle.java

    r858 r865  
    66import java.util.ResourceBundle;
    77import javax.faces.context.FacesContext;
    8 
     8/**
     9 * Class containing the methods used to access the messages property bundle
     10 * @author tgoecke
     11 *
     12 */
    913public class PropertyBundle{
    1014       
    1115        private static ResourceBundle properties;
    1216        private static final String path = "de.dass_it.vanhelsing.gui.messages";
    13 
     17        /**
     18         * reads the messages property file
     19         */
    1420        private static void initialize(){
    1521                Locale l = FacesContext.getCurrentInstance().getViewRoot().getLocale();
     
    2026                properties = ResourceBundle.getBundle(path, l);
    2127        }
     28        /**
     29         * method returns a single value of a given key
     30         * @param key   key of
     31         * @return      value of the property identified by key. If an exception is thrown, null will be returned
     32         */
    2233        public static String getProperty(String key){
    2334                try{
     
    3243                return null;
    3344        }
     45        /**
     46         * method to retrieve properties with a partial key. a partial key is the first n characters of a key
     47         *
     48         * @param partialKey    first n characters of a property key
     49         * @return      an array of values whose keys started with partialKey. an empty array is returned if no matchings have been found
     50         */
    3451        public static String[] getTypeProperties(String partialKey){
    3552                Enumeration<String> keySet = properties.getKeys();
     
    4562                }
    4663                result.trimToSize();
     64                if (result.size()>0) return (String[]) result.toArray();
    4765                return result.toArray(new String[0]);
    4866        }
Note: See TracChangeset for help on using the changeset viewer.