use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class AuthUserFieldRule method getCalendarPrefs.
private CalendarPref getCalendarPrefs(final BwAuthUser au) {
BwAuthUserPrefs aup = getPrefs(au);
CalendarPref p = aup.getCalendarPrefs();
if (p == null) {
p = new CalendarPref();
aup.setCalendarPrefs(p);
}
return p;
}
use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class AuthUserRule method begin.
@Override
public void begin(final String ns, final String name, final Attributes att) throws Exception {
super.begin(ns, name, att);
BwAuthUser au = (BwAuthUser) top();
BwAuthUserPrefs prefs = au.getPrefs();
if (prefs == null) {
prefs = new BwAuthUserPrefs();
au.setPrefs(prefs);
}
if (prefs.getCalendarPrefs() == null) {
prefs.setCalendarPrefs(new CalendarPref());
}
if (prefs.getContactPrefs() == null) {
prefs.setContactPrefs(new ContactPref());
}
if (prefs.getLocationPrefs() == null) {
prefs.setLocationPrefs(new LocationPref());
}
if (prefs.getCategoryPrefs() == null) {
prefs.setCategoryPrefs(new CategoryPref());
}
}
use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class BwAuthUser method clone.
@Override
public Object clone() {
final BwAuthUser au = new BwAuthUser();
au.setUserHref(getUserHref());
au.setUsertype(getUsertype());
BwAuthUserPrefs aup = getPrefs();
if (aup != null) {
aup = (BwAuthUserPrefs) aup.clone();
au.setPrefs(aup);
}
return au;
}
Aggregations