Rational Developer for Power Systems Software
V7.6

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

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.QSYSCopyMemberAction

public class QSYSCopyMemberAction
extends QSYSSystemBaseCopyAction

Copy selected members action.


Field Summary
protected  Vector copiedObjs
           
static String copyright
           
protected  IQSYSMember firstSelection
           
protected  ISelection previousSelection
           
protected  IQSYSMember[] selectedMembers
           
protected  IHost sourceConnection
           
protected  String sourceLibraryFile
           
protected  IQSYSObject targetFile
           
 
Constructor Summary
QSYSCopyMemberAction(Shell shell)
          Constructor
 
Method Summary
protected  String checkForCollision(Shell shell, IProgressMonitor monitor, Object targetContainer, Object oldObject, String oldName)
           
 void copyComplete()
          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  IQSYSMember getFirstSelectedMember()
          Get the first selected ISeriesMember
protected  String[] getOldNames()
           
protected  Object[] getOldObjects()
           
protected  IQSYSMember[] getSelectedMembers()
          Get the currently selected ISeriesMember objects
protected  Object getTargetContainer(Dialog dlg)
          From the target-container dialog return the user-selected ISeriesObject target, or null if cancelled.
protected  SystemSimpleContentElement getTreeInitialSelection()
          Required parent class abstract method.
protected  SystemSimpleContentElement getTreeModel()
          Required parent class abstract method.
 SystemMessage isValid(IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
          The user has selected a remote object.
 boolean updateSelection(IStructuredSelection selection)
          We override from parent to do unique checking...
 
Methods inherited from class com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseCopyAction
getIBMiConnection, getObjectSubSystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

selectedMembers

protected IQSYSMember[] selectedMembers

firstSelection

protected IQSYSMember firstSelection

targetFile

protected IQSYSObject targetFile

previousSelection

protected ISelection previousSelection

sourceLibraryFile

protected String sourceLibraryFile

sourceConnection

protected IHost sourceConnection

copiedObjs

protected Vector copiedObjs
Constructor Detail

QSYSCopyMemberAction

public QSYSCopyMemberAction(Shell shell)
Constructor

Method Detail

updateSelection

public boolean updateSelection(IStructuredSelection selection)
We override from parent to do unique checking...

We simply ensure every selected object is an iseries member

Overrides:
updateSelection in class QSYSSystemBaseCopyAction
See Also:
SystemBaseAction#updateSelection(IStructuredSelection)

checkForCollision

protected String checkForCollision(Shell shell,
                                   IProgressMonitor monitor,
                                   Object targetContainer,
                                   Object oldObject,
                                   String oldName)
Parameters:
shell - Window to host dialog
monitor - Usually not needed
targetContainer - will be the ISeriesObject file selected to copy into
oldObject - will be the ISeriesMember object currently being copied
oldName - will be the name of the ISeriesMember object currently being copied
See Also:
SystemBaseCopyAction#checkForCollision(Shell, IProgressMonitor, Object, Object, String)

doCopy

protected boolean doCopy(Object targetContainer,
                         Object oldObject,
                         String newName,
                         IProgressMonitor monitor)
                  throws Exception
Parameters:
targetContainer - will be the ISeriesObject file selected to copy into
oldObject - will be the ISeriesMember object currently being copied
newName - will be the new name to give the oldObject on copy
monitor - Usually not needed
Throws:
Exception
See Also:
SystemBaseCopyAction#doCopy(IProgressMonitor, Object, String, String)

getTreeModel

protected SystemSimpleContentElement getTreeModel()
Required parent class abstract method. Does not apply to us as we supply our own dialog for the copy-target


getTreeInitialSelection

protected SystemSimpleContentElement getTreeInitialSelection()
Required parent class abstract method. Does not apply to us as we supply our own dialog for the copy-target


getOldObjects

protected Object[] getOldObjects()
See Also:
Returns an array of ISeriesMember objects

getOldNames

protected String[] getOldNames()
See Also:
SystemBaseCopyAction#getOldNames()

createDialog

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


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()
Called after all the copy/move operations end, be it successfully or not. Your opportunity to display completion or do post-copy selections/refreshes


getSelectedMembers

protected IQSYSMember[] getSelectedMembers()
Get the currently selected ISeriesMember objects


getFirstSelectedMember

protected IQSYSMember getFirstSelectedMember()
Get the first selected ISeriesMember


isValid

public SystemMessage isValid(IHost selectedConnection,
                             Object[] selectedObjects,
                             ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
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.

This is overridden in ISeriesMoveMemberAction


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.