Class MdibEntityFactory


  • public class MdibEntityFactory
    extends Object
    Factory to create MdibEntity instances.
    • 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 MdibEntity instance.
      • 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 MdibEntity instance 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 MdibEntity instance 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 MdibEntity instance with replaced children.