Package com.globalmentor.net
Class ResourceEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.globalmentor.net.ResourceEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ResourceEvent extends java.util.EventObject
An event related to a resource.- Author:
- Garret Wilson
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description ResourceEvent(java.lang.Object source, Resource resource)
Constructor that specifies the resource description.ResourceEvent(java.lang.Object source, Resource parentResource, Resource resource)
Constructor that specifies the parent and resource description.ResourceEvent(java.lang.Object source, Resource oldParentResource, java.net.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.ResourceEvent(java.lang.Object source, java.net.URI resourceURI)
Constructor that specifies the resource reference URI.ResourceEvent(java.lang.Object source, java.net.URI oldResourceURI, Resource parentResource, Resource resource)
Constructor that specifies the parent and resource description, as well as an old resource URI.protected
ResourceEvent(java.lang.Object source, java.net.URI oldParentResourceURI, Resource oldParentResource, java.net.URI oldResourceURI, Resource oldResource, java.net.URI parentResourceURI, Resource parentResource, java.net.URI resourceURI, Resource resource)
Constructor that specifies parent, old, and current resources.ResourceEvent(java.lang.Object source, java.net.URI oldResourceURI, java.net.URI newResourceURI)
Constructor that specifies both an old and a current resource reference URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource
getOldParentResource()
java.net.URI
getOldParentResourceURI()
Resource
getOldResource()
java.net.URI
getOldResourceURI()
Resource
getParentResource()
java.net.URI
getParentResourceURI()
Resource
getResource()
java.net.URI
getResourceURI()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ResourceEvent
public ResourceEvent(java.lang.Object source, java.net.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(java.lang.Object source, java.net.URI oldResourceURI, java.net.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(java.lang.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, ornull
if there is no description.
-
ResourceEvent
public ResourceEvent(java.lang.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, ornull
if there is no parent resource.resource
- A description of the resource, ornull
if there is no description.
-
ResourceEvent
public ResourceEvent(java.lang.Object source, java.net.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, ornull
if there is no old resource reference URI.parentResource
- A description of the parent resource, ornull
if there is no parent resource.resource
- A description of the resource, ornull
if there is no description.
-
ResourceEvent
public ResourceEvent(java.lang.Object source, Resource oldParentResource, java.net.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, ornull
if there is no old parent resource.oldResourceURI
- The old reference URI of the resource, ornull
if there is no old resource reference URI.parentResource
- A description of the parent resource, ornull
if there is no parent resource.resource
- A description of the resource, ornull
if there is no description.
-
ResourceEvent
protected ResourceEvent(java.lang.Object source, java.net.URI oldParentResourceURI, Resource oldParentResource, java.net.URI oldResourceURI, Resource oldResource, java.net.URI parentResourceURI, Resource parentResource, java.net.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, ornull
if there is no old parent resource reference URI.oldParentResource
- The old parent resource, ornull
if there is no old parent resource.oldResourceURI
- The old reference URI of the resource, ornull
if there is no old resource reference URI.oldResource
- The old resource, ornull
if there is no old resource.parentResourceURI
- The reference URI of the parent resource, ornull
if there is no parent resource reference URI.parentResource
- The parent resource, ornull
if there is no parent resource.resourceURI
- The current reference URI of the resource.resource
- The current resource, ornull
if there is no resource.
-
-
Method Detail
-
getOldParentResourceURI
public java.net.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 java.net.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 java.net.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 java.net.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 java.lang.String toString()
- Overrides:
toString
in classjava.util.EventObject
- Returns:
- A string representation of this resource event.
-
-