use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class CalintfImpl method getAuthUser.
@Override
public BwAuthUser getAuthUser(final String href) throws CalFacadeException {
final BwAuthUser au = principalsAndPrefs.getAuthUser(href);
if (au == null) {
// Not an authorised user
return null;
}
BwAuthUserPrefs prefs = au.getPrefs();
if (prefs == null) {
prefs = BwAuthUserPrefs.makeAuthUserPrefs();
au.setPrefs(prefs);
}
return au;
}
use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class AuthUserFieldRule method getLocationPrefs.
private LocationPref getLocationPrefs(final BwAuthUser au) {
BwAuthUserPrefs aup = getPrefs(au);
LocationPref p = aup.getLocationPrefs();
if (p == null) {
p = new LocationPref();
aup.setLocationPrefs(p);
}
return p;
}
use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class AuthUserFieldRule method getPrefs.
/**
* @param au
* @return prefs
*/
public BwAuthUserPrefs getPrefs(final BwAuthUser au) {
BwAuthUserPrefs aup = au.getPrefs();
if (aup == null) {
aup = new BwAuthUserPrefs();
au.setPrefs(aup);
}
return aup;
}
use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class AuthUserFieldRule method getContactPrefs.
private ContactPref getContactPrefs(final BwAuthUser au) {
BwAuthUserPrefs aup = getPrefs(au);
ContactPref p = aup.getContactPrefs();
if (p == null) {
p = new ContactPref();
aup.setContactPrefs(p);
}
return p;
}
use of org.bedework.calfacade.svc.prefs.BwAuthUserPrefs in project bw-calendar-engine by Bedework.
the class AuthUserFieldRule method getCategoryPrefs.
private CategoryPref getCategoryPrefs(final BwAuthUser au) {
BwAuthUserPrefs aup = getPrefs(au);
CategoryPref p = aup.getCategoryPrefs();
if (p == null) {
p = new CategoryPref();
aup.setCategoryPrefs(p);
}
return p;
}
Aggregations