Cancel
Showing results for 
Search instead for 
Did you mean: 

ACL: What is the difference between HasClass(Folder) and HasType(Folder)

Valued Contributor
Valued Contributor

Hi, I am learning ACL.

But when I set my custom ACL, I was wondering which one I should use, HasClass(Folder) or HassType(Folder)?

 

Could you tell me what is the difference between them?

2 REPLIES

Re: ACL: What is the difference between HasClass(Folder) and HasType(Folder)

Solution Partner Creator Solution Partner Creator
Solution Partner Creator
Hi Gimec,
Type is related to business logic and class is related to the implementation of business logic.
There are primary and secondary type objects in Teamcenter, the first have the underlying class and the second use the underlying class of the parent type.
For the 'Folder' both conditions HasType and HasClass give the same result because folder is primary type.
The difference appears when you try to check particular dataset or particular form.
'Dataset' is primary business object with 'Dataset' storage class but 'UGMASTER' is secondary and the storage class for it is also 'Dataset'. So using the condition HasClass(UGMASTER) is erroneous, it should be HasType(UGMASTER).
When creating ACL rules you should use BMIDE to get class and type names.

Re: ACL: What is the difference between HasClass(Folder) and HasType(Folder)

Esteemed Contributor
Esteemed Contributor

You can also create a custom folder, that uses the regular folder class, since it usually doesn't make sense to have a separate class for a custom folder type.

In this condition everything that is specified below HasClass(Folder) would also apply to your custom folder type, but HasType(MyCustomFolder) would only apply to your custom folder type.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX12.0

How to Get the Most from Your Signature in the Community