${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
libs.CopyLibs.displayName=CopyLibs Task
libs.CopyLibs.prop-version=2.0
-libs.JCache_CDI.classpath=\
- ${base}/JCache_CDI/jcache-cdi-0.1-SNAPSHOT.jar
-libs.JCache_CDI.displayName=JCache CDI
-libs.JCache_CDI.src=\
- ${base}/JCache_CDI/jcache-cdi-0.1-SNAPSHOT-sources.jar!//
+libs.payara-api.classpath=\
+ ${base}/payara-api/payara-api.jar
+libs.payara-api.displayName=Payara API
libs.primefaces.classpath=\
${base}/primefaces/primefaces-5.3.jar
libs.primefaces.displayName=PrimeFaces 5.3
endorsed.classpath=
excludes=
file.reference.cdi-api.jar=lib/cdi-api.jar
-file.reference.gf-client.jar=lib/gf-client.jar
file.reference.jcontacts-business-core.jar=lib/jcontacts-business-core.jar
file.reference.jcontacts-business-lib.jar=lib/jcontacts-business-lib.jar
file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
${reference.pizzaservice-core.jar}:\
${reference.pizzaservice-lib.jar}:\
${file.reference.cdi-api.jar}:\
- ${file.reference.gf-client.jar}:\
${libs.apache_poi.classpath}:\
${libs.primefaces.classpath}:\
- ${libs.cache.classpath}
+ ${libs.cache.classpath}:\
+ ${libs.payara-api.classpath}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.debug=true
<library dirs="200">
<file>${file.reference.cdi-api.jar}</file>
</library>
- <library dirs="200">
- <file>${file.reference.gf-client.jar}</file>
- </library>
<library dirs="200">
<file>${libs.apache_poi.classpath}</file>
</library>
<library dirs="200">
<file>${libs.cache.classpath}</file>
</library>
+ <library dirs="200">
+ <file>${libs.payara-api.classpath}</file>
+ </library>
</web-module-libraries>
<web-module-additional-libraries/>
<source-roots>
*/
package org.mxchange.pizzaapplication.beans.business.basicdata;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
* A list of all registered companies (globally)
*/
@Inject
- @Cached (cacheName = "basicDataCache")
+ @NamedCache (cacheName = "basicDataCache", managementEnabled = true)
private transient Cache<Long, BusinessBasicData> basicDataCache;
/**
*/
package org.mxchange.pizzaapplication.beans.business.employee;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
* List of all company employees
*/
@Inject
- @Cached(cacheName = "companyEmployeeCache")
+ @NamedCache (cacheName = "companyEmployeeCache", managementEnabled = true)
private transient Cache<Long, Employee> companyEmployeeCache;
/**
import org.mxchange.jshopcore.wrapper.WrapableCheckout;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
import org.mxchange.pizzaapplication.beans.basket.PizzaBasketWebSessionController;
+import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
import org.mxchange.pizzaapplication.beans.customer.PizzaCustomerWebSessionController;
import org.mxchange.pizzaapplication.beans.helper.PizzaWebRequestHelperController;
-import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
import org.mxchange.pizzaapplication.beans.receipt.PizzaReceiptWebRequestController;
/**
*/
package org.mxchange.pizzaapplication.beans.contact;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
import org.mxchange.jcountry.model.data.Country;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.juserlogincore.events.registration.ObservableUserRegisteredEvent;
import org.mxchange.juserlogincore.exceptions.UserPasswordMismatchException;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
import org.mxchange.pizzaapplication.beans.user.login.PizzaUserLoginWebSessionController;
/**
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("contactController")
-@SessionScoped
+@RequestScoped
public class PizzaContactWebRequestBean extends BasePizzaController implements PizzaContactWebRequestController {
/**
* Contact list
*/
@Inject
- @Cached (cacheName = "contactsCache")
+ @NamedCache (cacheName = "contactsCache", managementEnabled = true)
private transient Cache<Long, Contact> contactsCache;
/**
* Email address list
*/
@Inject
- @Cached (cacheName = "emailAddressCache")
+ @NamedCache (cacheName = "emailAddressCache", managementEnabled = true)
private transient Cache<Long, String> emailAddressCache;
/**
import javax.enterprise.inject.Any;
import javax.inject.Inject;
import javax.inject.Named;
-import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEvent;
import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
import org.mxchange.jcontacts.events.mobile.linked.ObservableAdminLinkedMobileNumberEvent;
import org.mxchange.jcontacts.events.mobile.unlinked.AdminUnlinkedMobileNumberEvent;
import org.mxchange.jcontacts.events.mobile.unlinked.ObservableAdminUnlinkedMobileNumberEvent;
+import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.model.phone.AdminContactsPhoneSessionBeanRemote;
import org.mxchange.jcountry.model.data.Country;
import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent;
import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.model.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
-import org.mxchange.jphone.model.phonenumbers.model.mobileprovider.MobileProvider;
+import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
import org.mxchange.pizzaapplication.beans.phone.PizzaAdminPhoneWebRequestController;
*/
package org.mxchange.pizzaapplication.beans.contact.phone;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
-import javax.enterprise.context.SessionScoped;
+import javax.cache.Cache;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("contactPhoneController")
-@SessionScoped
+@RequestScoped
public class PizzaContactPhoneWebRequestBean extends BasePizzaController implements PizzaContactPhoneWebRequestController {
/**
* relationship (one contact, many numbers).
*/
@Inject
- @Cached(cacheName = "contactsPhoneCache")
+ @NamedCache (cacheName = "contactsPhoneCache", managementEnabled = true)
private transient Cache<DialableNumber, List<Contact>> contactsPhoneCache;
/**
*/
package org.mxchange.pizzaapplication.beans.country;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
* List of all countries
*/
@Inject
- @Cached (cacheName = "countryCache")
+ @NamedCache (cacheName = "countryCache", managementEnabled = true)
private transient Cache<Long, Country> countryCache;
/**
*/
package org.mxchange.pizzaapplication.beans.mobileprovider;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.LinkedList;
* "Cached" list of mobile providers
*/
@Inject
- @Cached (cacheName = "mobileProviderCache")
+ @NamedCache (cacheName = "mobileProviderCache", managementEnabled = true)
private transient Cache<Long, MobileProvider> mobileProviderCache;
/**
*/
package org.mxchange.pizzaapplication.beans.phone;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
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;
-import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import javax.inject.Named;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("phoneController")
-@ApplicationScoped
+@RequestScoped
public class PizzaPhoneWebRequestBean extends BasePizzaController implements PizzaPhoneWebRequestController {
/**
* All fax numbers
*/
@Inject
- @Cached(cacheName = "faxNumberCache")
+ @NamedCache (cacheName = "faxNumberCache", managementEnabled = true)
private transient Cache<Long, DialableFaxNumber> faxNumberCache;
/**
* All land-line numbers
*/
@Inject
- @Cached(cacheName = "landLineNumberCache")
+ @NamedCache (cacheName = "landLineNumberCache", managementEnabled = true)
private transient Cache<Long, DialableLandLineNumber> landLineNumberCache;
/**
* All mobile numbers
*/
@Inject
- @Cached(cacheName = "mobileNumberCache")
+ @NamedCache (cacheName = "mobileNumberCache", managementEnabled = true)
private transient Cache<Long, DialableMobileNumber> mobileNumberCache;
/**
package org.mxchange.pizzaapplication.beans.receipt;
import javax.annotation.PostConstruct;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("receiptController")
-@SessionScoped
+@RequestScoped
public class PizzaReceiptWebRequestBean extends BasePizzaController implements PizzaReceiptWebRequestController {
/**
*/
package org.mxchange.pizzaapplication.beans.user;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Objects;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
import javax.inject.Named;
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent;
import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent;
import org.mxchange.jusercore.events.user.clear.username.ObservableClearUserNameEvent;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("userController")
-@SessionScoped
+@RequestScoped
public class PizzaUserWebRequestBean extends BasePizzaController implements PizzaUserWebRequestController {
/**
@EJB (lookup = "java:global/jfinancials-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote")
private UserSessionBeanRemote userBean;
- /**
- * User id
- */
- private Long userId;
-
/**
* A list of all user profiles
*/
@Inject
- @Cached (cacheName = "userCache")
+ @NamedCache (cacheName = "userCache", managementEnabled = true)
private transient Cache<Long, User> userCache;
+ /**
+ * User id
+ */
+ private Long userId;
+
/**
* Login controller (bean)
*/
* User name list
*/
@Inject
- @Cached (cacheName = "userNameCache")
+ @NamedCache (cacheName = "userNameCache", managementEnabled = true)
private transient Cache<Long, String> userNameCache;
/**
*/
String getUserPassword ();
- /**
- * Clears both user passwords
- */
- void clearUserPasswords ();
-
- /**
- * Clears user name
- */
- void clearUserName ();
-
/**
* Checks if both user passwords are left empty and if this is enabled
* (allowed) in context parameter. If true, the calling bean should create a
*/
List<User> allUsers ();
- /**
- * All public user profiles
- * <p>
- * @return A list of all public user profiles
- */
- List<User> allVisibleUsers ();
-
/**
* Checks whether the given contact is a user
* <p>
*/
boolean isContactFound (final Contact contact);
- /**
- * Checks whether a public user account is registered. This means that at
- * least one user profile has its flag "public user profile" enabled.
- * <p>
- * @return Whether at least one user has a public profile
- */
- boolean isVisibleUserFound ();
-
/**
* Checks whether given user instance's name is used
* <p>
*/
package org.mxchange.pizzaapplication.beans.user.activity;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
* "Cache" for activity log per user
*/
@Inject
- @Cached(cacheName = "usersActivityCache")
- private transient Cache<User, List<LogableUserActivity>> usersActivityCache;
+ @NamedCache (cacheName = "userActivityCache", managementEnabled = true)
+ private transient Cache<User, List<LogableUserActivity>> userActivityCache;
/**
* Default constructor
List<LogableUserActivity> list = new LinkedList<>();
// Is the user set?
- if (this.usersActivityCache.containsKey(this.getUser())) {
+ if (this.userActivityCache.containsKey(this.getUser())) {
// Return it
- list.addAll(this.usersActivityCache.get(this.getUser()));
+ list.addAll(this.userActivityCache.get(this.getUser()));
// Sort list and reverse it
Collections.sort(list, new UserActivityLogTimestampComparator());
// Put all in map, per-user
for (final LogableUserActivity userActivity : list) {
// Is the list there?
- if (!this.usersActivityCache.containsKey(userActivity.getActivityUser())) {
+ if (!this.userActivityCache.containsKey(userActivity.getActivityUser())) {
// Init list
- this.usersActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
+ this.userActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
}
// Add by user instance
- boolean added = this.usersActivityCache.get(userActivity.getActivityUser()).add(userActivity);
+ boolean added = this.userActivityCache.get(userActivity.getActivityUser()).add(userActivity);
// Should be added
assert (added) : "Activity log not added"; //NOI18N
}
// Is it there?
- if (!this.usersActivityCache.containsKey(userActivity.getActivityUser())) {
+ if (!this.userActivityCache.containsKey(userActivity.getActivityUser())) {
// Init it
- this.usersActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
+ this.userActivityCache.put(userActivity.getActivityUser(), new LinkedList<LogableUserActivity>());
}
// Add activity to log
- this.usersActivityCache.get(userActivity.getActivityUser()).add(userActivity);
+ this.userActivityCache.get(userActivity.getActivityUser()).add(userActivity);
}
}
*/
package org.mxchange.pizzaapplication.beans.user.email_address;
+import fish.payara.cdi.jsr107.impl.NamedCache;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import javax.annotation.PostConstruct;
+import javax.cache.Cache;
import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("userEmailChangeController")
-@SessionScoped
+@RequestScoped
public class PizzaEmailChangeWebRequestBean extends BasePizzaController implements PizzaEmailChangeWebRequestController {
/**
* Local list of already queued email addresses
*/
@Inject
- @Cached (cacheName = "queuedEmailCache")
+ @NamedCache (cacheName = "queuedEmailCache", managementEnabled = true)
private transient Cache<String, Boolean> queuedEmailCache;
/**
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcoreee.utils.FacesUtils;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
import org.mxchange.jusercore.events.user.clear.password.ClearUserPasswordEvent;
import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent;
import org.mxchange.jusercore.events.user.clear.username.ClearUserNameEvent;
import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebRequestController;
import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
import org.mxchange.pizzaapplication.beans.user.PizzaAdminUserWebRequestController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
/**
* A web bean for user registration
import java.util.Locale;
import javax.ejb.EJB;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
import javax.inject.Named;
import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent;
import org.mxchange.jcoreee.utils.FacesUtils;
-import org.mxchange.jfinancials.beans.user.PizzaUserWebRequestController;
import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException;
import org.mxchange.jusercore.exceptions.UserNotFoundException;
import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
import org.mxchange.juserlogincore.model.user.resendlink.ResendLinkSessionBeanRemote;
import org.mxchange.pizzaapplication.beans.BasePizzaController;
import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;
+import org.mxchange.pizzaapplication.beans.user.PizzaUserWebRequestController;
/**
* A web session-scoped bean for resending confirmation link
* @author Roland Häder<roland@mxchange.org>
*/
@Named ("userResendConfirmationController")
-@SessionScoped
+@RequestScoped
public class PizzaResendLinkWebRequestBean extends BasePizzaController implements PizzaResendLinkWebRequestController {
/**