Revert "updated sample code to use containerPermissions. added java & xml formatting"

This reverts commit 57f75cc726c377043e3594aed51317bbfbce22ff.