Merge pull request #806 from stianst/master

KEYCLOAK-772 Event settings are not imported
This commit is contained in:
Stian Thorgersen 2014-10-28 20:35:42 +01:00
commit c697945d39
2 changed files with 10 additions and 4 deletions

View file

@ -61,8 +61,8 @@ public class RealmRepresentation {
protected String accountTheme;
protected String adminTheme;
protected String emailTheme;
protected boolean eventsEnabled;
protected long eventsExpiration;
protected Boolean eventsEnabled;
protected Long eventsExpiration;
protected List<String> eventsListeners;
public String getId() {
@ -445,7 +445,7 @@ public class RealmRepresentation {
this.failureFactor = failureFactor;
}
public boolean isEventsEnabled() {
public Boolean isEventsEnabled() {
return eventsEnabled;
}
@ -453,7 +453,7 @@ public class RealmRepresentation {
this.eventsEnabled = eventsEnabled;
}
public long getEventsExpiration() {
public Long getEventsExpiration() {
return eventsExpiration;
}

View file

@ -52,6 +52,9 @@ public class RepresentationToModel {
if (rep.getQuickLoginCheckMilliSeconds() != null) newRealm.setQuickLoginCheckMilliSeconds(rep.getQuickLoginCheckMilliSeconds());
if (rep.getMaxDeltaTimeSeconds() != null) newRealm.setMaxDeltaTimeSeconds(rep.getMaxDeltaTimeSeconds());
if (rep.getFailureFactor() != null) newRealm.setFailureFactor(rep.getFailureFactor());
if (rep.isEventsEnabled() != null) newRealm.setEventsEnabled(rep.isEventsEnabled());
if (rep.getEventsExpiration() != null) newRealm.setEventsExpiration(rep.getEventsExpiration());
if (rep.getEventsListeners() != null) newRealm.setEventsListeners(new HashSet<String>(rep.getEventsListeners()));
if (rep.getNotBefore() != null) newRealm.setNotBefore(rep.getNotBefore());
@ -263,6 +266,9 @@ public class RepresentationToModel {
if (rep.getAccountTheme() != null) realm.setAccountTheme(rep.getAccountTheme());
if (rep.getAdminTheme() != null) realm.setAdminTheme(rep.getAdminTheme());
if (rep.getEmailTheme() != null) realm.setEmailTheme(rep.getEmailTheme());
if (rep.isEventsEnabled() != null) realm.setEventsEnabled(rep.isEventsEnabled());
if (rep.getEventsExpiration() != null) realm.setEventsExpiration(rep.getEventsExpiration());
if (rep.getEventsListeners() != null) realm.setEventsListeners(new HashSet<String>(rep.getEventsListeners()));
if (rep.getPasswordPolicy() != null) realm.setPasswordPolicy(new PasswordPolicy(rep.getPasswordPolicy()));