Class ConfigurationEffigy

    • Constructor Detail

      • ConfigurationEffigy

        public ConfigurationEffigy​(Workspace workspace)
        Create a new effigy in the specified workspace with an empty string for its name.
        Parameters:
        workspace - The workspace for this effigy.
    • Method Detail

      • setContainer

        public void setContainer​(CompositeEntity container)
                          throws IllegalActionException,
                                 NameDuplicationException
        Specify the container, adding the entity to the list of entities in the container. If the container already contains an entity with the same name, then throw an exception and do not make any changes. Similarly, if the container is not in the same workspace as this entity, throw an exception. If the entity is already contained by the container, do nothing. If this entity already has a container, remove it from that container first. Otherwise, remove it from the directory of the workspace, if it is present. If the argument is null, then unlink the ports of the entity from any relations and remove it from its container. It is not added to the workspace directory, so this could result in this entity being garbage collected. Derived classes may override this method to constrain the container to subclasses of CompositeEntity. This method is write-synchronized to the workspace and increments its version number. This class overrides the base class to additionally set the model that this effigy views to be its toplevel container.
        Overrides:
        setContainer in class Effigy
        Parameters:
        container - The proposed container.
        Throws:
        IllegalActionException - If the action would result in a recursive containment structure, or if this entity and container are not in the same workspace..
        NameDuplicationException - If the name of this entity collides with a name already in the container.
        See Also:
        ComponentEntity.getContainer()