com.ibm.rational.rpe.common.utils
Class PropertyUtils

java.lang.Object
  extended by com.ibm.rational.rpe.common.utils.PropertyUtils

public class PropertyUtils
extends java.lang.Object

Author:
spurlos

Constructor Summary
PropertyUtils()
           
 
Method Summary
static Property clone(Property source)
           
static Property cloneSameValue(Property source)
          Creates a clone of this property but assigns the same value to it
static boolean compareProperties(java.util.Collection<Property> properties1, java.util.Collection<Property> properties2)
           
static boolean compareProperties(Property prop1, Property prop2)
           
static java.lang.String extractSystemVariables(java.lang.String prop)
           
static Property findCreateProperty(Feature context, java.lang.String propname)
           
static Property findFirstProperty(Feature context, java.lang.String featurePath, java.lang.String propertyName)
          Deprecated. 
static java.util.List<Property> findPropertiesByName(Feature context, java.lang.String name)
           
static java.util.List<Property> findPropertiesByType(Feature context, java.lang.String type)
          Deprecated. 
static Property findProperty(java.util.Collection<Property> properties, java.lang.String name)
           
static Property findProperty(Feature context, java.lang.String name)
           
static Property findProperty(java.util.List<Property> properties, java.lang.String name)
           
static Property findPropertyDeep(Feature context, java.lang.String name)
           
static java.lang.String getPropertyRawValue(Property prop, java.lang.String emptyValue)
           
static boolean hasPropertiesWithType(Feature context, java.lang.String type)
           
static Property makeProperty(java.lang.String proptag, java.lang.String valtag, java.lang.String valcontent)
           
static boolean removeFeature(Feature context, Feature removed)
          Deprecated. 
static boolean removeProperty(Feature context, Property property)
          Deprecated. 
static boolean removeProperty(Feature context, java.lang.String name)
           
static void setProperty(Feature context, java.lang.String propname, Value value)
           
static void setPropertyValue(Property prop, Value value)
          Deprecated. 
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyUtils

public PropertyUtils()
Method Detail

makeProperty

public static Property makeProperty(java.lang.String proptag,
                                    java.lang.String valtag,
                                    java.lang.String valcontent)

clone

public static Property clone(Property source)

cloneSameValue

public static Property cloneSameValue(Property source)
Creates a clone of this property but assigns the same value to it

Parameters:
source -
Returns:

findProperty

public static Property findProperty(java.util.Collection<Property> properties,
                                    java.lang.String name)
Parameters:
properties -
name -
Returns:

findProperty

public static Property findProperty(Feature context,
                                    java.lang.String name)

findPropertyDeep

public static Property findPropertyDeep(Feature context,
                                        java.lang.String name)

findFirstProperty

@Deprecated
public static Property findFirstProperty(Feature context,
                                                    java.lang.String featurePath,
                                                    java.lang.String propertyName)
Deprecated. 

This method will be removed.

Parameters:
context -
featurePath -
propertyName -
Returns:

findPropertiesByType

@Deprecated
public static java.util.List<Property> findPropertiesByType(Feature context,
                                                                       java.lang.String type)
Deprecated. 


hasPropertiesWithType

public static boolean hasPropertiesWithType(Feature context,
                                            java.lang.String type)

findPropertiesByName

public static java.util.List<Property> findPropertiesByName(Feature context,
                                                            java.lang.String name)

compareProperties

public static boolean compareProperties(Property prop1,
                                        Property prop2)

compareProperties

public static boolean compareProperties(java.util.Collection<Property> properties1,
                                        java.util.Collection<Property> properties2)

findProperty

public static Property findProperty(java.util.List<Property> properties,
                                    java.lang.String name)

removeProperty

public static boolean removeProperty(Feature context,
                                     java.lang.String name)

removeProperty

@Deprecated
public static boolean removeProperty(Feature context,
                                                Property property)
Deprecated. 

This method is not used and will be removed in the next release

Parameters:
context -
property -
Returns:

removeFeature

@Deprecated
public static boolean removeFeature(Feature context,
                                               Feature removed)
Deprecated. 

This method is not used and will be removed in the next release

Parameters:
context -
removed -
Returns:

setProperty

public static void setProperty(Feature context,
                               java.lang.String propname,
                               Value value)

findCreateProperty

public static Property findCreateProperty(Feature context,
                                          java.lang.String propname)

getPropertyRawValue

public static java.lang.String getPropertyRawValue(Property prop,
                                                   java.lang.String emptyValue)
Parameters:
prop -
emptyValue -
Returns:
the value of the property if not null, the emptyValue otherwise

setPropertyValue

@Deprecated
public static void setPropertyValue(Property prop,
                                               Value value)
Deprecated. 

This method is not used and will be removed in the next release


extractSystemVariables

public static java.lang.String extractSystemVariables(java.lang.String prop)