-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opmtimize: console subject and attachment operate (#499)
* build: upgrade version to 0.11.4 * feat: add some subject collect and unCollect and episode collection mark finish events, in order to support publish this events to plugin. * optimize: console attachment and subject operate. * docs: update CHANGELOG.MD
- Loading branch information
Showing
13 changed files
with
304 additions
and
32 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
37 changes: 37 additions & 0 deletions
37
...rc/main/java/run/ikaros/api/core/collection/event/EpisodeCollectionFinishChangeEvent.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,37 @@ | ||
package run.ikaros.api.core.collection.event; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import run.ikaros.api.plugin.event.PluginAwareEvent; | ||
|
||
@Getter | ||
public class EpisodeCollectionFinishChangeEvent extends PluginAwareEvent { | ||
private final long userId; | ||
private final long episodeId; | ||
private final boolean finish; | ||
@Setter | ||
private long subjectId; | ||
|
||
/** | ||
* Construct. | ||
*/ | ||
public EpisodeCollectionFinishChangeEvent(Object source, long userId, long episodeId, | ||
boolean finish) { | ||
super(source); | ||
this.userId = userId; | ||
this.episodeId = episodeId; | ||
this.finish = finish; | ||
} | ||
|
||
/** | ||
* Construct. | ||
*/ | ||
public EpisodeCollectionFinishChangeEvent(Object source, String pluginId, long userId, | ||
long episodeId, | ||
boolean finish) { | ||
super(source, pluginId); | ||
this.userId = userId; | ||
this.episodeId = episodeId; | ||
this.finish = finish; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
api/src/main/java/run/ikaros/api/core/collection/event/SubjectCollectEvent.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,23 @@ | ||
package run.ikaros.api.core.collection.event; | ||
|
||
import lombok.Getter; | ||
import run.ikaros.api.core.collection.SubjectCollection; | ||
|
||
@Getter | ||
public class SubjectCollectEvent extends SubjectCollectionUpdateEvent { | ||
/** | ||
* Construct. | ||
*/ | ||
public SubjectCollectEvent(Object source, | ||
SubjectCollection subjectCollection) { | ||
super(source, subjectCollection, true); | ||
} | ||
|
||
/** | ||
* Construct. | ||
*/ | ||
public SubjectCollectEvent(Object source, String pluginId, | ||
SubjectCollection subjectCollection, boolean collect) { | ||
super(source, pluginId, subjectCollection, collect); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
api/src/main/java/run/ikaros/api/core/collection/event/SubjectCollectionUpdateEvent.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,38 @@ | ||
package run.ikaros.api.core.collection.event; | ||
|
||
import lombok.Getter; | ||
import run.ikaros.api.core.collection.SubjectCollection; | ||
import run.ikaros.api.plugin.event.PluginAwareEvent; | ||
|
||
@Getter | ||
public class SubjectCollectionUpdateEvent extends PluginAwareEvent { | ||
private final SubjectCollection subjectCollection; | ||
/** | ||
* <ul> | ||
* <li>true - collect action</li> | ||
* <li>false - uncollect action</li> | ||
* </ul> | ||
* . | ||
*/ | ||
private final boolean collect; | ||
|
||
/** | ||
* Construct. | ||
*/ | ||
public SubjectCollectionUpdateEvent(Object source, SubjectCollection subjectCollection, | ||
boolean collect) { | ||
super(source); | ||
this.subjectCollection = subjectCollection; | ||
this.collect = collect; | ||
} | ||
|
||
/** | ||
* Construct. | ||
*/ | ||
public SubjectCollectionUpdateEvent(Object source, String pluginId, | ||
SubjectCollection subjectCollection, boolean collect) { | ||
super(source, pluginId); | ||
this.subjectCollection = subjectCollection; | ||
this.collect = collect; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
api/src/main/java/run/ikaros/api/core/collection/event/SubjectUnCollectEvent.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,24 @@ | ||
package run.ikaros.api.core.collection.event; | ||
|
||
import lombok.Getter; | ||
import run.ikaros.api.core.collection.SubjectCollection; | ||
|
||
@Getter | ||
public class SubjectUnCollectEvent extends SubjectCollectionUpdateEvent { | ||
/** | ||
* Construct. | ||
*/ | ||
public SubjectUnCollectEvent(Object source, | ||
SubjectCollection subjectCollection) { | ||
super(source, subjectCollection, false); | ||
} | ||
|
||
/** | ||
* Construct. | ||
*/ | ||
public SubjectUnCollectEvent(Object source, String pluginId, | ||
SubjectCollection subjectCollection, | ||
boolean collect) { | ||
super(source, pluginId, subjectCollection, collect); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version=0.11.3 | ||
version=0.11.4 |
Oops, something went wrong.