net.larsan.norna
Class ContextEvent

java.lang.Object
  |
  +--net.larsan.norna.ContextEvent

public class ContextEvent
extends java.lang.Object

Context event. This event comes in four types identified by static memebrs of this class. The event carries the context URL the object the event is about as well as an optional new URL if the event is about a renaming.

All context URLs in this class must be in their full form. E.g. must start with 'norna://'.

Version:
Alpha-0.2 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Field Summary
static int OBJECT_BOUND
           
static int OBJECT_UNBOUND
           
 
Constructor Summary
ContextEvent(int type, java.lang.String oldUrl, java.lang.String newUrl)
          Constructor for ContextEvent.
 
Method Summary
 java.lang.String getNewUrl()
          Get the new context URL for the object in question.
 java.lang.String getOldUrl()
          Get the old context URL of the object that triggered this event.
 int getType()
          Get the type of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_BOUND

public static final int OBJECT_BOUND
See Also:
Constant Field Values

OBJECT_UNBOUND

public static final int OBJECT_UNBOUND
See Also:
Constant Field Values
Constructor Detail

ContextEvent

public ContextEvent(int type,
                    java.lang.String oldUrl,
                    java.lang.String newUrl)
Constructor for ContextEvent. The type argument must be one of the static identifiers in this class.

Parameters:
type - Event type
oldUrl - Old anmespace URL
Method Detail

getNewUrl

public java.lang.String getNewUrl()
Get the new context URL for the object in question. This method will return null if the event type is not a OBJECT_RENAME.


getOldUrl

public java.lang.String getOldUrl()
Get the old context URL of the object that triggered this event. This method will never return null and the URL will always be in a canonical form.


getType

public int getType()
Get the type of this event.