SharePoint Document Library中的"Versioning Settings"功能与CSOM的对应



博客地址:http://blog.csdn.net/FoxDave

SharePoint文档库关于版本的设置:“Versioning Settings”,可以通过CSOM用List对象的一些属性去设置它。

Content Approval部分:

Specify whether new items or changes to existing items should remain in a draft state until they have been approved.

对应的属性为list.EnableModeration

布尔类型,true为Yes,false为No。


Document Version History部分:

Specify whether a version is created each time you edit a file in this document library.

Create a version each time you edit a file in this document library:

对应的属性为list.EnableVersioning和list.EnableMinorVersions

布尔类型。No versioning时,两个属性均为false;Create major versions时,EnableVersioning为ture,EnableMinorVersions为false;Create major and minor (draft) versions时,两个属性均为true。


Optionally limit the number of versions to retain:

Keep the following number of major versions:

对应的属性为list.MajorVersionLimit

整型,主要版本的保存数量限制

Keep drafts for the following number of major versions:

对应的属性为list.MajorWithMinorVersionsLimit

整型,次要版本(或主要版本草稿)的保存数量限制


Draft Item Security部分:

Drafts are minor versions or items which have not been approved. Specify which users should be able to view drafts in this document library.

对应的属性为list.DraftVersionVisibility

枚举类型,对应DraftVisibilityType(Reader、Author和Approver),分别表示设置的三个选项。


Require Check Out部分:

Specify whether users must check out documents before making changes in this document library.

对应的属性为list.ForceCheckout

布尔类型,true为Yes,false为No。


以上就是版本设置相关的CSOM属性,可以用来方便地获取与设置库的版本设置。

转载于:https://www.cnblogs.com/justinliu/p/5961595.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值