Hi Sakshi,
Look at
Use predefined evaluator to check aspect.
Predefined evaluators | Alfresco Documentation
We now need to add a condition in share document library XML file to use the new aspect.
First which you need to do is creating an marker aspect.Apply it to the folder on which you want to disable the download action.There are multiple ways for adding an aspect.
For disabling the download action on the children/files which are inside the folder we have 2 approach.
First one is,
Creating new custom evaluator in which you need to check whether the parent folder has the marker aspect or not.If it has you can disable the download action by returning fals evalue in custome java evaluator.
Below link will help you in creating an custom java evaluator.
Evaluators | Alfresco Documentation
Second one it.
Create a behavior, which will get called when you add in aspect in a folder.In this behavior write the logic that when you add aspect in folder it will also apply that aspect to all childrens.
Create one more behavior , when you upload or create a content inside that folder , it will check whether the parent folder has an aspect or not, if it has it will apply it to the new content as well.
Below links will help you in creating policies.
Implementing Custom Behaviors in Alfresco | ECMArchitect | Alfresco Developer Tutorials
Behaviours / Policies | Alfresco Documentation
After creating policies use hasAspct evaluator which is mentioned in below link.For creating hasAspect evaluator you do not need to do any java coding.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.