Hi,
You can read the documentation about creating custom policies from the 'Virtual DataPort Developer Guide' (https://community.denodo.com/docs/view/document/Virtual%20DataPort/Denodo%205.5/Virtual%20DataPort%20Developer%20Guide).
In the %denodo_home%\samples\vdp\customPolicies folder you can find an example custom policy and in the %denodo_home%\docs\vdp\api you can find the java docs.
Hope this helps.