Package com.nomagic.magicdraw.core
Interface SaveParticipant
@OpenApiAll
public interface SaveParticipant
Interface declares functionality for save process participant.
Save participant can do some custom actions before and after project saving procedure.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doAfterSave
(Project project, ProjectDescriptor descriptor) Describes any actions to do after project saving.void
doBeforeSave
(Project project, ProjectDescriptor descriptor) Describes any actions to do before project saving.default boolean
isReadyForCommit
(com.nomagic.ci.persistence.IProject project, String comment) Indicates ability to commit project.boolean
isReadyForSave
(Project project, ProjectDescriptor descriptor) Indicates ability to save project.
-
Method Details
-
isReadyForSave
Indicates ability to save project. Save mechanism checks this status of all save participants. Project will not be saved if some of save participants are not ready.- Parameters:
project
- the project prepared for saving.descriptor
- the project location descriptor.- Returns:
- false if project can't be saved.
-
doBeforeSave
Describes any actions to do before project saving. Will be executed only if isReadyForSave() returns true.- Parameters:
project
- the project prepared for saving.descriptor
- the project location descriptor.
-
doAfterSave
Describes any actions to do after project saving. Will be executed only if project was saved successfully.- Parameters:
project
- the project.descriptor
- the project location descriptor.
-
isReadyForCommit
default boolean isReadyForCommit(com.nomagic.ci.persistence.IProject project, @CheckForNull String comment) Indicates ability to commit project. Save mechanism checks this status of all save participants. Project will not be committed if some of save participants are not ready.- Parameters:
project
- the project prepared for saving.comment
- commit comment- Returns:
- false if project can't be committed.
-