com.neeve.config
Interface IConfigEntityContainer<T>

All Superinterfaces:
IConfigContentNode, IConfigNode
All Known Subinterfaces:
IConfigComplexEntityContainer, IConfigSimpleEntityContainer

public interface IConfigEntityContainer<T>
extends IConfigContentNode

Represents an entity container in the configuration repository.

An entity container is a node in the configuration tree that holds entity objects. Each entity object is also a node in the tree one level below its container.

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

Method Summary
 T createEntity(String name)
          Create a new entity in the container
 void deserialize(String str, boolean markAsDirty)
          Deserialize a container from a string
 T getEntity(String name)
          Get an entity in a container.
 Iterator<T> iterator()
          Return an iterator to the contents of the container
 T removeEntity(String name)
          Remove an entity from a container.
 void serialize(StringBuilder builder)
          Serialize a container to a string
 
Methods inherited from interface com.neeve.config.IConfigContentNode
clear, isDirty, setDirty
 
Methods inherited from interface com.neeve.config.IConfigNode
getAddress, getRepository
 

Method Detail

createEntity

T createEntity(String name)
               throws EConfigException
Create a new entity in the container

Parameters:
name - The name of the entity to create.
Returns:
Returns the newly created entity
Throws:
EConfigException - Thrown if an entity of the specified name already exists in the container.
Threading:
This class is not safe for concurrent access by multiple threads

getEntity

T getEntity(String name)
Get an entity in a container.

Parameters:
name - The name of the entity to retrieve.
Returns:
Returns the entity or null in case no entity of the supplied name is in the container.
Threading:
This class is not safe for concurrent access by multiple threads

removeEntity

T removeEntity(String name)
Remove an entity from a container.

Parameters:
name - The name of the entity to remove.
Returns:
Returns the entity that was removed or null in case no entity of the supplied name is in the container.
Threading:
This class is not safe for concurrent access by multiple threads

serialize

void serialize(StringBuilder builder)
Serialize a container to a string

Parameters:
builder - The string builder to use to serialize the container
Threading:
This class is not safe for concurrent access by multiple threads

deserialize

void deserialize(String str,
                 boolean markAsDirty)
                 throws EConfigException
Deserialize a container from a string

Parameters:
str - The string to derialize from.
markAsDirty - Indicates whether to mark the container as dirty.
Throws:
EConfigException
Threading:
This method is not safe for concurrent access by multiple threads

This method creates entities encoded in the supplied string.


iterator

Iterator<T> iterator()
Return an iterator to the contents of the container

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


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