Added various input formats management

Jira-issue: WP-1211
Change editPolicy function parameters

Jira-issue: WP-1211
Modified editPolicy function to add devices

Jira-issue: WP-1211
Added friends generic uris and bags

Jira-issue: WP-1211
Bugfixing

Jira-issue: WP-1211