public class EMFDeleteServiceImpl extends Object implements ConditionalDeleteService
DeleteService
. Uses DeleteCommand
respectively.Constructor and Description |
---|
EMFDeleteServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canDelete(Iterable<?> objects)
Queries whether all of the given
objects can be deleted. |
boolean |
canRemove(Object owner,
Object feature,
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(Object toDelete)
Deletes the given object from the containment tree.
|
void |
deleteElements(Collection<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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adapt, canDelete, canRemove, getDeleteService
public void instantiate(ViewModelContext context)
ViewModelService
instantiate
in interface ViewModelService
context
- the ViewModelContext
public void dispose()
ViewModelService
dispose
in interface ViewModelService
public int getPriority()
ViewModelService
getPriority
in interface ViewModelService
public void deleteElements(Collection<Object> toDelete)
DeleteService
deleteElements
in interface DeleteService
toDelete
- the objects to deletepublic void deleteElement(Object toDelete)
DeleteService
deleteElement
in interface DeleteService
toDelete
- the object to deletepublic boolean canDelete(Iterable<?> objects)
ConditionalDeleteService
objects
can be deleted.canDelete
in interface ConditionalDeleteService
objects
- a number of objects to be deletedfalse
if any of the objects cannot be deleted; true
otherwise, including the case of no
objects
public boolean canRemove(Object owner, Object feature, Iterable<?> objects)
ConditionalDeleteService
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
.canRemove
in interface ConditionalDeleteService
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 removedobjects
may be removedCopyright © 2020. All rights reserved.