Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.perspective.model
Interface IISeriesPropertiesModel

All Known Implementing Classes:
IBMiPropertiesModelAdapter

public interface IISeriesPropertiesModel

iSeries Properties Model base class.
Manages persistent data associated with an iSeries project, SRCPF or source member. Properties can be either Shared or Local.
Shared properties are stored in a file. Each subclass model knows which setttings in the passed Hastable to pick in order to generate the properties file.
Local properties are stored only locally, and are not visible when the project is loaded on another Eclipse installation.
Note: If property has not been set, getProperty() will return null. Load and Save methods knows how to resave this model back to the file system.
Clients are not expected to implement this interface.


Field Summary
static String Copyright
           
 
Method Summary
 void clearCache()
          Remove any cached values so that the next read, will read from the persisted store
 Boolean getBooleanProperty(String key)
          Returns the boolean value of an iSeries property, whether it is Local or shared.
Returns null if the property value is not a boolean value, or if the model is corrupt, or any error restoring the model occur.
 Integer getIntProperty(String key)
          Returns the int value of an iSeries property, whether it is Local or shared.
Returns null if the property value is not a long value, or if the model is corrupt, or any error restoring the model occur.
 Long getLongProperty(String key)
          Returns the long value of an iSeries property, whether it is Local or shared.
Returns null if the property value is not a long value, or if the model is corrupt, or any error restoring the model occur.
 Long getLongProperty(String key, long defaultValue)
          Returns the long value of an iSeries property.
 String getProperty(String key)
          Returns the value of an iSeries property, whether it is Local or shared, and wether it is a predefined property, or an ISV supplied property.
Returns null if the propetry is a predefined or an ISV property that has not been set, or the key is not a recognized ISV or predefined property key.
 String getProperty(String key, String defaultValue)
          Returns the value of an iSeries property, whether it is Local or shared, and wether it is a predefined property, or an ISV supplied property.
Returns the default value argument if the property is not found.
 boolean isDirty()
          Tests whether this properties model needs to be saved or not.
returns true only if any of the predefined properties or ISV defined properties have changed.
 boolean isTeamShared(String key)
          Tests whether this property is team shared on not.
Properties can be either team shared, or local.
 void load(org.eclipse.core.runtime.IProgressMonitor monitor)
          Loads all local and shared properties, wether they are predefined properties or ISV contributed ones.
Also loads the list of modified properties.
 void mergeProperties(Hashtable newProperties)
          Merges the argument properties with an existing model.
Preserves properties that are not passed in the argument table.
 void save(org.eclipse.core.runtime.IProgressMonitor monitor)
          Saves local and shared properties.
Also saved the current list of modified properties.
 void setBooleanProperty(String key, boolean value)
          Sets a long property.
If the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties().
 void setIntProperty(String key, int value)
          Sets a int property.
If the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties().
 void setLongProperty(String key, long value)
          Sets a long property.
If the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties().
 void setProperty(String key, String value)
          Sets the property.
If the value is null, the method does nothing.
 

Field Detail

Copyright

static final String Copyright
See Also:
Constant Field Values
Method Detail

isTeamShared

boolean isTeamShared(String key)
Tests whether this property is team shared on not.
Properties can be either team shared, or local. Local properties are only set (available) for the current Workbench install. If the user performs a reinstall, these properties are lost. They are implemented under the hood as Eclipse "persistent" properties. They are not team shared because they are not stored as part of the files that are checked into a team repository. Team shared properties on the other hand are stored in an xml file that is generated in the correspoding iSeries project. When a project is checked into a team repository, all team members that grab this project also have access to all these team shared properties.


isDirty

boolean isDirty()
Tests whether this properties model needs to be saved or not.
returns true only if any of the predefined properties or ISV defined properties have changed.


getProperty

String getProperty(String key)
Returns the value of an iSeries property, whether it is Local or shared, and wether it is a predefined property, or an ISV supplied property.
Returns null if the propetry is a predefined or an ISV property that has not been set, or the key is not a recognized ISV or predefined property key.


getProperty

String getProperty(String key,
                   String defaultValue)
Returns the value of an iSeries property, whether it is Local or shared, and wether it is a predefined property, or an ISV supplied property.
Returns the default value argument if the property is not found.

See Also:
getProperty(String key).

setProperty

void setProperty(String key,
                 String value)
Sets the property.
If the value is null, the method does nothing. If the value is an empty string, the property will be added to the list of incomplete properties. Also, if the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties(). This method has no effect if the new value is equal to the old value.


getBooleanProperty

Boolean getBooleanProperty(String key)
Returns the boolean value of an iSeries property, whether it is Local or shared.
Returns null if the property value is not a boolean value, or if the model is corrupt, or any error restoring the model occur. Valid boolean strings are "true" or "false", with case ignored.


getLongProperty

Long getLongProperty(String key)
Returns the long value of an iSeries property, whether it is Local or shared.
Returns null if the property value is not a long value, or if the model is corrupt, or any error restoring the model occur.


getLongProperty

Long getLongProperty(String key,
                     long defaultValue)
Returns the long value of an iSeries property. Returns the default value if the property value is not a long value, or if the model is corrupt, or any error restoring the model occur.


getIntProperty

Integer getIntProperty(String key)
Returns the int value of an iSeries property, whether it is Local or shared.
Returns null if the property value is not a long value, or if the model is corrupt, or any error restoring the model occur.


setBooleanProperty

void setBooleanProperty(String key,
                        boolean value)
Sets a long property.
If the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties(). This method has no effect if the new value is equal to the old value.


setLongProperty

void setLongProperty(String key,
                     long value)
Sets a long property.
If the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties(). This method has no effect if the new value is equal to the old value.


setIntProperty

void setIntProperty(String key,
                    int value)
Sets a int property.
If the new value of the property is different than the old value, then the key/value pair for the old value is stored in the list of modified properties, as returned by getModifiedProperties(). This method has no effect if the new value is equal to the old value.


mergeProperties

void mergeProperties(Hashtable newProperties)
Merges the argument properties with an existing model.
Preserves properties that are not passed in the argument table. If a new property matches an old one the model is not marked as dirty. If a new property is not present or its value supersedes the old one, the model is marked dirty.


save

void save(org.eclipse.core.runtime.IProgressMonitor monitor)
Saves local and shared properties.
Also saved the current list of modified properties.


load

void load(org.eclipse.core.runtime.IProgressMonitor monitor)
Loads all local and shared properties, wether they are predefined properties or ISV contributed ones.
Also loads the list of modified properties.


clearCache

void clearCache()
Remove any cached values so that the next read, will read from the persisted store


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.