[Yanel-dev] Managing policies

Michael Wechner michael.wechner at wyona.com
Wed Jun 16 23:49:33 CEST 2010


Michael Wechner wrote:
> Hi
>
> It would  be nice to be able to delete policies recursively, e.g.
>
> PolicyManager.removePolicy(PATH, true)
>
> whereas this would be mean to break/enhance the API of the policy 
> manager.
>
> Now instead doing this one could browser through the repository 
> somehow, but it would mean to
> introduce new methods such as
>
> Policy.getChildren()
>
> and
>
> PolicyManager.existsPolicy(PATH).

As a workaround I have used the Policies Repository within

src/contributions/resources/security-api/src/java/org/wyona/yanel/impl/resources/securityapi/UserManagerResource.java

(} else if (path.endsWith(".policy")) { // WARNING/TODO: This check 
violates the API!)

but this is really not nice and should be changed as soon as possible.

Cheers

Michi
>
> (btw, the exists seems to be done with PolicyManager.getPolicy(path, 
> false) != null)
>
> I am not sure either what steps should be done, hence consider the 
> above as food for thought ;-)
>
> Thanks
>
> Michi



More information about the Yanel-development mailing list