public abstract class HomeApplication
extends java.lang.Object
Constructor and Description |
---|
HomeApplication() |
Modifier and Type | Method and Description |
---|---|
void |
addHome(Home home)
Adds a given
home to the homes list of this application. |
void |
addHomesListener(CollectionListener<Home> listener)
Adds the home
listener in parameter to this application. |
Home |
createHome()
Returns a new home.
|
void |
deleteHome(Home home)
Removes a given
home from the homes list of this application. |
abstract HomeRecorder |
getHomeRecorder()
Returns the default recorder able to write and read homes.
|
HomeRecorder |
getHomeRecorder(HomeRecorder.Type type)
Returns a recorder of a given
type able to write and read homes. |
java.util.List<Home> |
getHomes()
Returns an unmodifiable collection of the homes of this application.
|
java.lang.String |
getId()
Returns the id of this application.
|
java.lang.String |
getName()
Returns the name of this application.
|
abstract UserPreferences |
getUserPreferences()
Returns user preferences.
|
java.lang.String |
getVersion()
Returns information about the version of this application.
|
void |
removeHomesListener(CollectionListener<Home> listener)
Removes the home
listener in parameter from this application. |
public void addHomesListener(CollectionListener<Home> listener)
listener
in parameter to this application.public void removeHomesListener(CollectionListener<Home> listener)
listener
in parameter from this application.public Home createHome()
public java.util.List<Home> getHomes()
public void addHome(Home home)
home
to the homes list of this application.
Once the home
is added, home listeners added
to this application will receive a
collectionChanged
notification, with an event type
equal to ADD
.public void deleteHome(Home home)
home
from the homes list of this application.
Once the home
is removed, home listeners added
to this application will receive a
collectionChanged
notification, with an event type
equal to DELETE
.public abstract HomeRecorder getHomeRecorder()
public HomeRecorder getHomeRecorder(HomeRecorder.Type type)
type
able to write and read homes.
Subclasses may override this method to return a recorder matching type
.type
- a hint for the application to choose the returned recorder.public abstract UserPreferences getUserPreferences()
public java.lang.String getName()
public java.lang.String getVersion()
public java.lang.String getId()
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License