catch up with branch daily
Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/org.eclipse.osbp.authentication/i18n/I18N_de.properties b/org.eclipse.osbp.authentication/i18n/I18N_de.properties
index 1e9aa12..df110b1 100644
--- a/org.eclipse.osbp.authentication/i18n/I18N_de.properties
+++ b/org.eclipse.osbp.authentication/i18n/I18N_de.properties
@@ -1,158 +1,79 @@
-#Generated by Eclipse Messages Editor (Eclipse Babel)
#de
-
-activation_time = Activation time
-
-actual_owner = Actual owner
-
-administration = Administration
-
-all_accounts = All accounts
-
-answer_no_text = Answer no text
-
-answer_yes_text = Answer yes text
-
-cancel = Cancel
-
-cancel_item = Cancel item
-
-clear_filter = Clear filter
-
-cookie_hash_code = Hashcode
-
-created_by = Created by
-
-created_on = Created on
-
-default_perpective = Default perpective
-
-default_perspective = Standard Perspektive
-
-delete_item = Delete item
-
-description = Description
-
-edit_account = Edit account
-
-email = E-Mail
-
-enabled = Aktiviert
-
-end_date = End date
-
-equal_to = Equal to
-
-expiration_time = Expiration time
-
-extra_password = zus\u00E4tzliches Passwort
-
-failed_attempt = Anzahl fehlerhafter Anmeldungen
-
-filter = Filter
-
-focusing_strategy = Layout
-
-foo = Foo
-
-force_pwd_change = Passwort Wechsel erzwingen
-
-greater_than = Greater than
-
-groups = Groups
-
-id = ID
-
-invers = invers
-
-items_per_page = Items per page
-
-layouting_strategy = Standard Layout
-
-lesser_than = Lesser than
-
-locale_tag = L\u00E4ndereinstellung
-
-locked = gesperrt
-
-menu = Menu
-
-name = Name
-
-new_item = New item
-
-not_registered = nicht registriert
-
-ok = Ok
-
-page = Page
-
-password = Passwort
-
-password_reset = Password reset
-
-perspective_na = Perspective na
-
-position = Stelle
-
-print_service = Standard Drucker
-
-priority = Priority
-
-process_id = Process identifier
-
-process_instance_id = Process instance identifier
-
-process_session_id = Process session identifier
-
-profile = Profile
-
-profileimage = Profilbild
-
-registered = Registered
-
-reset = Reset
-
-save = Save
-
-save_item = Save item
-
-saved_properties = Saved properties
-
-security_message = Security message
-
-set_filter = Set filter
-
-show_all = Show all
-
-start_date = Start date
-
-start_process_text = Start process text
-
-status = Status
-
-subject = Subject
-
-successful_attempt = Anzahl erfolgreicher Anmeldungen
-
-superuser = Administrator
-
-supervisor = Supervisor
-
-task_id = Task identifier
-
-theme = Farb-Schema
-
-toolbar_for_dialogs = Toolbar for dialogs
-
-user_account = Benutzerkonto
-
-user_account_filter = Filter f\u00FCr Benutzerkonto
-
-user_administration = User administration
-
-user_name = Benutzername
-
-users = Users
-
-x = X
+activation_time=Activation time
+actual_owner=Actual owner
+administration=Administration
+all_accounts=All accounts
+answer_no_text=Answer no text
+answer_yes_text=Answer yes text
+cancel=Cancel
+cancel_item=Cancel item
+clear_filter=Clear filter
+cookie_hash_code=Hashcode
+created_by=Created by
+created_on=Created on
+default_perpective=Default perpective
+default_perspective=Standard Perspektive
+delete_item=Delete item
+description=Description
+edit_account=Edit account
+email=E-Mail
+enabled=Aktiviert
+end_date=End date
+equal_to=Equal to
+expiration_time=Expiration time
+extra_password=zus\u00E4tzliches Passwort
+failed_attempt=Anzahl fehlerhafter Anmeldungen
+filter=Filter
+focusing_strategy=Layout
+foo=Foo
+force_pwd_change=Passwort Wechsel erzwingen
+greater_than=Greater than
+groups=Groups
+id=ID
+invers=invers
+items_per_page=Items per page
+layouting_strategy=Standard Layout
+lesser_than=Lesser than
+locale_tag=L\u00E4ndereinstellung
+locked=gesperrt
+menu=Menu
+name=Name
+new_item=New item
+not_registered=nicht registriert
+ok=Ok
+page=Page
+password=Passwort
+password_reset=Password reset
+perspective_na=Perspective na
+position=Stelle
+print_service=Standard Drucker
+priority=Priority
+process_id=Process identifier
+process_instance_id=Process instance identifier
+process_session_id=Process session identifier
+profile=Profile
+profileimage=Profilbild
+registered=Registered
+reset=Reset
+save=Save
+save_item=Save item
+saved_properties=Saved properties
+security_message=Security message
+set_filter=Set filter
+show_all=Show all
+start_date=Start date
+start_process_text=Start process text
+status=Status
+subject=Subject
+successful_attempt=Anzahl erfolgreicher Anmeldungen
+superuser=Administrator
+supervisor=Supervisor
+task_id=Task identifier
+theme=Farb-Schema
+toolbar_for_dialogs=Toolbar for dialogs
+user_account=Benutzerkonto
+user_account_filter=Filter f\u00FCr Benutzerkonto
+user_administration=User administration
+user_name=Benutzername
+users=Users
+x=X
diff --git a/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/dtos/UserAccountDto.java b/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/dtos/UserAccountDto.java
index d6c3bce..09bb555 100644
--- a/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/dtos/UserAccountDto.java
+++ b/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/dtos/UserAccountDto.java
@@ -17,6 +17,7 @@
import org.eclipse.osbp.runtime.common.annotations.Id;
import org.eclipse.osbp.runtime.common.annotations.Properties;
import org.eclipse.osbp.runtime.common.annotations.Property;
+import org.eclipse.osbp.runtime.common.annotations.UniqueEntry;
import org.eclipse.osbp.runtime.common.validation.InfoSeverity;
@SuppressWarnings("all")
@@ -32,8 +33,10 @@
@Id
private String id = java.util.UUID.randomUUID().toString();
+ @UniqueEntry
private String email;
+ @UniqueEntry
private String userName;
@Hidden
@@ -212,7 +215,7 @@
}
/**
- * Returns the email property or <code>null</code> if not present.
+ * Returns the <em>required</em> email property.
*/
public String getEmail() {
return this.email;
diff --git a/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccount.java b/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccount.java
index 7f3914a..a8bf418 100644
--- a/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccount.java
+++ b/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccount.java
@@ -3,13 +3,15 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import javax.persistence.Cacheable;
+import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.PreRemove;
import javax.persistence.PreUpdate;
@@ -23,11 +25,11 @@
import org.eclipse.osbp.runtime.common.annotations.Hidden;
import org.eclipse.osbp.runtime.common.annotations.Properties;
import org.eclipse.osbp.runtime.common.annotations.Property;
+import org.eclipse.osbp.runtime.common.annotations.UniqueEntry;
import org.eclipse.osbp.runtime.common.validation.InfoSeverity;
-@Cacheable(false)
@Entity
-@Table(name = "USER_ACCOUNT", indexes = @Index(name = "INDEX_USER_NAME", unique = true, columnList = "USER_NAME"))
+@Table(name = "USER_ACCOUNT", indexes = @Index(name = "INDEX_USER_NAME", columnList = "USER_NAME"))
@DiscriminatorValue(value = "USER_ACCOUNT")
@SuppressWarnings("all")
public class UserAccount implements IEntity {
@@ -36,15 +38,19 @@
private boolean disposed;
@Id
+ @Column(name = "ID")
private String id = java.util.UUID.randomUUID().toString();
- @Column(name = "EMAIL")
+ @Column(name = "EMAIL", nullable = false)
+ @UniqueEntry
private String email;
@Column(name = "USER_NAME", nullable = false)
+ @UniqueEntry
private String userName;
@Hidden
+ @Column(name = "PASSWORD")
private String password;
@Column(name = "EXTRA_PASSWORD")
@@ -84,6 +90,7 @@
private int successfulAttempt;
@Hidden
+ @Column(name = "COOKIE_HASH_CODE")
private int cookieHashCode;
@Column(name = "LOCALE_TAG")
@@ -109,6 +116,9 @@
private String printService;
@Hidden
+ @Column(name = "SAVED_PROPERTIES")
+ @Lob
+ @Basic(fetch = FetchType.LAZY)
@Valid
private byte[] savedProperties;
@@ -169,7 +179,7 @@
}
/**
- * @return Returns the email property or <code>null</code> if not present.
+ * @return Returns the <em>required</em> email property.
*/
public String getEmail() {
checkDisposed();
diff --git a/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccountFilter.java b/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccountFilter.java
index 73bdaaa..0aceeda 100644
--- a/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccountFilter.java
+++ b/org.eclipse.osbp.authentication/src-gen/org/eclipse/osbp/authentication/account/entities/UserAccountFilter.java
@@ -1,6 +1,5 @@
package org.eclipse.osbp.authentication.account.entities;
-import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
@@ -15,7 +14,6 @@
import org.eclipse.osbp.dsl.common.datatypes.IEntity;
import org.eclipse.osbp.runtime.common.annotations.Dispose;
-@Cacheable(false)
@Entity
@Table(name = "USER_ACCOUNT_FILTER")
@DiscriminatorValue(value = "USER_ACCOUNT_FILTER")
@@ -26,6 +24,7 @@
private boolean disposed;
@Id
+ @Column(name = "ID")
private String id = java.util.UUID.randomUUID().toString();
@Column(name = "FILTER")
diff --git a/org.eclipse.osbp.authentication/src/account.entity b/org.eclipse.osbp.authentication/src/account.entity
index 7d70b6a..bd63e0a 100644
--- a/org.eclipse.osbp.authentication/src/account.entity
+++ b/org.eclipse.osbp.authentication/src/account.entity
@@ -23,12 +23,11 @@
package org.eclipse.osbp.authentication.account.entities {
- @Cacheable(false)
entity UserAccount {
persistenceUnit "authentication"
uuid String id
- var String email
- var String[1] userName
+ var unique String[1] email
+ var unique String[1] userName
var hidden String password
var String [ regex("[0-9]*") ] extraPassword
var boolean passwordReset
@@ -58,12 +57,11 @@
failedAttempt = 00
}
}
- unique index indexUserName {
+ index indexUserName {
userName
}
}
- @Cacheable(false)
entity UserAccountFilter {
persistenceUnit "authentication"
uuid String id
diff --git a/org.eclipse.osbp.authentication/src/org/eclipse/osbp/authentication/providerimpl/UserAccessService.java b/org.eclipse.osbp.authentication/src/org/eclipse/osbp/authentication/providerimpl/UserAccessService.java
index d2a2815..777f355 100644
--- a/org.eclipse.osbp.authentication/src/org/eclipse/osbp/authentication/providerimpl/UserAccessService.java
+++ b/org.eclipse.osbp.authentication/src/org/eclipse/osbp/authentication/providerimpl/UserAccessService.java
@@ -51,7 +51,6 @@
import org.eclipse.osbp.core.api.persistence.IPersistenceService;
import org.eclipse.osbp.dsl.dto.lib.impl.DtoServiceAccess;
import org.eclipse.osbp.jpa.services.Query;
-import org.eclipse.osbp.jpa.services.filters.LCompare;
import org.eclipse.osbp.preferences.ProductConfiguration;
import org.eclipse.osbp.runtime.common.filter.IDTOServiceWithMutablePersistence;
import org.eclipse.osbp.ui.api.complexdatacontainer.IComplexDataContainerChangedListener;
@@ -145,8 +144,7 @@
((DefaultWebSecurityManager) sSecurityManager).setSessionManager(vaadinSessionManager);
subjectProvider = new SubjectProvider(vaadinSessionProvider);
SecurityUtils.setSecurityManager(sSecurityManager);
- LOGGER.debug("security manager is set");
- UserProtocol.persistenceService.registerPersistenceUnit(persistenceId, UserProtocol.class);
+ LOGGER.debug("{}", "security manager is set");
if (UserProtocol.dtoUserAccountDtoService == null) {
UserProtocol.dtoUserAccountDtoService = (IDTOServiceWithMutablePersistence<UserAccountDto>) DtoServiceAccess
.getService(UserAccountDto.class);
@@ -159,7 +157,7 @@
}
protected void deactivate() {
- LOGGER.debug("useraccessservice deactivated");
+ LOGGER.debug("{}", "useraccessservice deactivated");
}
/*
@@ -176,12 +174,12 @@
try {
info = (AuthorizationInfo) ThreadContext.get(AUTHORIZATION_KEY);
} catch (Exception e) {
- LOGGER.info("");
+ LOGGER.info("{}", "");
}
try {
realm = (AuthenticatingRealm) ThreadContext.get(AUTHENTICATED_BY_REALM);
} catch (Exception e) {
- LOGGER.info("");
+ LOGGER.info("{}", "");
}
if (info == null) {
info = new AuthorizationInformation(
@@ -254,15 +252,15 @@
if (LOGGER.isDebugEnabled()) {
if (isGranted(Group.ENTITY, Action.CREATABLE,
"org.eclipse.osbp.authentication.account.entities.UserAccount")) {
- LOGGER.debug("UserAccount is creatable");
+ LOGGER.debug("{}", "UserAccount is creatable");
} else {
- LOGGER.debug("UserAccount is not creatable");
+ LOGGER.debug("{}", "UserAccount is not creatable");
}
if (isVetoed(Group.ENTITY, Action.DISABLED,
"org.eclipse.osbp.authentication.account.entities.UserAccount", "superuser")) {
- LOGGER.debug("superuser from UserAccount is disabled");
+ LOGGER.debug("{}", "superuser from UserAccount is disabled");
} else {
- LOGGER.debug("superuser from UserAccount is not disabled");
+ LOGGER.debug("{}", "superuser from UserAccount is not disabled");
}
}
return true;
@@ -285,7 +283,7 @@
} catch (InterruptedException e) { // NOSONAR
// Empty by design
}
- LOGGER.error("Authentication: " + ae.getLocalizedMessage());
+ LOGGER.error("{}", "Authentication: " + ae.getLocalizedMessage());
}
return false;
}
@@ -353,12 +351,12 @@
setSessionAttribute(ROLES_KEY, null);
setSessionAttribute(AUTHORIZATION_KEY, null);
} catch (Exception e) {
- LOGGER.info("");
+ LOGGER.info("{}", "");
}
try {
subject.logout();
} catch (Exception e) {
- LOGGER.info("");
+ LOGGER.info("{}", "");
}
}
@@ -371,7 +369,7 @@
public UserAccountDto getUser() {
UserAccountDto user = (UserAccountDto) getSessionAttribute(USER_KEY);
if (user == null) {
- LOGGER.error("Authentication getUser returned null");
+ LOGGER.error("{}", "Authentication getUser returned null");
}
return user;
}
@@ -796,7 +794,7 @@
public UserFilterMap getUserFilterMap() {
UserFilterMap userFilterMap = (UserFilterMap) getSessionAttribute(USER_FILTER_MAP_KEY);
if (userFilterMap == null) {
- LOGGER.error("Authentication getUserFilterMap returned null");
+ LOGGER.error("{}", "Authentication getUserFilterMap returned null");
}
return userFilterMap;
}
@@ -927,7 +925,7 @@
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.STATIC)
public synchronized void bindPersistenceService(final IPersistenceService persistenceService) {
UserProtocol.persistenceService = persistenceService;
- LOGGER.debug("UserProtocolPersistenceService bound");
+ LOGGER.debug("{}", "UserProtocolPersistenceService bound");
}
/**
@@ -938,7 +936,7 @@
*/
public synchronized void unbindPersistenceService(final IPersistenceService persistenceService) { // NOSONAR
UserProtocol.persistenceService = null;
- LOGGER.debug("UserProtocolPersistenceService unbound");
+ LOGGER.debug("{}", "UserProtocolPersistenceService unbound");
}
/**
@@ -949,7 +947,7 @@
*/
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC)
public void bindOrganizationService(IOrganizationService organization) {
- LOGGER.debug(UserAccessService.class.getCanonicalName() + ": " + organization.getClass().getCanonicalName() + " bound");
+ LOGGER.debug("{} : {} bound", UserAccessService.class.getCanonicalName(), organization.getClass().getCanonicalName());
sOrganizationServices.put(organization.getClass().getCanonicalName(), organization);
triggerComplexDataContainerChangedListeners();
}
@@ -999,7 +997,7 @@
return new HashMap<>();
}
}
- return Collections.EMPTY_MAP;
+ return Collections.emptyMap();
}
@Override