com.dynatrace.diagnostics.pdk
Interface PropertyContainer

All Superinterfaces:
java.lang.Iterable<Property>

public interface PropertyContainer
extends java.lang.Iterable<Property>

A container for Property items. This is only needed for Plugin configuration migration, see Migrator.


Method Summary
 boolean addProperty(java.lang.String key, java.lang.String type, java.lang.String value)
          Add a new property.
 void clear()
          clear all existing properties.
 Property getProperty(java.lang.String key)
          Searches for the property with the matching key.
 boolean remove(Property property)
          remove a property
 int size()
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

addProperty

boolean addProperty(java.lang.String key,
                    java.lang.String type,
                    java.lang.String value)
Add a new property. If the property key already exists the container will remain unchanged and this method returns false.

Parameters:
key - the unique key for this property
type - a property type, see Property for constants.
value - a value which is compatible with the set type
Returns:
true if the property was successfully added, false otherwise.

getProperty

Property getProperty(java.lang.String key)
Searches for the property with the matching key.

Parameters:
key - the key to search for
Returns:
the matching property or null if nothing was found

remove

boolean remove(Property property)
remove a property

Parameters:
property - the property to remove
Returns:
true if the property was configured and was removed.

clear

void clear()
clear all existing properties.


size

int size()
Returns:
returns the number of currently set properties


Copyright © 2004-2012 dynaTrace software GmbH