Class EMFDeleteServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canDelete​(java.lang.Iterable<?> objects)
      Queries whether all of the given objects can be deleted.
      boolean canRemove​(java.lang.Object owner, java.lang.Object feature, java.lang.Iterable<?> objects)
      Query whether all of the given objects in some reference feature of an owner of that feature can be removed from the reference feature.
      void deleteElement​(java.lang.Object toDelete)
      Deletes the given object from the containment tree.
      void deleteElements​(java.util.Collection<java.lang.Object> toDelete)
      Deletes the given objects from the containment tree.
      void dispose()
      Dispose.
      int getPriority()
      Returns the priority for this view service.
      void instantiate​(ViewModelContext context)
      Instantiate the view service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EMFDeleteServiceImpl

        public EMFDeleteServiceImpl()
    • Method Detail

      • getPriority

        public int getPriority()
        Description copied from interface: ViewModelService
        Returns the priority for this view service.
        Specified by:
        getPriority in interface ViewModelService
        Returns:
        the priority
      • deleteElements

        public void deleteElements​(java.util.Collection<java.lang.Object> toDelete)
        Description copied from interface: DeleteService
        Deletes the given objects from the containment tree. This will cut all references to the deleted objects.
        Specified by:
        deleteElements in interface DeleteService
        Parameters:
        toDelete - the objects to delete
      • deleteElement

        public void deleteElement​(java.lang.Object toDelete)
        Description copied from interface: DeleteService
        Deletes the given object from the containment tree. This will cut all references to the deleted object.
        Specified by:
        deleteElement in interface DeleteService
        Parameters:
        toDelete - the object to delete
      • canDelete

        public boolean canDelete​(java.lang.Iterable<?> objects)
        Description copied from interface: ConditionalDeleteService
        Queries whether all of the given objects can be deleted.
        Specified by:
        canDelete in interface ConditionalDeleteService
        Parameters:
        objects - a number of objects to be deleted
        Returns:
        false if any of the objects cannot be deleted; true otherwise, including the case of no objects
      • canRemove

        public boolean canRemove​(java.lang.Object owner,
                                 java.lang.Object feature,
                                 java.lang.Iterable<?> objects)
        Description copied from interface: ConditionalDeleteService
        Query whether all of the given objects in some reference feature of an owner of that feature can be removed from the reference feature. In the case of containment references, this amounts to deletion of the object.
        Specified by:
        canRemove in interface ConditionalDeleteService
        Parameters:
        owner - the owner of a reference to some object
        feature - a reference feature of the owner
        objects - a group of objects referenced by the owner from which they are to be removed
        Returns:
        whether the objects may be removed