organizenotifyevent.java

来自「基于java的组号查询模块」· Java 代码 · 共 102 行

JAVA
102
字号
/**
 * 
 */
package com.lily.dap.service.organize.impl;

import org.springframework.context.ApplicationEvent;

/**
 * 组织机构通知事件类,包含了在部门、岗位、人员的添、删、改以及关联关系改变时的信息
 * 
 * @author zouxuemo
 *
 */
public class OrganizeNotifyEvent extends ApplicationEvent {
    public static final String EVENT_CLASS_DEPARTMENT = "EVENT_CLASS_DEPARTMENT";
    public static final String EVENT_ADD_DEPARTMENT = "EVENT_ADD_DEPARTMENT";
    public static final String EVENT_REMOVE_DEPARTMENT = "EVENT_REMOVE_DEPARTMENT";
    public static final String EVENT_MODIFY_DEPARTMENT = "EVENT_MODIFY_DEPARTMENT";
    
    public static final String EVENT_CLASS_POST = "EVENT_CLASS_POST";
    public static final String EVENT_ADD_POST = "EVENT_ADD_POST";
    public static final String EVENT_REMOVE_POST = "EVENT_REMOVE_POST";
    public static final String EVENT_MODIFY_POST = "EVENT_MODIFY_POST";
    public static final String EVENT_ADD_POST_HAVE_PERSON = "EVENT_ADD_POST_HAVE_PERSON";
    public static final String EVENT_REMOVE_POST_HAVE_PERSON = "EVENT_REMOVE_POST_HAVE_PERSON";
    
    public static final String EVENT_CLASS_PERSON = "EVENT_CLASS_PERSON";
    public static final String EVENT_ADD_PERSON = "EVENT_ADD_PERSON";
    public static final String EVENT_REMOVE_PERSON = "EVENT_REMOVE_PERSON";
    public static final String EVENT_MODIFY_PERSON = "EVENT_MODIFY_PERSON";

    public static final String EVENT_CLASS_GROUP = "EVENT_CLASS_GROUP";
    public static final String EVENT_ADD_GROUP = "EVENT_ADD_GROUP";
    public static final String EVENT_REMOVE_GROUP = "EVENT_REMOVE_GROUP";
    public static final String EVENT_MODIFY_GROUP = "EVENT_MODIFY_GROUP";

	/**
	 * <code>serialVersionUID</code>
	 */
	private static final long serialVersionUID = 4482630595069627074L;

	private String eventClass = "";
	
	private String eventName = "";
	
	private Object context1 = null;
	
	private Object context2 = null;

	public OrganizeNotifyEvent(String eventClass, String eventName) {
		super(eventClass + " - " + eventName);
		
		this.eventClass = eventClass;
		this.eventName = eventName;
	}

	public OrganizeNotifyEvent(String eventClass, String eventName, Object context) {
		super(eventClass + " - " + eventName);
		
		this.eventClass = eventClass;
		this.eventName = eventName;
		this.context1 = context;
	}

	public OrganizeNotifyEvent(String eventClass, String eventName, Object context1, Object context2) {
		super(eventClass + " - " + eventName);
		
		this.eventClass = eventClass;
		this.eventName = eventName;
		this.context1 = context1;
		this.context2 = context2;
	}

	/**
	 * @return eventClass
	 */
	public String getEventClass() {
		return eventClass;
	}

	/**
	 * @return eventName
	 */
	public String getEventName() {
		return eventName;
	}

	/**
	 * @return context1
	 */
	public Object getContext1() {
		return context1;
	}

	/**
	 * @return context2
	 */
	public Object getContext2() {
		return context2;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?