public abstract class Manager extends NamedType implements hec.csinterface.CallBackInterface, LockableObject, TsRecordContainer, MessagePrinter
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LASTMODIFIED_STRING |
_description, _index, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT| Constructor and Description |
|---|
Manager() |
Manager(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModifiableListener(hec.event.ModifiableListener listener) |
boolean |
backupFile(java.lang.String backupDir) |
boolean |
copyFile(Identifier oldPathId,
Identifier newPathId)
Copies a file based on an identifiers, returns false if there is a problem.
|
boolean |
deleteFile(Identifier deleteFileId)
deletes a file specified by the argument Identifier - returns true if successful
|
void |
deleting()
called when the manager proxy is deleting the manager
allows the manager to do any additional clean required.
|
void |
finalize() |
hec.server.RemoteWrapper |
getCallback() |
CommonDataList |
getCommonDataList(java.lang.String theDataObjectClass,
java.lang.String theModel)
Returns the data list responsible for managing objects of the given class
Returns the server or client data list depending on which side the manager
is instantiated.
|
java.lang.String |
getDirectory() |
hec.csinterface.DSSManager |
getDSSFileManager()
return the Workspace's DSSFileManager.
|
hec.server.RemoteWrapper |
getDSSFileManagerWrapper() |
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
hec.csinterface.RmiFileManager |
getFileManager()
get the RmiFileManager for this Manager
|
java.lang.String |
getFilename() |
int |
getGmtOffset()
Returns the offset from GMT that all time data for this manager is referenced
|
Identifier |
getIdentifier() |
ITSDataSet |
getInputITSDataSet() |
TSDataSet |
getInputTSDataSet() |
long |
getLastModifiedTime()
return the managers last modified time.
|
java.lang.String |
getLastModifiedTimeString()
return the managers last modified time as a string
|
ITSDataSet |
getOutputITSDataSet() |
TSDataSet |
getOutputTSDataSet() |
java.lang.String |
getPath() |
ManagerProxyList |
getProxyList() |
boolean |
getReadOnly()
get whether this manager's file is read only
|
java.lang.String |
getRelativePath(java.lang.String abspath)
Get the path relative to the workspace directory from an absolute path.
|
boolean |
getReloadOk() |
int |
getUnitSystem() |
UserInterface |
getUserInterface() |
hec.server.RemoteWrapper |
getWorkspace() |
java.lang.String |
getWorkspacePath() |
int |
hasLock()
see if this object has it's lock.
|
abstract void |
init() |
boolean |
isCanceled() |
boolean |
isForecastManager()
This method returns true if the manager is loaded by means of a forecast.
|
void |
loadComplete()
This method acts as a hook to let the manager know that all steps required to load a manager are
complete.
|
boolean |
loadSaveAsFile(Identifier id) |
java.lang.String |
makeAbsolutePath(java.lang.String relpath)
Make and absolute path from a path relative to the workspace directory.
|
java.lang.String |
makeAbsolutePath(java.lang.String relpath,
boolean relToParent)
Make and absolute path from a path relative to the workspace directory.
|
java.lang.String |
makeAbsolutePathFromWatershed(java.lang.String relpath)
converts a relative path to an absolute path based on the base watershed.
|
java.lang.String |
makeRelativePath(java.lang.String s)
Deprecated.
|
java.lang.String |
makeRelativePathFromWatershed(java.lang.String abspath)
converts an absolute path to a relative path based on the base watershed.
|
boolean |
modifiyForSaveAs()
called during saveAs to allow managers to modify themselves as necessary, returns true if there are
changes made
|
Identifier |
newFile(Identifier newFileId)
Create a file based on an identifier, returns null if there is a problem.
|
TSRecordProxy |
newTSRecordProxy(TSLocation loc)
create a new tsrecord proxy
|
TSRecordProxy |
newTSRecordProxy(TSLocation2 location) |
void |
notify(java.lang.String message) |
Identifier |
openFile(Identifier openFileId)
Open a file based on an identifier, returns null if the file does not exist
of if there is a problem.
|
void |
printErrorMessage(java.lang.String msg)
This method prints the detailed error message
|
void |
printLogMessage(java.lang.String msg)
This method prints the detailed log message
|
void |
printMessage(java.lang.String msg)
This method prints the detailed message
|
void |
printSeparator()
This method prints the separator
|
void |
printStatus(java.lang.String msg)
This method prints the detailed status
|
void |
printTableRow(boolean isHeader,
java.lang.String tableRow)
This method prints the table row
|
void |
printWarningMessage(java.lang.String msg)
This method prints the detailed Warning message
|
boolean |
readFile(Identifier id) |
boolean |
refreshData(Manager origMgr)
refresh this managers data from the origMgr's data
|
boolean |
reLoadChildManagers()
called when this
Manager contains other Managers (ie an Alternative)
so that it can tell all of it's child Managers to reload. |
boolean |
reLoadFile() |
boolean |
reLoadFile(Identifier id) |
void |
removeCallBack()
remove the callback from the file.
|
void |
removeModifiableListener(hec.event.ModifiableListener listener) |
void |
renamed(Identifier id)
called to rename the manager.
|
boolean |
saveChildManagers()
called when this
Manager contains other Managers (ie an Alternative)
so that it can tell all of it's child Managers to save. |
boolean |
saveManager()
tell this Manager's ManagerProxy to save
|
Manager |
saveManagerAs(java.lang.String directory,
java.lang.String filePrefix)
duplicate our data file to a new file and add a new Manager that uses it
|
Manager |
saveManagerAs(java.lang.String directory,
java.lang.String filePrefix,
ManagerProxyListContainer container)
duplicate our data file to a new file and add a new Manager that uses it
to the ManagerProxyListContainer specified
|
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setIdentifier(Identifier id) |
void |
setLastModifiedTime()
set this manager's last modified time based on
the RmiWorkspace's current time.
|
void |
setLastModifiedTime(long modTime) |
void |
setLineAttributes(HtmlAttributes a) |
boolean |
setLocked(int lockType)
lock or unlock this manager
|
void |
setModified(boolean flag)
Set the modified flag to true or false.
|
void |
setModifiedFalse() |
void |
setPath(java.lang.String path) |
void |
setProgress(int i) |
void |
setProxyList(ManagerProxyList pl) |
void |
setReadOnly(boolean b)
set this manager's file as read only or not
|
void |
setReloadOk(boolean reloadOk) |
hec.server.RemoteWrapper |
setUserInterface(hec.server.RemoteWrapper uiWrap) |
UserInterface |
setUserInterface(UserInterface ui) |
void |
setWorkspace(hec.server.RemoteWrapper Workspace) |
java.lang.String |
toString() |
void |
unloading()
called when the manager proxy is unloading the manager
|
boolean |
writeFile(Identifier id) |
clone, compareTo, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setName, setValid, update, useRecursiveModifiedTestaddObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObserverspublic static final java.lang.String LASTMODIFIED_STRING
public CommonDataList getCommonDataList(java.lang.String theDataObjectClass, java.lang.String theModel)
public int getUnitSystem()
public int getGmtOffset()
public boolean isForecastManager()
public void loadComplete()
public void setIdentifier(Identifier id)
public hec.server.RemoteWrapper getCallback()
public void removeCallBack()
public Identifier getIdentifier()
public void setWorkspace(hec.server.RemoteWrapper Workspace)
public hec.server.RemoteWrapper getWorkspace()
public java.lang.String getWorkspacePath()
public void setProxyList(ManagerProxyList pl)
public ManagerProxyList getProxyList()
public hec.csinterface.DSSManager getDSSFileManager()
public hec.server.RemoteWrapper getDSSFileManagerWrapper()
public abstract void init()
public boolean readFile(Identifier id)
public boolean modifiyForSaveAs()
public boolean loadSaveAsFile(Identifier id)
public boolean reLoadFile(Identifier id)
public boolean reLoadFile()
public boolean reLoadChildManagers()
Manager contains other Managers (ie an Alternative)
so that it can tell all of it's child Managers to reload.
By default it just calls reLoadFile()public boolean saveChildManagers()
Manager contains other Managers (ie an Alternative)
so that it can tell all of it's child Managers to save.
By default it just calls _proxyList.saveManager(hec.lang.UserId.getUserId(), this)public boolean writeFile(Identifier id)
public void setPath(java.lang.String path)
public java.lang.String getPath()
public java.lang.String getDirectory()
public java.lang.String getFilename()
@Deprecated public java.lang.String makeRelativePath(java.lang.String s)
public java.lang.String getRelativePath(java.lang.String abspath)
public java.lang.String makeAbsolutePath(java.lang.String relpath)
public java.lang.String makeAbsolutePath(java.lang.String relpath,
boolean relToParent)
relpath - relToParent - true to make the path relative to the parent workspacepublic java.lang.String makeAbsolutePathFromWatershed(java.lang.String relpath)
relpath - a relative pathpublic java.lang.String makeRelativePathFromWatershed(java.lang.String abspath)
abspath - an absolute pathpublic UserInterface setUserInterface(UserInterface ui)
ui - public UserInterface getUserInterface()
public hec.server.RemoteWrapper setUserInterface(hec.server.RemoteWrapper uiWrap)
public void printLogMessage(java.lang.String msg)
printLogMessage in interface MessagePrintermsg - The detailed String log messagepublic void printErrorMessage(java.lang.String msg)
printErrorMessage in interface MessagePrintermsg - The detailed String error messagepublic void printWarningMessage(java.lang.String msg)
printWarningMessage in interface MessagePrintermsg - The detailed String Warning messagepublic void printMessage(java.lang.String msg)
printMessage in interface MessagePrintermsg - The detailed String messagepublic void printStatus(java.lang.String msg)
msg - The detailed String statuspublic void setLineAttributes(HtmlAttributes a)
public void printTableRow(boolean isHeader,
java.lang.String tableRow)
isHeader - Boolean is headertableRow - The String table rowpublic void printSeparator()
public void setProgress(int i)
public boolean isCanceled()
public ITSDataSet getInputITSDataSet()
getInputITSDataSet in interface TsRecordContainerpublic ITSDataSet getOutputITSDataSet()
getOutputITSDataSet in interface TsRecordContainerpublic TSDataSet getInputTSDataSet()
public TSDataSet getOutputTSDataSet()
public void notify(java.lang.String message)
notify in interface hec.csinterface.CallBackInterfacepublic TSRecordProxy newTSRecordProxy(TSLocation2 location)
newTSRecordProxy in interface TsRecordContainerpublic TSRecordProxy newTSRecordProxy(TSLocation loc)
public boolean deleteFile(Identifier deleteFileId)
public Identifier openFile(Identifier openFileId)
public Identifier newFile(Identifier newFileId)
public boolean copyFile(Identifier oldPathId, Identifier newPathId) throws java.rmi.RemoteException
java.rmi.RemoteExceptionpublic java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorgetFieldObject in class NamedTypefld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorsetFieldObject in class NamedTypefld - The java field object representing the member field to be setfobj - The data to set in that fieldpublic void setReloadOk(boolean reloadOk)
public boolean getReloadOk()
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void unloading()
public void renamed(Identifier id)
public void deleting()
public void setModifiedFalse()
public void setModified(boolean flag)
NamedTypesetModified in interface rma.lang.ModifiablesetModified in class NamedTypepublic long getLastModifiedTime()
public java.lang.String getLastModifiedTimeString()
public void setLastModifiedTime(long modTime)
public void setLastModifiedTime()
public void setReadOnly(boolean b)
public boolean getReadOnly()
public boolean backupFile(java.lang.String backupDir)
public boolean saveManager()
public Manager saveManagerAs(java.lang.String directory, java.lang.String filePrefix)
public Manager saveManagerAs(java.lang.String directory, java.lang.String filePrefix, ManagerProxyListContainer container)
public boolean refreshData(Manager origMgr)
public boolean setLocked(int lockType)
setLocked in interface LockableObjectlockType - = FileLock.UNLOCK (to unlock), FileLock.READ_LOCK or FileLock.WRITE_LOCKFileLockpublic int hasLock()
hasLock in interface LockableObjectpublic hec.csinterface.RmiFileManager getFileManager()
public void addModifiableListener(hec.event.ModifiableListener listener)
addModifiableListener in class NamedTypepublic void removeModifiableListener(hec.event.ModifiableListener listener)
removeModifiableListener in class NamedType