net.officefloor.model
Class AbstractModel

java.lang.Object
  extended by net.officefloor.model.AbstractModel
All Implemented Interfaces:
Model
Direct Known Subclasses:
AbstractTaskAdministrationJoinPointModel, AdministratorModel, AdministratorToOfficeTeamModel, AutoWireDependencyModel, AutoWireFlowModel, AutoWireManagedObjectModel, AutoWireModel, AutoWireModel, AutoWireObjectsModel, AutoWireSupplierModel, AutoWireTeamModel, AutoWireTeamModel, AutoWireTeamsModel, ConformModel, ContextParamModel, DeployedOfficeInputModel, DeployedOfficeModel, DeployedOfficeObjectModel, DeployedOfficeObjectToOfficeFloorInputManagedObjectModel, DeployedOfficeObjectToOfficeFloorManagedObjectModel, DeployedOfficeTeamModel, DeployedOfficeTeamToOfficeFloorTeamModel, DeskManagedObjectDependencyModel, DeskManagedObjectDependencyToDeskManagedObjectModel, DeskManagedObjectDependencyToExternalManagedObjectModel, DeskManagedObjectModel, DeskManagedObjectSourceFlowModel, DeskManagedObjectSourceFlowToExternalFlowModel, DeskManagedObjectSourceFlowToTaskModel, DeskManagedObjectSourceModel, DeskManagedObjectToDeskManagedObjectSourceModel, DeskModel, DutyModel, ExistingItemModel, ExistingItemToTargetItemModel, ExistingModel, ExternalFlowModel, ExternalFlowModel, ExternalManagedObjectModel, ExternalManagedObjectModel, ExternalManagedObjectModel, ExternalManagedObjectToAdministratorModel, ExternalManagedObjectToOfficeGovernanceModel, FilterMappingModel, FilterModel, GwtModuleModel, InitParamModel, MimeMappingModel, OfficeEscalationModel, OfficeEscalationToOfficeSectionInputModel, OfficeFloorInputManagedObjectModel, OfficeFloorInputManagedObjectToBoundOfficeFloorManagedObjectSourceModel, OfficeFloorManagedObjectDependencyModel, OfficeFloorManagedObjectDependencyToOfficeFloorInputManagedObjectModel, OfficeFloorManagedObjectDependencyToOfficeFloorManagedObjectModel, OfficeFloorManagedObjectModel, OfficeFloorManagedObjectSourceFlowModel, OfficeFloorManagedObjectSourceFlowToDeployedOfficeInputModel, OfficeFloorManagedObjectSourceInputDependencyModel, OfficeFloorManagedObjectSourceInputDependencyToOfficeFloorManagedObjectModel, OfficeFloorManagedObjectSourceModel, OfficeFloorManagedObjectSourceTeamModel, OfficeFloorManagedObjectSourceTeamToOfficeFloorTeamModel, OfficeFloorManagedObjectSourceToDeployedOfficeModel, OfficeFloorManagedObjectSourceToOfficeFloorInputManagedObjectModel, OfficeFloorManagedObjectSourceToOfficeFloorSupplierModel, OfficeFloorManagedObjectToOfficeFloorManagedObjectSourceModel, OfficeFloorModel, OfficeFloorSupplierModel, OfficeFloorTeamModel, OfficeGovernanceAreaModel, OfficeGovernanceModel, OfficeGovernanceToOfficeTeamModel, OfficeInputManagedObjectDependencyModel, OfficeInputManagedObjectDependencyToExternalManagedObjectModel, OfficeInputManagedObjectDependencyToOfficeManagedObjectModel, OfficeManagedObjectDependencyModel, OfficeManagedObjectDependencyToExternalManagedObjectModel, OfficeManagedObjectDependencyToOfficeManagedObjectModel, OfficeManagedObjectModel, OfficeManagedObjectSourceFlowModel, OfficeManagedObjectSourceFlowToOfficeSectionInputModel, OfficeManagedObjectSourceModel, OfficeManagedObjectSourceTeamModel, OfficeManagedObjectSourceTeamToOfficeTeamModel, OfficeManagedObjectToAdministratorModel, OfficeManagedObjectToOfficeGovernanceModel, OfficeManagedObjectToOfficeManagedObjectSourceModel, OfficeModel, OfficeSectionInputModel, OfficeSectionManagedObjectModel, OfficeSectionManagedObjectTeamModel, OfficeSectionManagedObjectToOfficeGovernanceModel, OfficeSectionModel, OfficeSectionObjectModel, OfficeSectionObjectToExternalManagedObjectModel, OfficeSectionObjectToOfficeManagedObjectModel, OfficeSectionOutputModel, OfficeSectionOutputToOfficeSectionInputModel, OfficeSectionResponsibilityModel, OfficeSectionResponsibilityToOfficeTeamModel, OfficeStartModel, OfficeStartToOfficeSectionInputModel, OfficeSubSectionModel, OfficeSubSectionToOfficeGovernanceModel, OfficeTaskModel, OfficeTaskToOfficeGovernanceModel, OfficeTaskToPostDutyModel, OfficeTaskToPreDutyModel, OfficeTeamModel, PropertyFileModel, PropertyFileModel, PropertyModel, PropertyModel, PropertyModel, PropertyModel, PropertyModel, PropertyModel, PropertyModel, SectionManagedObjectDependencyModel, SectionManagedObjectDependencyToExternalManagedObjectModel, SectionManagedObjectDependencyToSectionManagedObjectModel, SectionManagedObjectModel, SectionManagedObjectSourceFlowModel, SectionManagedObjectSourceFlowToExternalFlowModel, SectionManagedObjectSourceFlowToSubSectionInputModel, SectionManagedObjectSourceModel, SectionManagedObjectToSectionManagedObjectSourceModel, SectionModel, ServletMappingModel, ServletModel, SubSectionInputModel, SubSectionModel, SubSectionObjectModel, SubSectionObjectToExternalManagedObjectModel, SubSectionObjectToSectionManagedObjectModel, SubSectionOutputModel, SubSectionOutputToExternalFlowModel, SubSectionOutputToSubSectionInputModel, TargetItemModel, TargetModel, TaskEscalationModel, TaskEscalationToExternalFlowModel, TaskEscalationToTaskModel, TaskFlowModel, TaskFlowToExternalFlowModel, TaskFlowToTaskModel, TaskModel, TaskToNextExternalFlowModel, TaskToNextTaskModel, WebAppModel, WoofAccessInputModel, WoofAccessModel, WoofAccessOutputModel, WoofAccessOutputToWoofResourceModel, WoofAccessOutputToWoofSectionInputModel, WoofAccessOutputToWoofTemplateModel, WoofExceptionModel, WoofExceptionToWoofResourceModel, WoofExceptionToWoofSectionInputModel, WoofExceptionToWoofTemplateModel, WoofGovernanceAreaModel, WoofGovernanceModel, WoofGovernanceToWoofGovernanceAreaModel, WoofModel, WoofResourceModel, WoofSectionInputModel, WoofSectionModel, WoofSectionOutputModel, WoofSectionOutputToWoofAccessInputModel, WoofSectionOutputToWoofResourceModel, WoofSectionOutputToWoofSectionInputModel, WoofSectionOutputToWoofTemplateModel, WoofStartModel, WoofStartToWoofSectionInputModel, WoofTemplateExtensionModel, WoofTemplateLinkModel, WoofTemplateModel, WoofTemplateOutputModel, WoofTemplateOutputToWoofAccessInputModel, WoofTemplateOutputToWoofResourceModel, WoofTemplateOutputToWoofSectionInputModel, WoofTemplateOutputToWoofTemplateModel, WoofTemplateRedirectModel, WorkModel, WorkTaskModel, WorkTaskObjectModel, WorkTaskObjectToDeskManagedObjectModel, WorkTaskObjectToExternalManagedObjectModel, WorkTaskToTaskModel, WorkToInitialTaskModel

