se.datadosen.jalbum
Class AlbumObjectProperties

java.lang.Object
  extended by se.datadosen.jalbum.AlbumObjectProperties

public class AlbumObjectProperties
extends java.lang.Object

The recommended way to store properties per album object, be it files or directories Relies on XML serialization of a Map of name, value pairs Values may be any Java object adhering to the JavaBeans specification. Object graphs of JavaBean objects may be passed as value

Since:
8.0

Nested Class Summary
static class AlbumObjectProperties.HiddenProperty
          Objects wrapped in this class (like instances of FilterList) are not visible in the keySet() method.
 
Field Summary
static java.lang.String FILE_EXTENSION
           
static java.lang.String FILTER_LIST
           
static java.lang.String IMAGE_SETTINGS_HASH
           
static java.lang.String INCLUDE_ORIGINAL
           
static java.lang.String RATING
           
static java.lang.String TITLE
           
 
Constructor Summary
AlbumObjectProperties(AlbumObject ao)
           
AlbumObjectProperties(java.io.File f)
          To support use of this class from FastFile without need for AlbumObject
 
Method Summary
 boolean containsKey(java.lang.String key)
           
 java.lang.Object get(java.lang.String key)
           
 java.io.File getFile()
          Get file associated with this AlbumObjectProperty object
static java.io.File getPropertyFile(java.io.File f)
           
 java.util.Set<java.lang.String> keySet()
           
 void loadUI(JComponentHolder ui)
          Load UI controls with values from this object
 java.lang.Object put(java.lang.String key, java.lang.Object value)
          Associate a property with a certain key
 java.lang.Object putHidden(java.lang.String key, java.lang.Object value)
           
 java.lang.Object remove(java.lang.String key)
           
 boolean save()
          Store all properties to disk Makes AlbumObject fire a "properties" change event
 void saveUI(JComponentHolder ui)
          Save values of UI controls to this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TITLE

public static final java.lang.String TITLE
See Also:
Constant Field Values

RATING

public static final java.lang.String RATING
See Also:
Constant Field Values

FILTER_LIST

public static final java.lang.String FILTER_LIST
See Also:
Constant Field Values

INCLUDE_ORIGINAL

public static final java.lang.String INCLUDE_ORIGINAL
See Also:
Constant Field Values

IMAGE_SETTINGS_HASH

public static final java.lang.String IMAGE_SETTINGS_HASH
See Also:
Constant Field Values

FILE_EXTENSION

public static final java.lang.String FILE_EXTENSION
See Also:
Constant Field Values
Constructor Detail

AlbumObjectProperties

public AlbumObjectProperties(AlbumObject ao)

AlbumObjectProperties

public AlbumObjectProperties(java.io.File f)
To support use of this class from FastFile without need for AlbumObject

Method Detail

get

public java.lang.Object get(java.lang.String key)

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Associate a property with a certain key

Parameters:
key - String, name describing the property
value - Object, any Object implementing JavaBeans specification
Returns:
Previous associated value

putHidden

public java.lang.Object putHidden(java.lang.String key,
                                  java.lang.Object value)

remove

public java.lang.Object remove(java.lang.String key)

containsKey

public boolean containsKey(java.lang.String key)

keySet

public java.util.Set<java.lang.String> keySet()
Returns:
keys for all non-hidden properties

save

public boolean save()
Store all properties to disk Makes AlbumObject fire a "properties" change event

Returns:
true if properties were actually stored

getFile

public java.io.File getFile()
Get file associated with this AlbumObjectProperty object

Returns:
Property file

getPropertyFile

public static java.io.File getPropertyFile(java.io.File f)

loadUI

public void loadUI(JComponentHolder ui)
Load UI controls with values from this object

Since:
8.2

saveUI

public void saveUI(JComponentHolder ui)
Save values of UI controls to this object

Since:
8.2