org.openpermis.editor.policy.gui.component
Class TimeStampModel

java.lang.Object
  extended by org.openpermis.editor.policy.gui.component.TimeStampModel
All Implemented Interfaces:
Serializable

public class TimeStampModel
extends Object
implements Serializable

See Also:
Serialized Form
Since:
0.3.0

Constructor Summary
TimeStampModel(org.openpermis.policy.TimeStamp timeStamp)
          Creates a model for a time stamp.
 
Method Summary
 void addPropertyChangeListener(String property, PropertyChangeListener listener)
          Registers a property change listener on this model.
protected  void firePropertyChanged(String property, Object oldValue, Object newValue)
          Notifies listeners that a property changed its value.
 Date getDate()
          Gets the date part of the current time stamp.
 long getTimeOfDay()
          Gets the current time of day in milliseconds.
 org.openpermis.policy.TimeStamp getTimeStamp()
          Gets the current time stamp value.
 void removePropertyChangeListener(String property, PropertyChangeListener listener)
          Deregisters a property change listener on this model.
 void setDate(Date date)
          Sets the date part of the current time stamp.
 void setTimeOfDay(long timeOfDay)
          Sets the current time of day in milliseconds.
 void setTimeStamp(org.openpermis.policy.TimeStamp timeStamp)
          Sets the current time stamp value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeStampModel

public TimeStampModel(org.openpermis.policy.TimeStamp timeStamp)
Creates a model for a time stamp.

Parameters:
timeStamp - the initial time stamp value for the model.
Since:
0.3.0
Method Detail

getTimeStamp

public org.openpermis.policy.TimeStamp getTimeStamp()
Gets the current time stamp value.

Returns:
the current time stamp.
Since:
0.3.0

setTimeStamp

public void setTimeStamp(org.openpermis.policy.TimeStamp timeStamp)
Sets the current time stamp value.

Parameters:
timeStamp - the new time stamp value.
Since:
0.3.0

getDate

public Date getDate()
Gets the date part of the current time stamp.

Returns:
a date with time of day set to midnight.
Since:
0.3.0

setDate

public void setDate(Date date)
Sets the date part of the current time stamp.

Parameters:
date - the date to set. Its time of day will be replaced by the current time of day.
Since:
0.3.0

getTimeOfDay

public long getTimeOfDay()
Gets the current time of day in milliseconds.

Returns:
the number of milliseconds that have passed since last midnight.
Since:
0.3.0

setTimeOfDay

public void setTimeOfDay(long timeOfDay)
Sets the current time of day in milliseconds.

Parameters:
timeOfDay - the number of milliseconds since midnight. Date information will be ignored.
Since:
0.3.0

addPropertyChangeListener

public void addPropertyChangeListener(String property,
                                      PropertyChangeListener listener)
Registers a property change listener on this model.

Parameters:
property - the property whose changes to observe.
listener - the listener to register.
Since:
0.3.0

removePropertyChangeListener

public void removePropertyChangeListener(String property,
                                         PropertyChangeListener listener)
Deregisters a property change listener on this model.

Parameters:
property - the property whose changes to no longer observe.
listener - the listener to deregister.
Since:
0.3.0

firePropertyChanged

protected void firePropertyChanged(String property,
                                   Object oldValue,
                                   Object newValue)
Notifies listeners that a property changed its value.

Parameters:
property - the property whose value was changed.
oldValue - the previous value of the property.
newValue - the new value of the property.
Since:
0.3.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG