cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to create ACL Domain by Coding?

prathi
12-Amethyst

How to create ACL Domain by Coding?

We have 568 products for which we need to create a Custom Product Level Domain (which also has to be associated to particular folder in each product) We are planning to load the rules for them using Loader files. But its not feasible to create 568 custom domains manually.  Is their any way to create it by coding?

5 REPLIES 5

Hi Prasad,

Can you check if below article helps:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS72077

Regards,

Bhushan

prathi
12-Amethyst
(To:BhushanNehe)

Hi Bhushan,

Thank you for the link. I checked that article. This would be helpful for me to load the rules after the the Custom Domains are created. These loaders don't create a Domain. For eg :

Consider Product A. It has a Default Domain. I want to apply a rule for /Default/Design domain (Design is the custom domain for which i want to load the rules and associate it with a particular folder). So in Loader if I write rules for  <domainName>/Default/Design</domainName> without Design Domain's existence, it would throw error.

So firstly I ll have to create a Domain (Design) then associate it with Folder and the load the rules using these Loader files.

But with my present condition, i ll have to do this all manually. So i am looking for a code which would create these domains under all the products and also associate it with the desired folder.

prathi
12-Amethyst
(To:prathi)

Hi Bhushan,

I read that article again, I guess Step 1 and 2 might help me. I ll try and let you know. The previous reply pertained to Step 3.

Thanks!!

Prasad

prathi
12-Amethyst
(To:BhushanNehe)

Hi Bhushan,

I tried the steps mentioned in the article. It has successfully created the domains. But only one domain at a time could be created. Like, I want to create Domains for all the product present in the organisation, but when i give its reference (<csvparentDomainPath>[/wt.inf.container.OrgContainer=Demo Organization/wt.pdmlink.PDMLinkProduct=GOLF_CART]/Default</csvparentDomainPath>) it throws error. So how to do it fro multiple products under same context?

It seems you will have to pass the context related information from the command line. I was also checking the loader file and I found following API is getting called to create the domains but it is marked as Unsupported.

AdministrativeDomainHelper.manager.createDomain(parentDomainRef, domainName, description, containerRef);

Regards,

Bhushan

Announcements


Top Tags