public class AbstractModel
extends Object
implements Model

Provides top level functionality for all model elements.

Author:
Daniel Sagenschneider

Constructor Summary
AbstractModel()
           
 
Method Summary
protected
<T> void
addItemToList(T item, List<T> list, Enum<?> addEvent)
          Helper method to add an Item to a List.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to this model element.
protected
<T> void
changeField(T oldValue, T newValue, Enum<?> changeEvent)
          Helper method to change a field.
 void firePropertyChange(String property, Object oldValue, Object newValue)
          Fires a property change event.
 int getX()
          Obtains the X co-ordinate for the model.
 int getY()
          Obtains the Y co-ordinate for the model.
protected
<T> void
removeItemFromList(T item, List<T> list, Enum<?> removeEvent)
          Helper method to remove an Item from a List.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from this model element.
 void setX(int x)
          Specifies the X co-ordinate for the model.
 void setY(int y)
          Specifies the Y co-ordinate for the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModel

public AbstractModel()
Method Detail

firePropertyChange

public void firePropertyChange(String property,
                               Object oldValue,
                               Object newValue)
Fires a property change event.

Parameters:
property - Property related to the event.
oldValue - Old value of property.
newValue - New value of property.

addItemToList

protected <T> void addItemToList(T item,
                                 List<T> list,
                                 Enum<?> addEvent)
Helper method to add an Item to a List.

Parameters:
item - Item to add to list.
list - List to have item to add.
addEvent - Event to fire on item being added.

removeItemFromList

protected <T> void removeItemFromList(T item,
                                      List<T> list,
                                      Enum<?> removeEvent)
Helper method to remove an Item from a List.

Parameters:
item - Item to remove from list.
list - List to have item removed.
removeEvent - Event to fire on item being removed.

changeField

protected <T> void changeField(T oldValue,
                               T newValue,
                               Enum<?> changeEvent)
Helper method to change a field.

Parameters:
oldValue - Old value of field.
newValue - New value of field.
changeEvent - Event to fire if field is being changed.

getX

public int getX()
Description copied from interface: Model
Obtains the X co-ordinate for the model.

Specified by:
getX in interface Model
Returns:
X co-ordinate for the model.

setX

public void setX(int x)
Description copied from interface: Model
Specifies the X co-ordinate for the model.

Specified by:
setX in interface Model
Parameters:
x - X co-ordinate for the model.

getY

public int getY()
Description copied from interface: Model
Obtains the Y co-ordinate for the model.

Specified by:
getY in interface Model
Returns:
Y co-ordinate for the model.

setY

public void setY(int y)
Description copied from interface: Model
Specifies the Y co-ordinate for the model.

Specified by:
setY in interface Model
Parameters:
y - Y co-ordinate for the model.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: Model
Adds a PropertyChangeListener to this model element.

Specified by:
addPropertyChangeListener in interface Model
Parameters:
listener - PropertyChangeListener to this model element.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: Model
Removes a PropertyChangeListener from this model element.

Specified by:
removePropertyChangeListener in interface Model
Parameters:
listener - PropertyChangeListener.


Copyright © 2005-2013. All Rights Reserved.