forked from kbss-cvut/termit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from opendata-mvcr/upstream-merge
Upstream merge
- Loading branch information
Showing
19 changed files
with
284 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/cz/cvut/kbss/termit/event/DocumentRenameEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package cz.cvut.kbss.termit.event; | ||
|
||
import cz.cvut.kbss.termit.model.resource.Document; | ||
import java.util.Objects; | ||
import org.springframework.context.ApplicationEvent; | ||
|
||
/** | ||
* Indicates that a {@link Document} asset has changed its label. | ||
*/ | ||
public class DocumentRenameEvent extends ApplicationEvent { | ||
|
||
private final String originalName; | ||
|
||
private final String newName; | ||
|
||
public DocumentRenameEvent(Document source, String originalName, String newName) { | ||
super(source); | ||
this.originalName = Objects.requireNonNull(originalName); | ||
this.newName = Objects.requireNonNull(newName); | ||
} | ||
|
||
public String getOriginalName() { | ||
return originalName; | ||
} | ||
|
||
public String getNewName() { | ||
return newName; | ||
} | ||
|
||
@Override | ||
public Document getSource() { | ||
return (Document) super.getSource(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.