|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IModel
A generic model. Classes that implement this interface are expected to be able to:
null.
| Method Summary | |
|---|---|
long |
getTimeStamp()
Returns the last modification time stamp. |
IResource |
getUnderlyingResource()
Returns a workspace resource that this model is created from. |
boolean |
isInSync()
Tests if this model is in sync with the storage object it was loaded from. |
boolean |
isLoaded()
Tests if this model is loaded and can be used. |
boolean |
isReconcilingModel()
Returns whether this model needs to react to changes in source and reconcile them. |
void |
load()
Loads the model directly from an underlying resource. |
void |
load(InputStream source,
boolean outOfSync)
Loads the model from the provided input stream. |
void |
reload(InputStream source,
boolean outOfSync)
Reload is a version of 'load' operation that has the following steps: Reset the model Load the model Fire "world changed" event Reload operation is used when a model that is already in use is invalidated by a change in the underlying buffer or resource. |
| Methods inherited from interface org.eclipse.mtj.core.model.IBaseModel |
|---|
dispose, isDisposed, isEditable, isValid |
| Method Detail |
|---|
IResource getUnderlyingResource()
With the caveat of stepped loading, all other properties of the underlying resource could be used directly (path, project etc.).
null if the model is not created from a resource.boolean isReconcilingModel()
true if this is a reconciling model,
false otherwise.
void load()
throws CoreException
CoreException - if errors are encountered during the loading.
void load(InputStream source,
boolean outOfSync)
throws CoreException
true.
source - an input stream that should be parsed to load the modeloutOfSync - if true, time stamp will not be updated to maintain
out-of-sync state of the model.
CoreException - if errors are encountered during the loading.
void reload(InputStream source,
boolean outOfSync)
throws CoreException
source - an input stream that should be parsed to load the model.outOfSync - if true, the timestamp will not be updated to maintain
out-of-sync state of the model.
CoreException - if errors are encountered during the reloading.long getTimeStamp()
boolean isInSync()
true if the model is in sync with the file system.boolean isLoaded()
true if the model has been loaded
|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||