jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: AW: New information about my last email...
Date Wed, 26 Jan 2011 09:24:56 GMT
hi javier

> Another problem is, in class AccessControlPolicy I must call
> AccessControlPolicy.getApplicablePolicies() and setPolicy() passing as
> parameter a node. I do not know how I should get this nodo.

the question is, which jcr node do you want to edited the access
control policies for. the path of this node you pass into the
getApplicablePolicies or getPolicies method.
once you are done with your changes and you want to reapply the
policy in order to have take effect, you use the same path again
to call setPolicy.

if you are uncertain which jcr node your policy is "attached" and
in the case your policy is an instance of JackrabbitAccessControlPolicy
you can call JackrabbitAccessControlPolicy#getPath.

> If I call getNode("user") or getNodeByIdentifier("user") the program
> throws a Repository exception.

sorry. can't follow you here... why do you need the user node in order
to set a policy? and why do you think that any of the method calls
should do something useful? Session.getNode() takes an absolute path
as argument and getNodeByIdentifier() takes the node identifier such
as obtained by calling Node.getIdentifier().

hope that helps
angela

Mime
View raw message