Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.events
Class SystemRemoteChangeEvent


java.lang.Object
  extended by 
org.eclipse.rse.core.events.SystemRemoteChangeEvent
All Implemented Interfaces:
ISystemRemoteChangeEvent

public class SystemRemoteChangeEvent
extends Object
implements ISystemRemoteChangeEvent

For listeners interested in changes with remote resources. These events are designed to state what the change to the resource was, not to optimize those events for a GUI (eg, a delete event versus a refresh event). In RSE 3.0, the concept of Operation type was added (See setOperation(String) and the new Constructors, and the oldNames property was extended from a single String into a String array.


Constructor Summary
SystemRemoteChangeEvent ()
          Constructor you shouldn't use unless you intend to call the setters
SystemRemoteChangeEvent (int eventType, Object resource, Object resourceParent, ISubSystem subsystem)
          Constructor for non-rename event
SystemRemoteChangeEvent (int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
          Constructor for a rename event.
SystemRemoteChangeEvent ( String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem)
          Constructor for non-rename event
SystemRemoteChangeEvent ( String operation, int eventType, Object resource, Object resourceParent, ISubSystem subsystem, String[] oldNames)
          Constructor for a rename event.
 
Method Summary
 int getEventType ()
          Get the event type, such as ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED.
  String[] getOldNames ()
          Get the old name of the resource, in the event of a resource rename.
  String getOperation ()
          Returns the operation of this event if it's not implied by the event itself.
  Object getOriginatingViewer ()
          Get the originating viewer from which this remote resource change event comes from.
  Object getResource ()
          Get the resource that this event applies to It must either be the binary object of the resource, or the absolute name of the resource, or List of absoluteNames.
  Object getResourceParent ()
          Get the parent remote object for the affected remote object.
  ISubSystem getSubSystem ()
          Get the subsystem in which this resource resides.
 void setEventType (int eventType)
          Reset the event type
 void setOldNames ( String[] oldNames)
          Reset the old names on a rename, move or copy event
 void setOperation ( String operation)
           
 void setOriginatingViewer ( Object originatingViewer)
          Set the originating viewer.
 void setResource ( Object resource)
          Reset the resource
 void setResourceParent ( Object resourceParent)
          Reset the resource's remote resource parent
 void setSubSystem ( ISubSystem subsystem)
          Reset the subsystem
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemRemoteChangeEvent

public SystemRemoteChangeEvent(int eventType,
                               
Object resource,
                               
Object resourceParent,
                               
ISubSystem subsystem)
Constructor for non-rename event

Parameters:
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter, or List of absoluteNames
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.

SystemRemoteChangeEvent

public SystemRemoteChangeEvent(int eventType,
                               
Object resource,
                               
Object resourceParent,
                               
ISubSystem subsystem,
                               
String[] oldNames)
Constructor for a rename event.

Parameters:
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter, or List of absoluteNames
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
oldNames - - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
Since:
3.0 replaced String oldName by String[] oldNames

SystemRemoteChangeEvent

public SystemRemoteChangeEvent(
String operation,
                               int eventType,
                               
Object resource,
                               
Object resourceParent,
                               
ISubSystem subsystem)
Constructor for non-rename event

Parameters:
operation - - the operation for which this event was fired. From ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY and related String constants
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter, or List of absoluteNames
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
Since:
3.0

SystemRemoteChangeEvent

public SystemRemoteChangeEvent(
String operation,
                               int eventType,
                               
Object resource,
                               
Object resourceParent,
                               
ISubSystem subsystem,
                               
String[] oldNames)
Constructor for a rename event.

Parameters:
operation - - the operation for which this event was fired. From ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY and related String constants
eventType - - one of the constants from ISystemRemoteChangeEvents
resource - - the remote resource object, or absolute name of the resource as would be given by calling getAbsoluteName on its remote adapter, or List of absoluteNames
resourceParent - - the remote resource's parent object, or absolute name, if that is known. If it is non-null, this will aid in refreshing occurrences of that parent.
subsystem - - the subsystem which contains this remote resource. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.
oldNames - - on a rename, copy or move operation, these are the absolute names of the resources prior to the operation
Since:
3.0

SystemRemoteChangeEvent

public SystemRemoteChangeEvent()
Constructor you shouldn't use unless you intend to call the setters

Method Detail

setEventType

public void setEventType(int eventType)
Reset the event type


setResource

public void setResource(
Object resource)
Reset the resource


setResourceParent

public void setResourceParent(
Object resourceParent)
Reset the resource's remote resource parent


setSubSystem

public void setSubSystem(
ISubSystem subsystem)
Reset the subsystem


setOldNames

public void setOldNames(
String[] oldNames)
Reset the old names on a rename, move or copy event

Since:
3.0

getEventType

public int getEventType()
Get the event type, such as ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED.

Specified by:
getEventType in interface ISystemRemoteChangeEvent
Returns:
the event type.
See Also:
ISystemRemoteChangeEvents

getResource

public 
Object getResource()
Get the resource that this event applies to It must either be the binary object of the resource, or the absolute name of the resource, or List of absoluteNames.

Specified by:
getResource in interface ISystemRemoteChangeEvent
Returns:
the resource that this event applies to.

getResourceParent

public 
Object getResourceParent()
Get the parent remote object for the affected remote object. This is not always known, but when it is (ie, non null) then it can be used to refresh all expanded occurrences of that parent

Specified by:
getResourceParent in interface ISystemRemoteChangeEvent
Returns:
the parent remote object of the affected resource, or null if not applicable.

getSubSystem

public 
ISubSystem getSubSystem()
Get the subsystem in which this resource resides. This allows the search for impacts to be limited to subsystems of the same parent factory, and to connections with the same hostname as the subsystem's connection.

Specified by:
getSubSystem in interface ISystemRemoteChangeEvent
Returns:
the subsystem in which this resource resides.

getOldNames

public 
String[] getOldNames()
Get the old name of the resource, in the event of a resource rename. Null for other event types.

Specified by:
getOldNames in interface ISystemRemoteChangeEvent
Returns:
the old names of the resources in case of a rename event, or null if not applicable.
Since:
3.0

setOriginatingViewer

public void setOriginatingViewer(
Object originatingViewer)
Set the originating viewer. Only this viewer is candidate for updating the selection. Eg, on a create event, if this and the resource parent is set, the newly created object is selected after the parent's contents are refreshed, for the originating viewer.


getOriginatingViewer

public 
Object getOriginatingViewer()
Get the originating viewer from which this remote resource change event comes from. The combination of this, if non-null, plus the resource parent, allows viewers to decide whether to update the selection within the parent resource, after refreshing that resource.


setOperation

public void setOperation(
String operation)
Parameters:
operation - from ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY and related String constants
Since:
3.0

getOperation

public 
String getOperation()
Returns the operation of this event if it's not implied by the event itself. The operation can be optionally specified when the event is constructed. By default this will return null.

Specified by:
getOperation in interface ISystemRemoteChangeEvent
Returns:
the operation that triggered this event
Since:
3.0
See Also:
ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY, ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_MOVE

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire