cancel
Showing results for 
Search instead for 
Did you mean: 

How to get property of a KM folder?

Former Member
0 Kudos

Dear all,

When I enabled the "versioning" and "approval" of a folder in KM repository, I can see the word "Versioning Enabled" and "Approval Enabled" at the detail page of a folder. However, I can't found any property or method can get this information from code. Do any one know how to get these informations?

Thanks

Sam

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You may have to use different services to get these properties. Use Statemanagementservice to check weather approval process is enabled or not. You may have look at the web log at to get the reference to the service. you can use the method sResource.getUtils().isStatemanagementEnabled()

Arul

detlev_beutner
Active Contributor
0 Kudos

Hi Sam, hi Arul,

it's even easier:


FolderSettings folderSettings = new FolderSettings((ICollection) resource);
boolean isVersioningActivated = folderSettings.isEnhanced();
boolean isApprovalProcessActivated = folderSettings.isStatemanagementEnabled();

with folderSettings from com.sapportals.wcm.control.util.FolderSettings.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

Does the class "FolderSettings" exist in EP5? Since I can't found it in the javadoc of PDK.

Besides, how can I check the access right of user "everyone" is removed from a folder? When I look into the ACL of a folder, I can't located the "Everyone".

Thanks

Sam

detlev_beutner
Active Contributor
0 Kudos

Hi Sam,

> Does the class "FolderSettings" exist in EP5?

The easiest way is to look inside

If you would have done, you would have found it within knowledgemanagement/lib/wcmcontrol.jar; complete package is com/sapportals/wcm/control/util/FolderSettings.class.

> Since I can't found it in the javadoc of PDK.

In SAP EP Development, the golden rule sounds: "The less something is documented, the more helpful it will be."

> how can I check the access right of user

> "everyone" is removed from a folder?

For ACL introduction, see and referenced thread.

ACLs can exist on a resource or can be inherited (aclMan.getInheritedAcl(resource)!

If someone has certain rights you can check by acl.checkPermission(...).

Hope it helps

Detlev