All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.rexsheng.springboot.faster.system.post.domain.PostStateChangedEvent Maven / Gradle / Ivy

The newest version!
package com.github.rexsheng.springboot.faster.system.post.domain;

import org.springframework.context.ApplicationEvent;
import org.springframework.util.Assert;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class PostStateChangedEvent extends ApplicationEvent {

    private PostState state;

    public PostStateChangedEvent(Integer deptId, PostState state) {
        super(Arrays.asList(deptId));
        Assert.notNull(state, "state must not be null");
        this.state = state;
    }

    public PostStateChangedEvent(PostState state) {
        super(Collections.emptyList());
        Assert.notNull(state, "state must not be null");
        this.state = state;
    }

    public PostStateChangedEvent(List deptIds, PostState state) {
        super(deptIds);
        Assert.notNull(state, "state must not be null");
        this.state = state;
    }

    public PostState getState() {
        return state;
    }

    public static enum PostState{
        DELETE,ADD,STATUS_CHANGED
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy