/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@Override
public Boolean isEmailAddressRegistered (final String emailAddress) {
+ // Validate parameter
+ if (null == emailAddress) {
+ // Throw NPE
+ throw new NullPointerException("emailAddress is null"); //NOI18N
+ } else if (emailAddress.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
+ }
+
// Default is not found
boolean isFound = false;
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import java.util.List;
import java.util.Objects;
import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
import javax.inject.Inject;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("adminBranchOfficeController")
-@SessionScoped
+@RequestScoped
public class JobsAdminBranchOfficeWebRequestBean extends BaseJobsBean implements JobsAdminBranchOfficeWebRequestController {
/**
*/
private Short branchHouseNumber;
+ /**
+ * House number's extension (a,b,c,...)
+ */
+ private String branchHouseNumberExtension;
+
+ /**
+ * Last house number
+ */
+ private Short branchLastHouseNumber;
+
/**
* Number of branch office
*/
@Inject
private JobsBranchOfficeWebRequestController branchOfficeController;
+ /**
+ * Owner/leader of branch office
+ */
+ private Employable branchOwner;
+
/**
* Store
*/
this.branchHouseNumber = branchHouseNumber;
}
+ /**
+ * Getter for house number's extension
+ * <p>
+ * @return House number's extension
+ */
+ public String getBranchHouseNumberExtension () {
+ return this.branchHouseNumberExtension;
+ }
+
+ /**
+ * Setter for house number's extension
+ * <p>
+ * @param branchHouseNumberExtension House number's extension
+ */
+ public void setBranchHouseNumberExtension (final String branchHouseNumberExtension) {
+ this.branchHouseNumberExtension = branchHouseNumberExtension;
+ }
+
+ /**
+ * Getter for last house number
+ * <p>
+ * @return Last house number
+ */
+ public Short getBranchLastHouseNumber () {
+ return this.branchLastHouseNumber;
+ }
+
+ /**
+ * Setter for last house number
+ * <p>
+ * @param branchLastHouseNumber Last house number
+ */
+ public void setBranchLastHouseNumber (final Short branchLastHouseNumber) {
+ this.branchLastHouseNumber = branchLastHouseNumber;
+ }
+
/**
* Getter for branch office number
* <p>
JobsAdminBranchOfficeWebRequestBean.branchOpeningTimes = branchOpeningTimes;
}
+ /**
+ * Getter for branch office contact person
+ * <p>
+ * @return Branch office contact person
+ */
+ public Employable getBranchOwner () {
+ return this.branchOwner;
+ }
+
+ /**
+ * Setter for branch office contact person
+ * <p>
+ * @param branchOwner Branch office contact person
+ */
+ public void setBranchOwner (final Employable branchOwner) {
+ this.branchOwner = branchOwner;
+ }
+
/**
* Getter for store
* <p>
this.setBranchCountry(null);
this.setBranchEmailAddress(null);
this.setBranchHouseNumber(null);
+ this.setBranchHouseNumberExtension(null);
+ this.setBranchLastHouseNumber(null);
this.setBranchNumber(null);
+ this.setBranchOwner(null);
this.setBranchStore(null);
this.setBranchStreet(null);
this.setBranchSuiteNumber(null);
this.setBranchUserOwner(null);
this.setBranchZipCode(null);
- this.setBranchOpeningTimes(null);
+
+ // Opening times list
+ this.setBranchOpeningTimes(new ArrayList<OpeningTime>(1));
+
+ // Fax and land-line number
+ this.setFaxAreaCode(null);
+ this.setFaxCountry(null);
+ this.setFaxNumber(null);
+ this.setLandLineAreaCode(null);
+ this.setLandLineCountry(null);
+ this.setLandLineNumber(null);
// Extra-clear opening time
this.clearOpeningTime();
// Add all other fields, too
branchOffice.setBranchContactEmployee(this.getBranchContactEmployee());
branchOffice.setBranchEmailAddress(this.getBranchEmailAddress());
+ branchOffice.setBranchHouseNumberExtension(this.getBranchHouseNumberExtension());
+ branchOffice.setBranchLastHouseNumber(this.getBranchLastHouseNumber());
branchOffice.setBranchNumber(this.getBranchNumber());
+ branchOffice.setBranchOwnerEmployee(this.getBranchOwner());
branchOffice.setBranchStore(this.getBranchStore());
branchOffice.setBranchSuiteNumber(this.getBranchSuiteNumber());
branchOffice.setBranchUserOwner(this.getBranchUserOwner());
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@Override
public Boolean isEmailAddressRegistered (final String emailAddress) {
+ // Validate parameter
+ if (null == emailAddress) {
+ // Throw NPE
+ throw new NullPointerException("emailAddress is null"); //NOI18N
+ } else if (emailAddress.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
+ }
+
// Default is not found
boolean isFound = false;
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
// Is the department not created yet?
if (this.isDepartmentCreatedByRequiredData(department)) {
// Then show proper faces message
- this.showFacesMessage("form-admin-add-department:branchStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED"); //NOI18N
+ this.showFacesMessage("form-admin-add-department:branchStreet", "ADMIN_DEPARTMENT_ALREADY_CREATED"); //NOI18N
return ""; //NOI18N
}
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 RRoland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/**
* Assigned personal data of the employee
*/
- private Contact employeePersonalContact;
+ private Contact employeePersonalData;
/**
* Employee's phone extension (on top of a "main number")
updatedOffice = this.adminEmployeeBean.addEmployee(employee);
} catch (final EmployeeAlreadyAddedException ex) {
// Output message
- this.showFacesMessage("form-admin-add-branch-office:branchStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED"); //NOI18N
+ this.showFacesMessage("form-admin-add-employee:employeeNumber", "ADMIN_EMPLOYEE_ALREADY_CREATED"); //NOI18N
return ""; //NOI18N
}
* <p>
* @return Employee's personal contact data
*/
- public Contact getEmployeePersonalContact () {
- return this.employeePersonalContact;
+ public Contact getEmployeePersonalData () {
+ return this.employeePersonalData;
}
/**
* Setter for employee's personal contact data
* <p>
- * @param employeePersonalContact Employee's personal contact data
+ * @param employeePersonalData Employee's personal contact data
*/
- public void setEmployeePersonalContact (final Contact employeePersonalContact) {
- this.employeePersonalContact = employeePersonalContact;
+ public void setEmployeePersonalData (final Contact employeePersonalData) {
+ this.employeePersonalData = employeePersonalData;
}
/**
this.setEmployeeDepartment(null);
this.setEmployeeEmailAddress(null);
this.setEmployeeHeadquarter(null);
- this.setEmployeePersonalContact(null);
+ this.setEmployeePersonalData(null);
this.setEmployeePhoneExtension(null);
this.setEmployeeNumber(null);
this.setEmployeeUserOwner(null);
*/
private Employable createEmployee () {
// Init instance
- final Employable employee = new BusinessEmployee(this.getEmployeeCompany(), this.getEmployeeNumber(), this.getEmployeePersonalContact());
+ final Employable employee = new BusinessEmployee(this.getEmployeeCompany(), this.getEmployeeNumber(), this.getEmployeePersonalData());
// Set all othewr data
employee.setEmployeeBranchOffice(this.getEmployeeBranchOffice());
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 RRoland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Objects;
import javax.annotation.PostConstruct;
import javax.cache.Cache;
import javax.ejb.EJB;
throw new NullPointerException("employeeId is null"); //NOI18N
} else if (employeeId < 1) {
// Throw IAE
- throw new IllegalArgumentException("employeeId=" + employeeId + " is invalid"); //NOI18N
+ throw new IllegalArgumentException(MessageFormat.format("employeeId={0} is invalid", employeeId)); //NOI18N
} else if (!this.employeeCache.containsKey(employeeId)) {
// Not found
throw new EmployeeNotFoundException(employeeId);
* @return Filtered list of employees
*/
@SuppressWarnings ("ReturnOfCollectionOrArrayField")
- public List<Employable> getFilteredEmployees () { //NOI18N
+ public List<Employable> getFilteredEmployees () {
return this.filteredEmployees;
}
* @param filteredEmployees Filtered list of employees
*/
@SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
- public void setFilteredEmployees (final List<Employable> filteredEmployees) { //NOI18N
+ public void setFilteredEmployees (final List<Employable> filteredEmployees) {
this.filteredEmployees = filteredEmployees;
}
}
}
+ @Override
+ public Boolean isEmailAddressRegistered (final String emailAddress) {
+ // Validate parameter
+ if (null == emailAddress) {
+ // Throw NPE
+ throw new NullPointerException("emailAddress is null"); //NOI18N
+ } else if (emailAddress.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
+ }
+
+ // Default is not found
+ boolean isFound = false;
+
+ // Check all entries
+ for (final Employable basicData : this.allEmployees()) {
+ // Is email address used?
+ if (Objects.equals(basicData.getEmployeeEmailAddress(), emailAddress)) {
+ // Found it
+ isFound = true;
+ break;
+ }
+ }
+
+ // Return flag
+ return isFound;
+ }
+
}
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
*/
public interface JobsEmployeeWebRequestController extends Serializable {
+ /**
+ * Validates if given email address is already in use by an employee
+ * <p>
+ * @param emailAddress Email address to be validated
+ * <p>
+ * @return Whether the email address is already used
+ */
+ Boolean isEmailAddressRegistered (final String emailAddress);
+
/**
* Returns a list of all company employees
* <p>
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import java.util.List;
import java.util.Objects;
import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
import javax.inject.Inject;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("adminHeadquarterController")
-@SessionScoped
+@RequestScoped
public class JobsAdminHeadquarterWebRequestBean extends BaseJobsBean implements JobsAdminHeadquarterWebRequestController {
/**
*/
private String headquarterCity;
+ /**
+ * Headquarter's company name
+ */
+ private String headquarterCompanyName;
+
/**
* Contact person in headquarter
*/
*/
private Short headquarterHouseNumber;
+ /**
+ * House number's extension
+ */
+ private String headquarterHouseNumberExtension;
+
+ /**
+ * Last house number
+ */
+ private Short headquarterLastHouseNumber;
+
/**
* Store
*/
// Is the headquarter not created yet?
if (this.isHeadquarterCreatedByRequiredData(headquarter)) {
// Then show proper faces message
- this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED"); //NOI18N
+ this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_HEADQUARTER_ALREADY_CREATED"); //NOI18N
return ""; //NOI18N
}
updatedHeadquarter = this.adminHeadquarterBean.addHeadquarter(headquarter);
} catch (final HeadquarterAlreadyAddedException ex) {
// Output message
- this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_BRANCH_OFFICE_ALREADY_CREATED"); //NOI18N
+ this.showFacesMessage("form-admin-add-headquarter-office:headquarterStreet", "ADMIN_HEADQUARTER_ALREADY_CREATED"); //NOI18N
return ""; //NOI18N
}
this.clear();
// Redirect to list
- return "admin_list_headquarter_office"; //NOI18N
+ return "admin_list_headquarter"; //NOI18N
}
/**
this.headquarterCity = headquarterCity;
}
+ /**
+ * Getter for headquarter's company name
+ * <p>
+ * @return Headquarter's company name
+ */
+ public String getHeadquarterCompanyName () {
+ return this.headquarterCompanyName;
+ }
+
+ /**
+ * Setter for headquarter's company name
+ * <p>
+ * @param headquarterCompanyName Headquarter's company name
+ */
+ public void setHeadquarterCompanyName (final String headquarterCompanyName) {
+ this.headquarterCompanyName = headquarterCompanyName;
+ }
+
/**
* Getter for headquarter contact person
* <p>
this.headquarterHouseNumber = headquarterHouseNumber;
}
+ /**
+ * Getter for house number's extension
+ * <p>
+ * @return House number's extension
+ */
+ public String getHeadquarterHouseNumberExtension () {
+ return this.headquarterHouseNumberExtension;
+ }
+
+ /**
+ * Setter for house number's extension
+ * <p>
+ * @param headquarterHouseNumberExtension House number's extension
+ */
+ public void setHeadquarterHouseNumberExtension (final String headquarterHouseNumberExtension) {
+ this.headquarterHouseNumberExtension = headquarterHouseNumberExtension;
+ }
+
+ /**
+ * Getter for last house number
+ * <p>
+ * @return Last house number
+ */
+ public Short getHeadquarterLastHouseNumber () {
+ return this.headquarterLastHouseNumber;
+ }
+
+ /**
+ * Setter for last house number
+ * <p>
+ * @param headquarterLastHouseNumber Last house number
+ */
+ public void setHeadquarterLastHouseNumber (final Short headquarterLastHouseNumber) {
+ this.headquarterLastHouseNumber = headquarterLastHouseNumber;
+ }
+
/**
* Getter for opening times of this headquarter
* <p>
private void clear () {
// Clear all headquarter data
this.setHeadquarterCity(null);
+ this.setHeadquarterCompanyName(null);
this.setHeadquarterContactEmployee(null);
this.setHeadquarterCountry(null);
this.setHeadquarterEmailAddress(null);
this.setHeadquarterHouseNumber(null);
+ this.setHeadquarterHouseNumberExtension(null);
+ this.setHeadquarterLastHouseNumber(null);
this.setHeadquarterStore(null);
this.setHeadquarterStreet(null);
this.setHeadquarterSuiteNumber(null);
*/
private Headquarter createHeadquarter () {
// Create new headquarter instance
- final Headquarter headquarter = new BusinessHeadquarter(this.getHeadquarterCity(), this.getHeadquarterCountry(), this.getHeadquarterStreet(), this.getHeadquarterZipCode(), this.getHeadquarterHouseNumber());
+ final Headquarter headquarter = new BusinessHeadquarter(this.getHeadquarterCompanyName(), this.getHeadquarterCity(), this.getHeadquarterCountry(), this.getHeadquarterStreet(), this.getHeadquarterZipCode(), this.getHeadquarterHouseNumber());
// Add all other fields, too
headquarter.setHeadquarterContactEmployee(this.getHeadquarterContactEmployee());
headquarter.setHeadquarterEmailAddress(this.getHeadquarterEmailAddress());
+ headquarter.setHeadquarterHouseNumberExtension(this.getHeadquarterHouseNumberExtension());
+ headquarter.setHeadquarterLastHouseNumber(this.getHeadquarterLastHouseNumber());
headquarter.setHeadquarterStore(this.getHeadquarterStore());
headquarter.setHeadquarterSuiteNumber(this.getHeadquarterSuiteNumber());
headquarter.setHeadquarterUserOwner(this.getHeadquarterUserOwner());
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
}
}
+ @Override
+ public Boolean isCompanyNameUsed (final String companyName) {
+ // Validate parameter
+ if (null == companyName) {
+ // Throw NPE
+ throw new NullPointerException("companyName is null"); //NOI18N
+ } else if (companyName.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("companyName is empty"); //NOI18N
+ }
+
+ // Default is not found
+ boolean isFound = false;
+
+ // Check all entries
+ for (final Headquarter headquarter : this.allHeadquarter()) {
+ // Is same company name?
+ if (Objects.equals(headquarter.getHeadquarterCompanyName(), companyName)) {
+ // Found it
+ isFound = true;
+ break;
+ }
+ }
+
+ // Return flag
+ return isFound;
+ }
+
@Override
public Boolean isEmailAddressRegistered (final String emailAddress) {
+ // Validate parameter
+ if (null == emailAddress) {
+ // Throw NPE
+ throw new NullPointerException("emailAddress is null"); //NOI18N
+ } else if (emailAddress.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
+ }
+
// Default is not found
boolean isFound = false;
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
*/
public interface JobsHeadquarterWebRequestController extends Serializable {
+ /**
+ * Checks whether given company name already exists
+ * <p>
+ * @param companyName Company name to check
+ * <p>
+ * @return Whether the company name exists
+ */
+ Boolean isCompanyNameUsed (final String companyName);
+
/**
* Checks if given email address is already registered by an other
* headquarter
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017, 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote;
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote;
-import org.mxchange.jcontacts.model.contact.ContactUtils;
+import org.mxchange.jcontacts.model.contact.Contacts;
import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
import org.mxchange.jcountry.model.data.Country;
final Contact next = iterator.next();
// Is the same?
- if (ContactUtils.isSameContact(contact, next)) {
+ if (Contacts.isSameContact(contact, next)) {
// Yes, then abort loop
IsFound = false;
break;
contact.setContactCountry(this.getContactCountry());
// Update contact's cmobile number
- this.isMobileNumberUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileProvider(), this.getMobileNumber());
+ this.isMobileNumberUnlinked = Contacts.updateMobileNumber(contact, this.getMobileProvider(), this.getMobileNumber());
// Update contact's land-line number
- this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+ this.isLandLineUnlinked = Contacts.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
// Update contact's fax number
- this.isFaxUnlinked = ContactUtils.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+ this.isFaxUnlinked = Contacts.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
}
}
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote;
-import org.mxchange.jcontacts.model.contact.ContactUtils;
+import org.mxchange.jcontacts.model.contact.Contacts;
import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
import org.mxchange.jcountry.model.data.Country;
contact.setContactCountry(this.getCountry());
// Update contact's mobile number
- this.isMobileUnlinked = ContactUtils.updateMobileNumber(contact, this.getMobileProvider(), this.getMobileNumber());
+ this.isMobileUnlinked = Contacts.updateMobileNumber(contact, this.getMobileProvider(), this.getMobileNumber());
// Update contact's land-line number
- this.isLandLineUnlinked = ContactUtils.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
+ this.isLandLineUnlinked = Contacts.updateLandLineNumber(contact, this.getLandLineCountry(), this.getLandLineAreaCode(), this.getLandLineNumber());
// Update contact's fax number
- this.isFaxUnlinked = ContactUtils.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
+ this.isFaxUnlinked = Contacts.updateFaxNumber(contact, this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Send it to the EJB
this.contactBean.updateContactData(contact, this.isMobileUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
for (final Contact contact : contacts) {
// Add it to cache
this.contactCache.put(contact.getContactId(), contact);
- this.emailAddressCache.put(contact.getContactId(), contact.getContactEmailAddress());
+
+ // Is email address given?
+ if (contact.getContactEmailAddress() != null) {
+ // Set it, too
+ this.emailAddressCache.put(contact.getContactId(), contact.getContactEmailAddress());
+ }
}
} else if (this.selectableContactsCache.iterator().hasNext()) {
// Has already entries, avoid executing below code
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
}
/**
- * Returns a list of all days of the week
+ * Returns an array of all days of the week
* <p>
- * @return A list of all days of the week
+ * @return An array of all days of the week
*/
public DayOfTheWeek[] getDayOfTheWeek () {
return DayOfTheWeek.values();
}
/**
- * Returns a list of all payment types
+ * Returns an array of all payment types
* <p>
- * @return A list of all payment types
+ * @return An array of all payment types
*/
public PaymentType[] getPaymentTypes () {
return PaymentType.values();
}
/**
- * Returns a list of all personal titles
+ * Returns an array of all personal titles
* <p>
- * @return A list of all personal titles
+ * @return An array of all personal titles
*/
public PersonalTitle[] getPersonalTitles () {
return PersonalTitle.values();
}
/**
- * Returns a list of all profile modes <p
+ * Returns an array of all profile modes <p
* <p>
- * @return A list of all profile modes
+ * @return An array of all profile modes
*/
public ProfileMode[] getProfileModes () {
return ProfileMode.values();
}
/**
- * Returns a list of all user account statuses
+ * Returns an array of all user account statuses
* <p>
- * @return A list of all user account statuses
+ * @return An array of all user account statuses
*/
public UserAccountStatus[] getUserAccountStatuses () {
return UserAccountStatus.values();
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import org.mxchange.jcontacts.events.contact.created.CreatedContactEvent;
import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEvent;
import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
import org.mxchange.jcontactsbusiness.model.department.Department;
import org.mxchange.jcontactsbusiness.model.employee.Employable;
this.userCreatedEvent.fire(new CreatedUserEvent(this.getUser()));
}
+ /**
+ * Renders data of basic company data
+ * <p>
+ * @param basicData Basic company data instance
+ * <p>
+ * @return Basic company data as string
+ */
+ public String renderBasicData (final BasicData basicData) {
+ // Default is empty string, so let's get started
+ final StringBuilder sb = new StringBuilder(30);
+
+ // Is basic company data set?
+ if (basicData instanceof BasicData) {
+ // Add company name
+ sb.append(basicData.getCompanyName()); //NOI18N
+
+ // Is email address set?
+ if (basicData.getCompanyEmailAddress() != null) {
+ // Add it
+ sb.append(", ").append(basicData.getCompanyEmailAddress()); //NOI18N
+ }
+
+ // Is tax number set?
+ if (basicData.getCompanyTaxNumber() != null) {
+ // Add it
+ sb.append(", ").append(basicData.getCompanyTaxNumber()); //NOI18N
+ }
+ }
+
+ // Return it
+ return sb.toString();
+ }
+
/**
* Returns the branch office's full address. If null is provided, an empty
* string is returned.
// Is a branch office instance given?
if (branchOffice instanceof BranchOffice) {
+ // This should not happen:
+ assert (branchOffice.getBranchCompany() instanceof BasicData) : "branchOffice.branchCompany is null"; //NOI18N
+
// Yes, then append all data
sb.append(branchOffice.getBranchCompany().getCompanyName());
sb.append(", "); //NOI18N
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
import org.mxchange.jjobs.beans.BaseJobsBean;
import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
import org.mxchange.jjobs.beans.contact.JobsContactWebRequestController;
+import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
import org.mxchange.jusercore.events.user.created.ObservableCreatedUserEvent;
private Event<ObservableAdminDeletedUserEvent> deleteUserEvent;
/**
- * Localization controller
+ * Features controller
*/
@Inject
- private JobsLocalizationSessionController localizationController;
+ private JobsFeaturesWebApplicationController featureController;
/**
* An event fired when the administrator has updated a new user
*/
private String userPasswordRepeat;
+ /**
+ * Whether the user wants a public profile
+ */
+ private ProfileMode userProfileMode;
+
/**
* Event being fired when administrator unlocks an account
*/
}
// Create new user instance
- final User newUser = new LoginUser();
-
- // Set user name, CONFIRMED and INVISIBLE
- newUser.setUserName(this.getUserName());
- newUser.setUserMustChangePassword(this.getUserMustChangePassword());
- newUser.setUserAccountStatus(UserAccountStatus.CONFIRMED);
- newUser.setUserProfileMode(ProfileMode.INVISIBLE);
-
- // Get locale from view-root
- final Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
-
- // Copy user locale
- newUser.setUserLocale(locale);
-
- // Init instance
- Contact userContact;
-
- // Is a contact instance in helper set?
- if (this.getContact() instanceof Contact) {
- // Then use it for contact linking
- userContact = this.getContact();
- } else {
- // Create contact instance
- userContact = this.contactController.createContactInstance();
- }
-
- // Set contact in user
- newUser.setUserContact(userContact);
-
- // Init variable for password
- String password = null;
+ final User newUser = this.createUserInstance();
// Is the user name or email address used already?
// @TODO Add password length check
- if (this.userController.isUserNameRegistered(newUser)) {
+ if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userController.isUserNameRegistered(newUser))) {
// User name is already used
throw new FaceletException(new UserNameAlreadyRegisteredException(newUser));
} else if ((this.getContact() == null) && (this.contactController.isEmailAddressRegistered(newUser.getUserContact()))) {
// Skip it
return ""; //NOI18N
- } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
- // Empty password entered, then generate one
- password = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
- } else if (!this.isSamePasswordEntered()) {
- // Both passwords don't match
- throw new FaceletException(new UserPasswordRepeatMismatchException(newUser));
- } else {
- // Both match, so get it from this bean
- password = this.getUserPassword();
}
- // The password should not be null and at least 5 characters long
- assert (password != null) : "password is null"; //NOI18N
- assert (password.length() >= JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough."; //NOI18N
-
- // Encrypt password and set it
- newUser.setUserEncryptedPassword(UserLoginUtils.encryptPassword(password));
-
try {
// Now, that all is set, call EJB
if (this.getContact() instanceof Contact) {
// Fire event
this.userLinkedEvent.fire(new AdminLinkedUserEvent(updatedUser));
} else {
- // Add new contact
+ // Add new user
final User updatedUser = this.adminUserBean.addUser(newUser);
// Fire event
this.userPasswordRepeat = userPasswordRepeat;
}
+ /**
+ * Getter for user profile mode
+ * <p>
+ * @return User profile mode
+ */
+ public ProfileMode getUserProfileMode () {
+ return this.userProfileMode;
+ }
+
+ /**
+ * Setter for user profile mode
+ * <p>
+ * @param userProfileMode User profile mode
+ */
+ public void setUserProfileMode (final ProfileMode userProfileMode) {
+ this.userProfileMode = userProfileMode;
+ }
+
/**
* Locks selected user's account. This method makes sure that a lock reason
* is provided that th user later can read on login attempts.
private void clear () {
// Clear all data
this.setContact(null);
+ this.setUserDeleteReason(null);
+ this.setUser(null);
this.setUserLockReason(null);
this.setUserMustChangePassword(null);
this.setUserName(null);
+ this.setUserPassword(null);
+ this.setUserPasswordRepeat(null);
+ this.setUserProfileMode(null);
+
+ }
+
+ /**
+ * Creates a new user instance from all currently saved data from this bean
+ * <p>
+ * @return New user instance
+ */
+ private User createUserInstance () {
+ // Init variable for password
+ String password = null;
+
+ // Init instance
+ final Contact userContact;
+
+ // Is a contact instance in helper set?
+ if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
+ // Empty password entered, then generate one
+ password = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
+ } else if (!this.isSamePasswordEntered()) {
+ // Both passwords don't match
+ throw new FaceletException(new UserPasswordRepeatMismatchException());
+ } else {
+ // Both match, so get it from this bean
+ password = this.getUserPassword();
+ }
+
+ // The password should not be null and at least 5 characters long
+ assert (password != null) : "password is null"; //NOI18N
+ assert (password.length() >= JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough."; //NOI18N
+
+ // Is contact instance given? Else create one
+ if (this.getContact() instanceof Contact) {
+ // Then use it for contact linking
+ userContact = this.getContact();
+ } else {
+ // Create contact instance
+ userContact = this.contactController.createContactInstance();
+ }
+
+ // Create new instance
+ final User newUser = new LoginUser(this.getUserName(), this.getUserProfileMode(), this.getUserMustChangePassword(), UserLoginUtils.encryptPassword(password), UserAccountStatus.CONFIRMED, userContact);
+
+ // Get locale from view-root
+ final Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
+
+ // Copy user locale
+ newUser.setUserLocale(locale);
+
+ // Return it
+ return newUser;
}
/**
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
// Is user name required?
if (!this.isUserNameRequired()) {
// Generate pseudo-random user name
- String randomName = this.userBean.generateRandomUserName();
+ // @TODO Refacture this to avoid EJB call
+ final String randomName = this.userBean.generateRandomUserName();
// Set it and inivisible profile
this.setUserName(randomName);
this.setUserProfileMode(ProfileMode.INVISIBLE);
// Generate random password
- String randomPassword = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
+ final String randomPassword = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
// Set random password
this.setUserPassword(randomPassword);
return isFound;
}
- @Override
- public boolean isPublicUserProfileEnabled () {
- // Get context parameter
- final String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_public_profile_enabled"); //NOI18N
-
- // Is it set?
- final boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
-
- // This requires user names being enabled, too.
- if ((isEnabled) && (!this.isUserNameRequired())) {
- // Not valid state, users must be able to modify their profile, especially when it is public
- throw new IllegalStateException("Public user profiles are enabled but user name requirement is disabled, this is not possible."); //NOI18N
- }
-
- // Return value
- return isEnabled;
- }
-
@Override
public boolean isRequiredChangePersonalDataSet () {
return ((this.getUserProfileMode() != null) &&
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
*/
boolean isUserNameRequired ();
- /**
- * Checks wether public user profiles are enabled. This requires that user
- * names are also enabled.
- * <p>
- * @return Whether public user profiles are enabled
- */
- boolean isPublicUserProfileEnabled ();
-
}
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
/*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2018 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as