DFC ACL Helper

I’d a recent need to do some DFC programming related to permission set. It makes sense to write an ACL helper class for reusability.

Common useful methods are: isACLExist, getACL, createACL and updateACL

The method getACL returns an IDfACL object if it exists. If it doesn’t, NULL is returned.

The isACLExist method calls the getACL method and do a NULL check. If it is NULL, the ACL doesn’t exist, and vice-versa.

The createACL method will create a new persistent object of type “dm_acl”. To grant accessor to the permission set, the IDfACL.grant method is used. After creation, the IDfACL.save method is invoked to save the object.

The updateACL method will check if an ACL exists. If it does, it will do the necessary updates and lastly saves it.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: