Search in sources :

Example 1 with BwAuthUserPrefs

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;
}
Also used : BwAuthUser(org.bedework.calfacade.svc.BwAuthUser) BwAuthUserPrefs(org.bedework.calfacade.svc.prefs.BwAuthUserPrefs)

Example 2 with BwAuthUserPrefs

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;
}
Also used : BwAuthUserPrefs(org.bedework.calfacade.svc.prefs.BwAuthUserPrefs) LocationPref(org.bedework.calfacade.svc.prefs.LocationPref)

Example 3 with BwAuthUserPrefs

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;
}
Also used : BwAuthUserPrefs(org.bedework.calfacade.svc.prefs.BwAuthUserPrefs)

Example 4 with BwAuthUserPrefs

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;
}
Also used : ContactPref(org.bedework.calfacade.svc.prefs.ContactPref) BwAuthUserPrefs(org.bedework.calfacade.svc.prefs.BwAuthUserPrefs)

Example 5 with BwAuthUserPrefs

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;
}
Also used : CategoryPref(org.bedework.calfacade.svc.prefs.CategoryPref) BwAuthUserPrefs(org.bedework.calfacade.svc.prefs.BwAuthUserPrefs)

Aggregations

BwAuthUserPrefs (org.bedework.calfacade.svc.prefs.BwAuthUserPrefs)8 BwAuthUser (org.bedework.calfacade.svc.BwAuthUser)2 CalendarPref (org.bedework.calfacade.svc.prefs.CalendarPref)2 CategoryPref (org.bedework.calfacade.svc.prefs.CategoryPref)2 ContactPref (org.bedework.calfacade.svc.prefs.ContactPref)2 LocationPref (org.bedework.calfacade.svc.prefs.LocationPref)2