Class ClientProperties


  • public class ClientProperties
    extends java.lang.Object
    Persistently store client configurations in a property file. This property file is located in the CardContact folder at the user's home directory.
    Author:
    lew
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendServerURL​(java.lang.String newUrl)
      Append a new server URL to the set of permitted server URLs
      void appendToIgnored​(java.util.HashSet<java.lang.String> reader)
      Append the given set of reader names to the set of already stored names.
      static ClientProperties getClientProperties()  
      java.util.HashSet<java.lang.String> getIgnoredReader()
      Get a set of all ignored card reader names.
      java.lang.String getReaderName()  
      java.util.HashSet<java.lang.String> getServerURL()  
      void saveIgnoredReader​(java.util.HashSet<java.lang.String> ignored)
      Overwrite the current set of ignored card reader names with the given set.
      void saveReaderName​(java.lang.String reader)
      Save the selected reader name
      void saveServerURL​(java.util.HashSet<java.lang.String> urlSet)
      Overwrite the current set of permitted server URLs with the given set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • saveReaderName

        public void saveReaderName​(java.lang.String reader)
        Save the selected reader name
        Parameters:
        reader - the selected card terminal name
      • getReaderName

        public java.lang.String getReaderName()
        Returns:
        the selected card terminal name
      • appendToIgnored

        public void appendToIgnored​(java.util.HashSet<java.lang.String> reader)
        Append the given set of reader names to the set of already stored names. These card reader will be ignored by the client.
        Parameters:
        reader -
      • getIgnoredReader

        public java.util.HashSet<java.lang.String> getIgnoredReader()
        Get a set of all ignored card reader names. These card reader will be ignored by the client.
        Returns:
        the set of ignored card reader names
      • saveIgnoredReader

        public void saveIgnoredReader​(java.util.HashSet<java.lang.String> ignored)
        Overwrite the current set of ignored card reader names with the given set.
        Parameters:
        ignored - the set of ignored card reader names
      • saveServerURL

        public void saveServerURL​(java.util.HashSet<java.lang.String> urlSet)
        Overwrite the current set of permitted server URLs with the given set.
        Parameters:
        urlSet - the set of permitted server URLs
      • appendServerURL

        public void appendServerURL​(java.lang.String newUrl)
        Append a new server URL to the set of permitted server URLs
        Parameters:
        newUrl - the server URL
      • getServerURL

        public java.util.HashSet<java.lang.String> getServerURL()
        Returns:
        the set of permitted server URLs