use of org.bedework.calsvci.CalSvcFactoryDefault in project bw-calendar-engine by Bedework.
the class SystemConf method getSvci.
/* ====================================================================
* Private methods
* ==================================================================== */
/**
* Get an svci object and return it. Also embed it in this object.
*
* @return svci object
* @throws org.bedework.calfacade.exc.CalFacadeException
*/
private CalSvcI getSvci() throws CalFacadeException {
if (getConfig() == null) {
return null;
}
if ((svci != null) && svci.isOpen()) {
return svci;
}
if (getRootUsers() == null) {
return null;
}
final String[] rootUsers = getRootUsers().split(",");
if ((rootUsers.length == 0) || (rootUsers[0] == null)) {
return null;
}
final CalSvcIPars pars = CalSvcIPars.getServicePars(getServiceName(), rootUsers[0], // publicAdmin
true, // Allow super user
true);
svci = new CalSvcFactoryDefault().getSvc(pars);
svci.open();
svci.beginTransaction();
return svci;
}
use of org.bedework.calsvci.CalSvcFactoryDefault in project bw-calendar-engine by Bedework.
the class NotificationConf method getSvci.
/* ====================================================================
* Private methods
* ==================================================================== */
/**
* Get an svci object and return it. Also embed it in this object.
*
* @param account of user to run as
* @return svci object
* @throws org.bedework.calfacade.exc.CalFacadeException
*/
private CalSvcI getSvci(final String account) throws CalFacadeException {
if ((svci != null) && svci.isOpen()) {
return svci;
}
if (svci == null) {
final CalSvcIPars pars = CalSvcIPars.getServicePars("notifications", account, // publicAdmin
false, // Allow super user
true);
svci = new CalSvcFactoryDefault().getSvc(pars);
}
svci.open();
svci.beginTransaction();
return svci;
}
Aggregations