--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.events.employee.added;
+
+import java.text.MessageFormat;
+import org.mxchange.jcontactsbusiness.model.employee.Employee;
+
+/**
+ * An event being fired when a employee has been added
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class EmployeeAddedEvent implements ObservableEmployeeAddedEvent {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 572_367_561_659_112L;
+
+ /**
+ * Branch office instance being added
+ */
+ private final Employee employee;
+
+ /**
+ * Constructor with employee instance
+ * <p>
+ * @param employee Branch office instance
+ * @throws NullPointerException If the parameter is null
+ */
+ public EmployeeAddedEvent (final Employee employee) {
+ // Check parameter
+ if (null == employee) {
+ // Throw NPE
+ throw new NullPointerException("employee is null"); //NOI18N
+ } else if (employee.getEmployeeId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("employee.employeeId is null"); //NOI18N
+ } else if (employee.getEmployeeId() < 1) {
+ // Throw NPE again
+ throw new NullPointerException(MessageFormat.format("employee.employeeId={0} is not valid", employee.getEmployeeId())); //NOI18N
+ }
+
+ // Set it
+ this.employee = employee;
+ }
+
+ @Override
+ public Employee getEmployee () {
+ return this.employee;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.events.employee.added;
+
+import java.io.Serializable;
+import org.mxchange.jcontactsbusiness.model.employee.Employee;
+
+/**
+ * An interface for events being triggered when a employee has been added.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableEmployeeAddedEvent extends Serializable {
+
+ /**
+ * Getter for employee instance
+ * <p>
+ * @return Employee instance
+ */
+ Employee getEmployee ();
+
+}