Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.model
Interface IPropertySet

All Superinterfaces:
IPropertySetContainer
All Known Implementing Classes:
PropertyList, PropertySet

public interface IPropertySet
extends IPropertySetContainer

A Property Set stores key/value pairs, where the keys are Strings and the values are an IProperty, of a type declared by an IPropertyType. The Property Set is identified by a name. By default, the type of each property is of type String, and in fact each value can be retrieved in String representation. The key "description" is reserved for internal use, to store the description of the Property set.


Field Summary
static  String DESCRIPTION_KEY
          The key used to store the description of the Property Set.
 
Method Summary
  IProperty addProperty ( String key, String value)
          Add a Property with String value to the set.
  IProperty addProperty ( String key, String value, IPropertyType type)
          Add a typed Property to the set.
  IPropertySetContainer getContainer ()
           
  String getDescription ()
          Return the description of this Property Set.
  String getName ()
          Return the name of this Property Set.
  IProperty getProperty ( String key)
          Return the IProperty associated with the given key.
  String[] getPropertyKeys ()
          Return the list of Property Keys in this Set.
  IPropertyType getPropertyType ( String key)
          Return the type of the property identified by the given key.
  String getPropertyValue ( String key)
          Return the String representation of a Property.
 boolean removeProperty ( String key)
          Remove a Property from the set.
 void setContainer ( IPropertySetContainer container)
          Sets the container of this property set.
 void setDescription ( String description)
          Sets the description property of the property set.
 void setName ( String name)
          Set the name of this Property Set.
 void setProperties ( Map map)
          Set all the Properties of this set.
 
Methods inherited from interface org.eclipse.rse.core.model. IPropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 

Field Detail

DESCRIPTION_KEY

static final 
String DESCRIPTION_KEY
The key used to store the description of the Property Set. This is no longer used and should not be referenced except for compatibility reasons.

See Also:
Constant Field Values
Method Detail

getName


String getName()
Return the name of this Property Set.

Returns:
String name of the Property Set.

getDescription


String getDescription()
Return the description of this Property Set. Note that in order to set the description, you need to call addProperty(IPropertySet.DESCRIPTION_KEY, "Description");

Returns:
Description of the Property Set, or null in case no description has been set.

setDescription

void setDescription(
String description)
Sets the description property of the property set. Fully equivalent to addProperty(IPropertySet.DESCRIPTION_KEY, description);

Parameters:
description - the string describing this property set.

getProperty


IProperty getProperty(
String key)
Return the IProperty associated with the given key. If the key is not in the set, null is returned.

Parameters:
key - String key for Property
Returns:
requested Property, or null if the key is not found in the set.

getPropertyValue


String getPropertyValue(
String key)
Return the String representation of a Property. Provided that the key is found in the set, this is a shortcut for getProperty(key).getValue(). If the key is not in the set, null is returned.

Parameters:
key - String key for Property
Returns:
String value of requested Property, or null if the key is not found in the set.

getPropertyKeys


String[] getPropertyKeys()
Return the list of Property Keys in this Set. Provided that the Set has a description, the

Returns:
String array of Property keys.

getPropertyType


IPropertyType getPropertyType(
String key)
Return the type of the property identified by the given key.

Parameters:
key - String key for Property
Returns:
Type of requested Property, or null if the key is not found in the set.

setName

void setName(
String name)
Set the name of this Property Set.

Parameters:
name - the name to set. Must not be null

setProperties

void setProperties(
Map map)
Set all the Properties of this set.

Parameters:
map - a Map of String to IProperty associations.

addProperty


IProperty addProperty(
String key,
                      
String value)
Add a Property with String value to the set. In case a Property already exist for the given key, it will be overwritten by the new value, note that this will not change the Property's type, so if the key identifies an integer Property but you set it to String value "foo" the resulting Property Set will be inconsistent. If the Property does not yet exist in the set, a new key will be added and the new Property will be of type "String".

Parameters:
key - Key to add
value - Value to add
Returns:
The added Property

addProperty


IProperty addProperty(
String key,
                      
String value,
                      
IPropertyType type)
Add a typed Property to the set. In case a Property already exists for the given key, it will be removed and replaced by the new one.

Parameters:
key - Key to add
value - Value to add
type - Type of the Property to add
Returns:
The added Property

removeProperty

boolean removeProperty(
String key)
Remove a Property from the set.

Parameters:
key - The key to remove
Returns:
true if the Property has been removed, or false if the key has not been part of the set.

setContainer

void setContainer(
IPropertySetContainer container)
Sets the container of this property set. Used to notify the container of a change in a property.

Parameters:
container - the property set container

getContainer


IPropertySetContainer getContainer()
Returns:
the container of this property set or null if there is no container.

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire