|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.model.SystemMOFHelpers
Common methods that abstract out common MOF operations.
We could have made these methods static, but decided instead to support multiple instances of the class, so each instance can support a different log file.
An internal table keyed by logfile is maintained, so that multiple factory requests for an instance, given the same logfile, returns the same instance.
Field Summary | |
---|---|
static String |
copyright
|
static String |
MOF_EXTENSION
Extension for all mof files: ".xmi" |
Constructor Summary | |
---|---|
protected |
SystemMOFHelpers(Logger logger)
Constructor |
Method Summary | |
---|---|
static String |
addPathTerminator(String path)
Ensure given path ends with path separator. |
static String |
getFolderPath(IFolder folder)
Return the path of the given folder |
static SystemMOFHelpers |
getMOFHelpers(Logger log)
Return the singleton instance of this class for the logger file. |
static IFile |
getSaveFile(IFolder folder,
String fileNameNoExtension)
Return the IFile that will be saved to |
static String |
getSaveFileName(String fileNameNoExtension)
If saving all info in one file, this returns the un-qualified name of that file, given the file name without the .xmi extension. |
static String |
getSaveFilePathAndName(IFolder folder,
String fileNameNoExtension)
If saving all info in one file, this returns the fully qualified name of that file, given the file name without the .xmi extension. |
EList |
restore(IFolder folder,
String fileName)
Restore given MOF file |
void |
save(IFolder folder,
String fileName,
EObject saveObject)
Common MOF save to one file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String copyright
public static final String MOF_EXTENSION
Constructor Detail |
protected SystemMOFHelpers(Logger logger)
Method Detail |
public static SystemMOFHelpers getMOFHelpers(Logger log)
public void save(IFolder folder, String fileName, EObject saveObject) throws Exception
folder
- the folder to save the file into.fileName
- the unqualified file name, without the .xml extension.saveObject
- the object to be saved to given file.
Exception
public EList restore(IFolder folder, String fileName) throws Exception
folder
- the folder to save the file into.fileName
- the unqualified file name, without the .xmi extension.
Exception
public static IFile getSaveFile(IFolder folder, String fileNameNoExtension)
public static String getSaveFilePathAndName(IFolder folder, String fileNameNoExtension)
public static String getSaveFileName(String fileNameNoExtension)
public static String addPathTerminator(String path)
public static String getFolderPath(IFolder folder)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |