本文整理汇总了Java中org.easyrec.model.core.web.RemoteTenant.setAutoArchiving方法的典型用法代码示例。如果您正苦于以下问题:Java RemoteTenant.setAutoArchiving方法的具体用法?Java RemoteTenant.setAutoArchiving怎么用?Java RemoteTenant.setAutoArchiving使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.easyrec.model.core.web.RemoteTenant
的用法示例。
在下文中一共展示了RemoteTenant.setAutoArchiving方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: storearchive
import org.easyrec.model.core.web.RemoteTenant; //导入方法依赖的package包/类
public ModelAndView storearchive(HttpServletRequest request, HttpServletResponse httpServletResponse) {
String tenantId = ServletUtils.getSafeParameter(request, "tenantId", "");
String operatorId = ServletUtils.getSafeParameter(request, "operatorId", "");
String archiving = ServletUtils.getSafeParameter(request, "archiving", "");
String archivingtime = ServletUtils.getSafeParameter(request, "archivingtime", "");
ModelAndView mav = new ModelAndView("page");
mav.addObject("title", "easyrec :: administration");
mav.addObject("operatorId", operatorId);
mav.addObject("tenantId", tenantId);
if (Security.isDeveloper(request)) {
RemoteTenant r = remoteTenantDAO.get(operatorId, tenantId);
if (r != null) {
r.setAutoArchiving(archiving);
if (!Strings.isNullOrEmpty(archivingtime)) {
r.setAutoArchiverTimeRange(archivingtime);
}
tenantService.storeTenantConfig(r.getId(), r.getTenantConfigProperties());
}
return MessageBlock.createSingle(mav, MSG.ARCHIVE_CONFIG_CHANGED, STORE_ARCHIVE, MSG.SUCCESS);
} else {
return MessageBlock.createSingle(mav, MSG.NOT_SIGNED_IN, STORE_ARCHIVE, MSG.ERROR);
}
}