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.ui.view
Class SystemAbstractAPIProvider


java.lang.Object
  extended by 
org.eclipse.rse.ui.view.SystemAbstractAPIProvider
All Implemented Interfaces:
IAdaptable, ISystemViewInputProvider

public abstract class SystemAbstractAPIProvider
extends Object
implements ISystemViewInputProvider

This is a base class that a provider of root nodes to the remote systems tree viewer part can use as a parent class. This class existed in RSE 1.0, was made "internal" for RSE 2.0 and restored as API for RSE 3.0.

Since:
3.0

Field Summary
protected   SystemMessageObject cancelledObject
          Deprecated. don't use this field
protected   Object[] emptyList
          Deprecated. don't use this field
protected   SystemMessageObject errorObject
          Deprecated. don't use this field
protected   Object[] msgList
          Deprecated. don't use this field
protected   SystemMessageObject nullObject
          Deprecated. Use checkForEmptyList(Object[], Object, boolean) instead.
protected   ISystemRegistry sr
          Deprecated. don't use this field
protected   Viewer viewer
           
 
Constructor Summary
SystemAbstractAPIProvider ()
          Constructor
 
Method Summary
protected   Object[] checkForEmptyList ( Object[] children, Object parent, boolean returnNullMsg)
          In getChildren, return checkForEmptyList(children, parent, true/false) versus your array directly.
protected   Object[] checkForNull ( Object[] children, boolean returnNullMsg)
          Deprecated. Use checkForEmptyList(Object[], Object, boolean) instead.
  Object getAdapter ( Class adapterType)
          This is the method required by the IAdaptable interface.
protected   Object[] getCancelledMessageObject ()
          Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()
protected   Object[] getFailedMessageObject ()
          Return the "Operation failed" msg as an object array so can be used to answer getChildren()
protected   ISystemRemoteElementAdapter getRemoteAdapter ( Object o)
          Returns the implementation of ISystemRemoteElement for the given object.
protected   ISystemViewElementAdapter getViewAdapter ( Object o)
          Returns the implementation of ISystemViewElement for the given object.
  Object getViewer ()
          Return the viewer we are currently associated with
protected  void initMsgObjects ()
           
 void setViewer ( Object viewer)
          Set the viewer in case it is needed for anything.
 boolean showingConnections ()
          Return true if we are listing connections or not, so we know whether we are interested in connection-add events
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.core.model. ISystemViewInputProvider
getConnectionChildren, getSystemViewRoots, hasConnectionChildren, hasSystemViewRoots
 

Field Detail

viewer

protected 
Viewer viewer

sr

protected 
ISystemRegistry sr
Deprecated. don't use this field

emptyList

protected 
Object[] emptyList
Deprecated. don't use this field

msgList

protected 
Object[] msgList
Deprecated. don't use this field

nullObject

protected 
SystemMessageObject nullObject
Deprecated. Use checkForEmptyList(Object[], Object, boolean) instead.

cancelledObject

protected 
SystemMessageObject cancelledObject
Deprecated. don't use this field
This field was renamed from canceledObject in RSE 3.0.

Since:
org.eclipse.rse.ui 3.0

errorObject

protected 
SystemMessageObject errorObject
Deprecated. don't use this field
Constructor Detail

SystemAbstractAPIProvider

public SystemAbstractAPIProvider()
Constructor

Method Detail

getAdapter

public 
Object getAdapter(
Class adapterType)
This is the method required by the IAdaptable interface. Given an adapter class type, return an object castable to the type, or null if this is not possible.

Specified by:
getAdapter in interface IAdaptable
Specified by:
getAdapter in interface ISystemViewInputProvider

setViewer

public void setViewer(
Object viewer)
Description copied from interface: ISystemViewInputProvider
Set the viewer in case it is needed for anything. The label and content provider will call this.

Specified by:
setViewer in interface ISystemViewInputProvider
Parameters:
viewer - the viewer that uses this provider

getViewer

public 
Object getViewer()
Description copied from interface: ISystemViewInputProvider
Return the viewer we are currently associated with

Specified by:
getViewer in interface ISystemViewInputProvider
Returns:
the viewer we are currently associated with

initMsgObjects

protected final void initMsgObjects()

checkForEmptyList

protected 
Object[] checkForEmptyList(
Object[] children,
                                     
Object parent,
                                     boolean returnNullMsg)
In getChildren, return checkForEmptyList(children, parent, true/false) versus your array directly. This method checks for a null array which is not allowed and replaces it with an empty array. If true is passed then it returns the "Empty list" message object if the array is null or empty.

Callable by subclasses. Do not override.

Parameters:
children - The list of children.
parent - The parent for the children.
returnNullMsg - true if an "Empty List" message should be returned.
Returns:
The list of children, a list with the "Empty List" message object or an empty list.

checkForNull

protected 
Object[] checkForNull(
Object[] children,
                                boolean returnNullMsg)
Deprecated. Use checkForEmptyList(Object[], Object, boolean) instead.

In getChildren, return checkForNull(children, true/false) vs your array directly. This method checks for a null array which not allow and replaces it with an empty array. If true is passed then it returns the "Empty list" message object if the array is null or empty


getCancelledMessageObject

protected 
Object[] getCancelledMessageObject()
Return the "Operation cancelled by user" msg as an object array so can be used to answer getChildren()


getFailedMessageObject

protected 
Object[] getFailedMessageObject()
Return the "Operation failed" msg as an object array so can be used to answer getChildren()


showingConnections

public boolean showingConnections()
Return true if we are listing connections or not, so we know whether we are interested in connection-add events

Specified by:
showingConnections in interface ISystemViewInputProvider
Returns:
true if we are listing connections or not, so we know whether we are interested in connection-add events

getViewAdapter

protected 
ISystemViewElementAdapter getViewAdapter(
Object o)
Returns the implementation of ISystemViewElement for the given object. Returns null if the adapter is not defined or the object is not adaptable.


getRemoteAdapter

protected 
ISystemRemoteElementAdapter getRemoteAdapter(
Object o)
Returns the implementation of ISystemRemoteElement for the given object. Returns null if this object does not adaptable to this.


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