org.sakaiproject.component.legacy.notification
Class BaseNotificationService.BaseNotificationEdit

java.lang.Object
  extended byorg.sakaiproject.component.legacy.notification.BaseNotificationService.BaseNotification
      extended byorg.sakaiproject.component.legacy.notification.BaseNotificationService.BaseNotificationEdit
All Implemented Interfaces:
Edit, Entity, EventListener, Notification, NotificationEdit, SessionBindingListener
Enclosing class:
BaseNotificationService

public class BaseNotificationService.BaseNotificationEdit
extends BaseNotificationService.BaseNotification
implements NotificationEdit, SessionBindingListener

NotificationEdit implementation


Field Summary
protected  boolean m_active
          Active flag.
protected  String m_event
          The event code for this edit.
 
Fields inherited from class org.sakaiproject.component.legacy.notification.BaseNotificationService.BaseNotification
m_action, m_filter, m_functions, m_id, m_properties
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Constructor Summary
BaseNotificationService.BaseNotificationEdit(Element el)
          Construct from an existing definition, in xml.
BaseNotificationService.BaseNotificationEdit(Notification other)
          Construct from another Notification.
BaseNotificationService.BaseNotificationEdit(String id)
          Construct.
 
Method Summary
protected  void activate()
          Enable editing.
 void addFunction(String function)
          Add another Event function.
protected  void closeEdit()
          Close the edit object - it cannot be used after this.
protected  void finalize()
          Clean up.
protected  String getEvent()
          Access the event code for this edit.
 ResourcePropertiesEdit getPropertiesEdit()
          Access the resource's properties for modification
 boolean isActiveEdit()
          Check to see if the edit is still active, or has already been closed.
protected  void set(Notification other)
          Take all values from this object.
 void setAction(NotificationAction action)
          Set the action helper that handles the notify() action.
protected  void setEvent(String event)
          Set the event code for this edit.
 void setFunction(String function)
          Set the Event function, clearing any that have already been set.
 void setResourceFilter(String filter)
          Set the resource reference filter.
 void valueBound(SessionBindingEvent event)
          SessionBindingListener implementation
 void valueUnbound(SessionBindingEvent event)
          Notifies the object that it is being unbound from a session.
 
Methods inherited from class org.sakaiproject.component.legacy.notification.BaseNotificationService.BaseNotification
containsFunction, getAction, getFunction, getFunctions, getId, getProperties, getReference, getReference, getResourceFilter, getUrl, getUrl, notify, setAll, toXml
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.service.legacy.notification.NotificationEdit
notify
 
Methods inherited from interface org.sakaiproject.service.legacy.notification.Notification
containsFunction, getAction, getFunction, getFunctions, getResourceFilter
 
Methods inherited from interface org.sakaiproject.service.legacy.entity.Entity
getId, getProperties, getReference, getReference, getUrl, getUrl, toXml
 

Field Detail

m_event

protected String m_event
The event code for this edit.


m_active

protected boolean m_active
Active flag.

Constructor Detail

BaseNotificationService.BaseNotificationEdit

public BaseNotificationService.BaseNotificationEdit(String id)
Construct.

Parameters:
id - The notification id.

BaseNotificationService.BaseNotificationEdit

public BaseNotificationService.BaseNotificationEdit(Element el)
Construct from an existing definition, in xml.

Parameters:
el - The message in XML in a DOM element.

BaseNotificationService.BaseNotificationEdit

public BaseNotificationService.BaseNotificationEdit(Notification other)
Construct from another Notification.

Method Detail

finalize

protected void finalize()
Clean up.


setFunction

public void setFunction(String function)
Set the Event function, clearing any that have already been set.

Specified by:
setFunction in interface NotificationEdit

addFunction

public void addFunction(String function)
Add another Event function.

Specified by:
addFunction in interface NotificationEdit

setResourceFilter

public void setResourceFilter(String filter)
Set the resource reference filter.

Specified by:
setResourceFilter in interface NotificationEdit
Parameters:
filter - The resource reference filter.

setAction

public void setAction(NotificationAction action)
Set the action helper that handles the notify() action.

Specified by:
setAction in interface NotificationEdit
Parameters:
action - The action helper that handles the notify() action.

set

protected void set(Notification other)
Take all values from this object.

Parameters:
other - The notification object to take values from.

getEvent

protected String getEvent()
Access the event code for this edit.

Returns:
The event code for this edit.

setEvent

protected void setEvent(String event)
Set the event code for this edit.

Parameters:
event - The event code for this edit.

getPropertiesEdit

public ResourcePropertiesEdit getPropertiesEdit()
Access the resource's properties for modification

Specified by:
getPropertiesEdit in interface Edit
Returns:
The resource's properties.

activate

protected void activate()
Enable editing.


isActiveEdit

public boolean isActiveEdit()
Check to see if the edit is still active, or has already been closed.

Specified by:
isActiveEdit in interface Edit
Returns:
true if the edit is active, false if it's been closed.

closeEdit

protected void closeEdit()
Close the edit object - it cannot be used after this.


valueBound

public void valueBound(SessionBindingEvent event)
SessionBindingListener implementation

Specified by:
valueBound in interface SessionBindingListener
Parameters:
event - the event that identifies the session

valueUnbound

public void valueUnbound(SessionBindingEvent event)
Description copied from interface: SessionBindingListener
Notifies the object that it is being unbound from a session.

Specified by:
valueUnbound in interface SessionBindingListener
Parameters:
event - the event that identifies the session