added missing accountPU annotations
This commit is contained in:
@ -34,7 +34,7 @@ public class PersistenceContextFactory {
|
|||||||
return emf.createEntityManager(SynchronizationType.UNSYNCHRONIZED);
|
return emf.createEntityManager(SynchronizationType.UNSYNCHRONIZED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeEntityManager(@Disposes EntityManager em) {
|
public void closeEntityManager(@Disposes @AccountPU EntityManager em) {
|
||||||
if (LOGGER.isTraceEnabled()) {
|
if (LOGGER.isTraceEnabled()) {
|
||||||
LOGGER.trace("closing entityManager");
|
LOGGER.trace("closing entityManager");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package de.muehlencord.shared.account.web.presentation;
|
package de.muehlencord.shared.account.web.presentation;
|
||||||
|
|
||||||
|
|
||||||
import de.muehlencord.shared.account.business.account.entity.ApplicationRoleEntity;
|
import de.muehlencord.shared.account.business.account.entity.ApplicationRoleEntity;
|
||||||
import de.muehlencord.shared.account.business.application.control.ApplicationRoleControl;
|
import de.muehlencord.shared.account.business.application.control.ApplicationRoleControl;
|
||||||
import de.muehlencord.shared.account.business.application.entity.ApplicationEntity;
|
import de.muehlencord.shared.account.business.application.entity.ApplicationEntity;
|
||||||
|
import de.muehlencord.shared.account.util.AccountPU;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
import javax.faces.application.FacesMessage;
|
import javax.faces.application.FacesMessage;
|
||||||
@ -25,6 +25,7 @@ public class UniqueApplicationRoleNameValidator implements Validator, Serializab
|
|||||||
private static final long serialVersionUID = 8165013107453616719L;
|
private static final long serialVersionUID = 8165013107453616719L;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@AccountPU
|
||||||
EntityManager em;
|
EntityManager em;
|
||||||
|
|
||||||
@EJB
|
@EJB
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package de.muehlencord.shared.account.web.presentation;
|
package de.muehlencord.shared.account.web.presentation;
|
||||||
|
|
||||||
|
|
||||||
import de.muehlencord.shared.account.business.account.entity.ApplicationPermissionEntity;
|
import de.muehlencord.shared.account.business.account.entity.ApplicationPermissionEntity;
|
||||||
import de.muehlencord.shared.account.business.application.control.ApplicationPermissionControl;
|
import de.muehlencord.shared.account.business.application.control.ApplicationPermissionControl;
|
||||||
import de.muehlencord.shared.account.business.application.entity.ApplicationEntity;
|
import de.muehlencord.shared.account.business.application.entity.ApplicationEntity;
|
||||||
|
import de.muehlencord.shared.account.util.AccountPU;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
import javax.faces.application.FacesMessage;
|
import javax.faces.application.FacesMessage;
|
||||||
@ -28,6 +28,7 @@ public class UniquePermissionNameValidator implements Validator, Serializable {
|
|||||||
private static final Logger LOGGER = LoggerFactory.getLogger(UniquePermissionNameValidator.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(UniquePermissionNameValidator.class);
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@AccountPU
|
||||||
EntityManager em;
|
EntityManager em;
|
||||||
|
|
||||||
@EJB
|
@EJB
|
||||||
@ -36,7 +37,7 @@ public class UniquePermissionNameValidator implements Validator, Serializable {
|
|||||||
@Override
|
@Override
|
||||||
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
|
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
|
||||||
Object applicationObj = component.getAttributes().get("application");
|
Object applicationObj = component.getAttributes().get("application");
|
||||||
if ((applicationObj != null) && (applicationObj instanceof ApplicationEntity)) {
|
if ((applicationObj != null) && (applicationObj instanceof ApplicationEntity)) {
|
||||||
ApplicationEntity application = (ApplicationEntity) applicationObj;
|
ApplicationEntity application = (ApplicationEntity) applicationObj;
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Permission name invalid", "Permission name must not be empty"));
|
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Permission name invalid", "Permission name must not be empty"));
|
||||||
|
|||||||
Reference in New Issue
Block a user