com.neeve.config
Interface IConfigComplexEntity

All Superinterfaces:
IConfigContentNode, IConfigEntity, IConfigNode

public interface IConfigComplexEntity
extends IConfigEntity

Represents a complex entity in the configuration repository.

A complex entity extends a simple entity to be able to hold named property sets in addition to the default property set. The default property set is identified by the null key.

Threading:
This class is not safe for concurrent access by multiple threads

Method Summary
 Properties getProperties(String setname)
          Get a set of properties from the entity's property set.
 String getProperty(String setname, String propname, String defval)
          Get a property value from an entity's property set.
 Iterator<String> names()
          Get an iterator to iterate over the names of the property sets
 IConfigComplexEntity setProperties(String setname, Properties props)
          Set a set of properties in an entity's property set.
 IConfigComplexEntity setProperty(String setname, String propname, String propval)
          Set a property value in an entity's property set.
 
Methods inherited from interface com.neeve.config.IConfigEntity
deserialize, getContainer, getName, serialize
 
Methods inherited from interface com.neeve.config.IConfigContentNode
clear, isDirty, setDirty
 
Methods inherited from interface com.neeve.config.IConfigNode
getAddress, getRepository
 

Method Detail

setProperties

IConfigComplexEntity setProperties(String setname,
                                   Properties props)
Set a set of properties in an entity's property set.

Parameters:
setname - The name of the property set in which to set the properties. A property set name must be non-null.
props - The property table from where to set the properties. A value of null will clear the properties for the specified property set.
Returns:
Returns the entity on which the method was invoked for invocation chaining.
Threading:
This class is not safe for concurrent access by multiple threads

getProperties

Properties getProperties(String setname)
Get a set of properties from the entity's property set.

Parameters:
setname - The name of the property set from which to get the properties. A property set name must be non-null.
Returns:
Returns the requested property set.
Threading:
This class is not safe for concurrent access by multiple threads

setProperty

IConfigComplexEntity setProperty(String setname,
                                 String propname,
                                 String propval)
Set a property value in an entity's property set.

Parameters:
setname - The name of the property set in which to set this value. A property set name must be non-null.
propname - The property name.
propval - The property value.
Returns:
Returns the entoty on which the method was invoked for invocation chaining.
Threading:
This class is not safe for concurrent access by multiple threads

getProperty

String getProperty(String setname,
                   String propname,
                   String defval)
Get a property value from an entity's property set.

Parameters:
setname - The name of the property set from where to retrieve the property value. A property set name must be non-null.
propname - The name of the property.
defval - The value to return in case the property was not found.
Threading:
This class is not safe for concurrent access by multiple threads

names

Iterator<String> names()
Get an iterator to iterate over the names of the property sets

Threading:
This class is not safe for concurrent access by multiple threads


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.