Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.ui.actions
Class QSYSCopyObjectAction

java.lang.Object
  extended by SystemBaseCopyAction
      extended by com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseCopyAction
          extended by com.ibm.etools.iseries.rse.ui.actions.QSYSCopyObjectAction
Direct Known Subclasses:
QSYSMoveObjectAction

public class QSYSCopyObjectAction
extends QSYSSystemBaseCopyAction

Copy object action.


Field Summary
protected  Vector<String> copiedObjs
           
static String copyright
           
protected  IQSYSObject firstSelection
           
protected  ISelection previousSelection
           
protected  IQSYSObject[] selectedObjects
           
protected  IHost sourceConnection
           
protected  String sourceLibrary
           
protected  IQSYSLibrary targetLibrary
           
protected  IQSYSObject targetObject
           
 
Constructor Summary
QSYSCopyObjectAction(Shell parent)
          Constructor.
QSYSCopyObjectAction(Shell parent, int mode)
          Constructor.
QSYSCopyObjectAction(Shell parent, String label, int mode)
          Constructor.
 
Method Summary
protected  String checkForCollision(Shell shell, IProgressMonitor monitor, Object targetContainer, Object oldObject, String oldName)
           
 void copyComplete(String operation)
          Called after all the copy/move operations end, be it successfully or not.
protected  Dialog createDialog(Shell shell)
          Override of parent.
protected  boolean doCopy(Object targetContainer, Object oldObject, String newName, IProgressMonitor monitor)
           
protected  IQSYSObject getFirstSelectedObject()
          Get the first selected ISeriesMember
protected  String[] getOldNames()
           
protected  Object[] getOldObjects()
           
protected  IQSYSObject[] getSelectedObjects()
          Get the currently selected ISeriesObject objects
protected  Object getTargetContainer(Dialog dlg)
          From the target-container dialog return the user-selected ISeriesObject target, or null if cancelled.
protected  SystemSimpleContentElement getTreeInitialSelection()
           
protected  SystemSimpleContentElement getTreeModel()
           
 SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObject)
          The user has selected a remote object.
 
Methods inherited from class com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseCopyAction
getIBMiConnection, getObjectSubSystem, updateSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright

selectedObjects

protected IQSYSObject[] selectedObjects

previousSelection

protected ISelection previousSelection

sourceLibrary

protected String sourceLibrary

targetObject

protected IQSYSObject targetObject

firstSelection

protected IQSYSObject firstSelection

targetLibrary

protected IQSYSLibrary targetLibrary

sourceConnection

protected IHost sourceConnection

copiedObjs

protected Vector<String> copiedObjs
Constructor Detail

QSYSCopyObjectAction

public QSYSCopyObjectAction(Shell parent)
Constructor.

Parameters:
parent - Owning shell

QSYSCopyObjectAction

public QSYSCopyObjectAction(Shell parent,
                            int mode)
Constructor.

Parameters:
parent - Owning shell
mode - Either MODE_COPY or MODE_MOVE from this class

QSYSCopyObjectAction

public QSYSCopyObjectAction(Shell parent,
                            String label,
                            int mode)
Constructor.

Parameters:
parent -
label -
mode -
Method Detail

checkForCollision

protected String checkForCollision(Shell shell,
                                   IProgressMonitor monitor,
                                   Object targetContainer,
                                   Object oldObject,
                                   String oldName)

doCopy

protected boolean doCopy(Object targetContainer,
                         Object oldObject,
                         String newName,
                         IProgressMonitor monitor)
                  throws Exception
Throws:
Exception

getOldNames

protected String[] getOldNames()

getOldObjects

protected Object[] getOldObjects()

getTreeInitialSelection

protected SystemSimpleContentElement getTreeInitialSelection()

getTreeModel

protected SystemSimpleContentElement getTreeModel()

getSelectedObjects

protected IQSYSObject[] getSelectedObjects()
Get the currently selected ISeriesObject objects


getTargetContainer

protected Object getTargetContainer(Dialog dlg)
From the target-container dialog return the user-selected ISeriesObject target, or null if cancelled.


copyComplete

public void copyComplete(String operation)
Called after all the copy/move operations end, be it successfully or not. Your opportunity to display completion or do post-copy selections/refreshes


createDialog

protected Dialog createDialog(Shell shell)
Override of parent. Return the dialog that will be used to prompt for the copy/move target location.


getFirstSelectedObject

protected IQSYSObject getFirstSelectedObject()
Get the first selected ISeriesMember


isValid

public SystemMessage isValid(IHost selectedConnection,
                             Object[] selectedObjects,
                             ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObject)
The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage if it is not to be enabled. The message will be displayed on the message line.


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.