|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.rse.ui.resources.QSYSEditableRemoteSourceFileMember
public class QSYSEditableRemoteSourceFileMember
A representation of a remote iSeries source member for the purpose of local editing
Nested Class Summary | |
---|---|
protected class |
QSYSEditableRemoteSourceFileMember.DisplayDownloadConflictDialog
|
protected class |
QSYSEditableRemoteSourceFileMember.DisplayUploadConflictDialog
|
Field Summary | |
---|---|
static String |
copyright
|
Fields inherited from interface com.ibm.etools.iseries.subsystems.qsys.resources.IQSYSRemoteEditConstants |
---|
AS400_OBJECT_KEY, BUFFER_SIZE, IFS_EDITOR_PROFILE, KB_IN_BYTES, NUM_OF_KB, QSYS_EDITOR_PROFILE |
Constructor Summary | |
---|---|
QSYSEditableRemoteSourceFileMember(IQSYSMember member)
Constructor |
|
QSYSEditableRemoteSourceFileMember(IQSYSMember member,
boolean readonly)
Constructor |
Method Summary | |
---|---|
void |
addAsListener()
Register as listener for various events |
boolean |
canWrite()
|
int |
checkOpenInEditor()
Is the local file open in an editor |
void |
closeStream()
Close the member |
void |
communicationsStateChange(CommunicationsEvent event)
|
void |
connect()
Connects and resets parameters, if not connected. |
void |
delete()
Delete the local resource |
boolean |
doImmediateSaveAndUpload()
Saves the local file and uploads it to the host immediately, rather than, in response to a resource change event. |
boolean |
download(IProgressMonitor monitor)
Download the member. |
boolean |
download(IProgressMonitor monitor,
boolean force)
Download the member. |
boolean |
download(IProgressMonitor monitor,
boolean force,
boolean doRefresh)
Download the member. |
boolean |
download(Shell shell)
|
boolean |
download(Shell shell,
boolean force,
boolean silent)
Download the member. |
boolean |
exists()
|
String |
getAbsolutePath()
|
IFile |
getAndCreateLocalResource()
Remote members that have been edited before are cached locally as an IFile in our own RSE tempfiles project. |
String |
getDownloadPath()
Gets the download path |
String |
getDownloadPath(IQSYSMember rmember)
Gets the download path |
SystemTextEditor |
getEditor()
Get the editor |
IEditorPart |
getEditorPart()
Returns the open IEditorPart for this remote object if there is one. |
String |
getEditorTitle()
Get editor title |
String |
getFullName()
Return the fully qualified member name: library/object(member) |
IBMiConnection |
getISeriesConnection()
Returns the IBMiConnection from which this object originated. |
IFile |
getLocalResource()
Remote members that have been edited before are cached locally as an IFile in our own RSE tempfiles project. |
IFile |
getLocalResource(String alocalPath)
|
IQSYSMember |
getMember()
Return the QSYSRemoteSourceMember object representing this member |
static IPath |
getMemberPath(String libName,
String fileName,
String mbrName)
Create the Path for the remote member. |
protected String |
getOSPath(String path)
|
static long |
getRemoteMemberTimestamp(IQSYSMember remoteMember)
|
IAdaptable |
getRemoteObject()
Returns the remote object that is editable |
String |
getRemotePath()
Get the remote path. |
SubSystem |
getSubSystem()
|
void |
handleDownloadMemberLock(ISeriesHostObjectLock lock,
String strEditorID)
Displays download member locked dialog in a new UIJob |
void |
handleDownloadMemberLock(ISeriesHostObjectLock lock,
String strEditorID,
int lineNumber)
Displays download member locked dialog in a new UIJob |
boolean |
handleUploadMemberLock(ISeriesHostObjectLock lock,
SystemMessage message)
Displays upload member locked dialog in a new UIJob |
void |
internalOpen(String strEditorID,
boolean readOnly,
int lineNumber,
IProgressMonitor monitor)
Open in specified editor. |
boolean |
isConnected()
Returns if connection is connected |
static boolean |
isDDSSourceType(String sourceType)
check if there is source type is of type DDS |
boolean |
isDirty()
|
boolean |
isPassiveCommunicationsListener()
|
boolean |
isReadOnly()
is the editor readonly? |
boolean |
isStale()
|
void |
open(boolean readOnly,
int lineNumber,
IProgressMonitor monitor)
|
void |
open(boolean readOnly,
IProgressMonitor monitor)
|
void |
open(IProgressMonitor monitor)
Open with default editor. |
void |
open(Shell shell)
(non-Javadoc) |
void |
open(Shell shell,
boolean readOnly)
|
void |
open(Shell shell,
boolean readOnly,
int lineNumber)
|
void |
open(Shell shell,
int lineNumber)
Open the editor on the member and position to the specified line number |
void |
open(String strEditorID,
boolean readOnly,
int lineNumber,
IProgressMonitor monitor)
Open in specified editor. |
void |
open(String strEditorID,
boolean readOnly,
IProgressMonitor monitor)
Open in specified editor. |
void |
openEditor()
Convenience method to support opening with default system text editor. |
void |
openEditor(int lineNumber)
Convenience method to support opening with default system text editor and positioning to the specified line number. |
void |
openEditor(String strEditorID,
boolean readOnly)
Open the editor. |
void |
openEditor(String strEditorID,
boolean readOnly,
int lineNumber)
Open the editor. |
boolean |
openIsCanceled()
Return if the open is canceled or not |
boolean |
openStream()
Open member for write. |
void |
partActivated(IWorkbenchPart part)
|
void |
partBroughtToTop(IWorkbenchPart part)
|
void |
partClosed(IWorkbenchPart part)
|
void |
partDeactivated(IWorkbenchPart part)
|
void |
partOpened(IWorkbenchPart part)
|
ISeriesHostObjectLock |
queryLocks()
Query whether member is locked on the server. |
ISeriesHostObjectLock |
queryLocks(IQSYSMember amember)
Query whether member is locked on the server. |
void |
refresh()
Refresh the remote edit project. |
boolean |
saveAs(IQSYSMember newMember,
IProgressMonitor progressMonitor)
Save as to a remote location |
void |
setContents(String[] contents,
boolean upload,
IProgressMonitor monitor)
Set the contents of the member in its local copy, and optionally upload it to the host |
void |
setEditor(IEditorPart editorPart)
Set the editor |
void |
setInsertSequenceNumbersIfRequired(boolean insert)
Sets whether or not the upload should insert sequence numbers (default is true) |
void |
setISeriesMemberTransfer(QSYSRemoteMemberTransfer transfer)
Sets the ISeriesMemberTransfer object to use to download/upload the member. |
void |
setLocalResourceProperties()
Set local resource properties |
void |
setLocalResourceProperties(boolean setCharset)
Set local resource properties Normally this method is not called directly, use setLocalResourceProperties() instead which calls this one with a parameter of true. |
void |
setLocalResourceProperties(boolean setCharset,
IFile file,
IQSYSMember currentmember)
|
void |
setMember(IQSYSMember member)
Set the remote member |
void |
setReadOnly(boolean flag)
|
void |
updateDirtyIndicator()
Update the dirty indicator |
void |
upload(IProgressMonitor monitor)
Supports 2-phase save |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String copyright
Constructor Detail |
---|
public QSYSEditableRemoteSourceFileMember(IQSYSMember member) throws SystemMessageException
the
- QSYSRemoteSourceMember to be opened in the editor.
SystemMessageException
public QSYSEditableRemoteSourceFileMember(IQSYSMember member, boolean readonly) throws SystemMessageException
member
- the QSYSRemoteSourceMember to be opened in the editor.readonly
- Download the file as readonly
SystemMessageException
Method Detail |
---|
public void setMember(IQSYSMember member)
public static IPath getMemberPath(String libName, String fileName, String mbrName)
public IQSYSMember getMember()
public String getRemotePath()
public SystemTextEditor getEditor()
public void connect() throws SystemMessageException, InterruptedException
InterruptedException
SystemMessageException
public boolean isConnected()
public void closeStream() throws Exception
Exception
public boolean openStream() throws Exception
Exception
public boolean download(IProgressMonitor monitor) throws Exception
the
- progress monitor to show during the download. Can be null.
Exception
public boolean download(IProgressMonitor monitor, boolean force) throws Exception
monitor
- the progress monitor to show during the download. Can be null.force
- force a refresh of the RSE temp files project
Exception
public boolean download(IProgressMonitor monitor, boolean force, boolean doRefresh) throws Exception
monitor
- the progress monitor to show during the download. Can be null.force
- force a refresh of the RSE temp files project
Exception
public void setContents(String[] contents, boolean upload, IProgressMonitor monitor) throws Exception
Exception
public void upload(IProgressMonitor monitor) throws Exception
Exception
public IFile getLocalResource()
public IFile getLocalResource(String alocalPath)
public IFile getAndCreateLocalResource()
public void delete()
public String getDownloadPath()
protected String getOSPath(String path)
public String getDownloadPath(IQSYSMember rmember)
public boolean isPassiveCommunicationsListener()
ICommunicationsListener#isPassiveCommunicationsListener()
public void communicationsStateChange(CommunicationsEvent event)
ICommunicationsListener#communicationsStateChanged(CommunicationsEvent)
public int checkOpenInEditor() throws CoreException
CoreException
public void open(Shell shell)
org.eclipse.rse.ui.view.ISystemEditableRemoteObject#open(org.eclipse.swt.widgets.Shell)
public void open(Shell shell, int lineNumber)
org.eclipse.rse.ui.view.ISystemEditableRemoteObject#open(org.eclipse.swt.widgets.Shell)
public void open(Shell shell, boolean readOnly)
public void open(Shell shell, boolean readOnly, int lineNumber)
public void open(boolean readOnly, IProgressMonitor monitor)
public void open(boolean readOnly, int lineNumber, IProgressMonitor monitor)
public void open(IProgressMonitor monitor)
public void open(String strEditorID, boolean readOnly, IProgressMonitor monitor)
public void open(String strEditorID, boolean readOnly, int lineNumber, IProgressMonitor monitor)
public void internalOpen(String strEditorID, boolean readOnly, int lineNumber, IProgressMonitor monitor) throws SystemMessageException, Exception
SystemMessageException
Exception
public ISeriesHostObjectLock queryLocks() throws SystemMessageException
SystemMessageException
public ISeriesHostObjectLock queryLocks(IQSYSMember amember) throws SystemMessageException
SystemMessageException
public void setLocalResourceProperties() throws CoreException, SystemMessageException, Exception
CoreException
SystemMessageException
Exception
public void setLocalResourceProperties(boolean setCharset) throws CoreException, SystemMessageException, Exception
setCharset
- true if you want to call file.setCharset() which causes a resource change event
CoreException
SystemMessageException
Exception
public void setLocalResourceProperties(boolean setCharset, IFile file, IQSYSMember currentmember) throws CoreException, SystemMessageException, Exception
CoreException
SystemMessageException
Exception
public void addAsListener()
public void openEditor() throws PartInitException
PartInitException
public void openEditor(int lineNumber) throws PartInitException
PartInitException
public void openEditor(String strEditorID, boolean readOnly) throws PartInitException
PartInitException
public void openEditor(String strEditorID, boolean readOnly, int lineNumber) throws PartInitException
PartInitException
public String getEditorTitle()
public void setEditor(IEditorPart editorPart)
public void setReadOnly(boolean flag)
public boolean isReadOnly()
public void refresh()
public void updateDirtyIndicator()
public void partActivated(IWorkbenchPart part)
IPartListener#partActivated(IWorkbenchPart)
public void partBroughtToTop(IWorkbenchPart part)
IPartListener#partBroughtToTop(IWorkbenchPart)
public static long getRemoteMemberTimestamp(IQSYSMember remoteMember)
public void partClosed(IWorkbenchPart part)
IPartListener#partClosed(IWorkbenchPart)
public void partDeactivated(IWorkbenchPart part)
IPartListener#partDeactivated(IWorkbenchPart)
public void partOpened(IWorkbenchPart part)
IPartListener#partOpened(IWorkbenchPart)
public static boolean isDDSSourceType(String sourceType)
public boolean doImmediateSaveAndUpload()
public boolean saveAs(IQSYSMember newMember, IProgressMonitor progressMonitor)
public boolean canWrite()
public boolean isDirty()
public IAdaptable getRemoteObject()
public IEditorPart getEditorPart()
public boolean openIsCanceled()
public String getFullName()
public IBMiConnection getISeriesConnection()
public void setISeriesMemberTransfer(QSYSRemoteMemberTransfer transfer)
transfer
- The ISeriesMemberTransfer object to use for tranfering the member to/from the iSeriespublic void setInsertSequenceNumbersIfRequired(boolean insert)
insert
- true if you want to insert sequence numbers when uploading, false otherwisepublic String getAbsolutePath()
public SubSystem getSubSystem()
public boolean isStale()
public boolean download(Shell shell) throws Exception
Exception
public boolean download(Shell shell, boolean force, boolean silent) throws Exception
the
- shell to use. If the shell is null, no progress monitor will be used. Otherwise, a progress
monitor will be shown during the downloadforce
- force the member to be downloaded even if a local copy already exists with the same timestamp.silent
- if the member is locked, download the member in silent mode without asking the user.
Exception
public boolean exists()
public void handleDownloadMemberLock(ISeriesHostObjectLock lock, String strEditorID)
public void handleDownloadMemberLock(ISeriesHostObjectLock lock, String strEditorID, int lineNumber)
public boolean handleUploadMemberLock(ISeriesHostObjectLock lock, SystemMessage message)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |