com.togethersoft.openapi.model.extension
Interface CutProvider
- public interface CutProvider
- extends Provider
Provider, which implements this interface must support "cut" functionality of Element
- Author:
- TogetherSoft
| Method Summary |
boolean | canCut(Element element) This method is called when canCut method of Element was invoked or
right before model is going to call cut method of provider. |
String | cut(Element element, Element cuttedElement) This method must cut element and produce cutted element. |
boolean | isApplicable(Element element) Call of this method is guaranteed to precede call of any other method of this provider. |
canCut
public boolean canCut(Element element)
- This method is called when
canCut method of Element was invoked or
right before model is going to call cut method of provider.
Provider must return true if it can cut this element.
cut
public String cut(Element element, Element cuttedElement)
- This method must cut
element and produce cutted element.
It is guaranteed, that canCut method was called before with the same element
parameter, and true was returned.
If cuttedElement is null, provider must return unique name of new
Element. It shouldn't try to instantiate it. If new element was already instantiated
(with the help of another provider), this element will be passed to provider as
cuttedElement argument. In this case provider must only participate in cutting;
any returned value will be ignored.
If element was cut, it must became deleted.
isApplicable
public boolean isApplicable(Element element)
- Call of this method is guaranteed to precede call of any other method of this provider.
Provider must return true if it supply "cut" operation for specified element.