Class ResourceEvent

java.lang.Object
java.util.EventObject
com.globalmentor.net.ResourceEvent
All Implemented Interfaces:
Serializable

public class ResourceEvent extends EventObject
An event related to a resource.
Author:
Garret Wilson
See Also:
  • Constructor Details

    • ResourceEvent

      public ResourceEvent(Object source, URI resourceURI)
      Constructor that specifies the resource reference URI.
      Parameters:
      source - The object on which the event initially occurred.
      resourceURI - The reference URI of the resource.
    • ResourceEvent

      public ResourceEvent(Object source, URI oldResourceURI, URI newResourceURI)
      Constructor that specifies both an old and a current resource reference URI.
      Parameters:
      source - The object on which the event initially occurred.
      oldResourceURI - The old reference URI of the resource.
      newResourceURI - The new reference URI of the resource.
    • ResourceEvent

      public ResourceEvent(Object source, Resource resource)
      Constructor that specifies the resource description.
      Parameters:
      source - The object on which the event initially occurred.
      resource - A description of the resource, or null if there is no description.
    • ResourceEvent

      public ResourceEvent(Object source, Resource parentResource, Resource resource)
      Constructor that specifies the parent and resource description.
      Parameters:
      source - The object on which the event initially occurred.
      parentResource - A description of the parent resource, or null if there is no parent resource.
      resource - A description of the resource, or null if there is no description.
    • ResourceEvent

      public ResourceEvent(Object source, URI oldResourceURI, Resource parentResource, Resource resource)
      Constructor that specifies the parent and resource description, as well as an old resource URI.
      Parameters:
      source - The object on which the event initially occurred.
      oldResourceURI - The old reference URI of the resource, or null if there is no old resource reference URI.
      parentResource - A description of the parent resource, or null if there is no parent resource.
      resource - A description of the resource, or null if there is no description.
    • ResourceEvent

      public ResourceEvent(Object source, Resource oldParentResource, URI oldResourceURI, Resource parentResource, Resource resource)
      Constructor that specifies the old and new parent resource descriptions, the new resource description and the old resource reference URI.
      Parameters:
      source - The object on which the event initially occurred.
      oldParentResource - A description of the old parent resource, or null if there is no old parent resource.
      oldResourceURI - The old reference URI of the resource, or null if there is no old resource reference URI.
      parentResource - A description of the parent resource, or null if there is no parent resource.
      resource - A description of the resource, or null if there is no description.
    • ResourceEvent

      protected ResourceEvent(Object source, URI oldParentResourceURI, Resource oldParentResource, URI oldResourceURI, Resource oldResource, URI parentResourceURI, Resource parentResource, URI resourceURI, Resource resource)
      Constructor that specifies parent, old, and current resources.
      Parameters:
      source - The object on which the event initially occurred.
      oldParentResourceURI - The reference URI of the old parent resource, or null if there is no old parent resource reference URI.
      oldParentResource - The old parent resource, or null if there is no old parent resource.
      oldResourceURI - The old reference URI of the resource, or null if there is no old resource reference URI.
      oldResource - The old resource, or null if there is no old resource.
      parentResourceURI - The reference URI of the parent resource, or null if there is no parent resource reference URI.
      parentResource - The parent resource, or null if there is no parent resource.
      resourceURI - The current reference URI of the resource.
      resource - The current resource, or null if there is no resource.
  • Method Details

    • getOldParentResourceURI

      public URI getOldParentResourceURI()
      Returns:
      The old parent resource reference URI, or null if not applicable.
    • getOldParentResource

      public Resource getOldParentResource()
      Returns:
      A description of the old parent resource, or null if not applicable.
    • getParentResourceURI

      public URI getParentResourceURI()
      Returns:
      The parent resource reference URI, or null if not applicable.
    • getParentResource

      public Resource getParentResource()
      Returns:
      A description of the parent resource, or null if not applicable.
    • getOldResourceURI

      public URI getOldResourceURI()
      Returns:
      The previous resource reference URI, or null if not applicable.
    • getOldResource

      public Resource getOldResource()
      Returns:
      A description of the old resource, or null if not applicable.
    • getResourceURI

      public URI getResourceURI()
      Returns:
      The resource reference URI, or null if not applicable.
    • getResource

      public Resource getResource()
      Returns:
      A description of the resource, or null if there is no description.
    • toString

      public String toString()
      Overrides:
      toString in class EventObject
      Returns:
      A string representation of this resource event.