Class MdibEntityFactory
- java.lang.Object
-
- org.somda.sdc.biceps.common.factory.MdibEntityFactory
-
public class MdibEntityFactory extends Object
Factory to create MdibEntity instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MdibEntitycreateMdibEntity(String parent, List<String> children, AbstractDescriptor descriptor, List<AbstractState> states, MdibVersion mdibVersion)Creates an MDIB entity based on all possible fields.MdibEntityreplaceChildren(MdibEntity mdibEntity, List<String> children)Takes an entity and replaces the children.MdibEntityreplaceDescriptorAndStates(MdibEntity mdibEntity, AbstractDescriptor descriptor, List<AbstractState> states)Takes an entity and replaces descriptor and states.MdibEntityreplaceStates(MdibEntity mdibEntity, List<AbstractState> states)Takes an entity and replaces the states.
-
-
-
Method Detail
-
createMdibEntity
public MdibEntity createMdibEntity(@Nullable String parent, List<String> children, AbstractDescriptor descriptor, List<AbstractState> states, MdibVersion mdibVersion)
Creates an MDIB entity based on all possible fields.- Parameters:
parent- the parent of the entity.children- the list of child handles.descriptor- the descriptor of the entity.states- the states of the entity.mdibVersion- the MDIB version of the entity.- Returns:
- an
MdibEntityinstance.
-
replaceDescriptorAndStates
public MdibEntity replaceDescriptorAndStates(MdibEntity mdibEntity, AbstractDescriptor descriptor, List<AbstractState> states)
Takes an entity and replaces descriptor and states.- Parameters:
mdibEntity- the entity where descriptors and states are supposed to be replaced.descriptor- the descriptor to replace.states- the states to replace.- Returns:
- an
MdibEntityinstance with replaced descriptor and states.
-
replaceStates
public MdibEntity replaceStates(MdibEntity mdibEntity, List<AbstractState> states)
Takes an entity and replaces the states.- Parameters:
mdibEntity- the entity where states are supposed to be replaced.states- the states to replace.- Returns:
- an
MdibEntityinstance with replaced states.
-
replaceChildren
public MdibEntity replaceChildren(MdibEntity mdibEntity, List<String> children)
Takes an entity and replaces the children.- Parameters:
mdibEntity- the entity where child handles are supposed to be replaced.children- the child handles to replace.- Returns:
- an
MdibEntityinstance with replaced children.
-
-