FYI, I solved the problem by using an encoding strategy similar the JVM's
"convention" used for other permission "names".

I have to say though that that "convention" is quite gross.

Would that it were based on LDAP filter syntax ...

Thanks for the sanity check guys,
- Ray


On Thu, Apr 18, 2013 at 2:02 PM, BJ Hargrave <hargr...@us.ibm.com> wrote:

> Then you probably have your own way to populate your
> PermissionCollections. However in Equinox which supports the OSGi
> permission specifications, the way to populate the PermissionCollections is
> via PermissionInfos which require the "0,1,2" constructors.
>
> If you have special permissions that cannot have those sort of
> constructors, then you can't use the OSGi permissions specifications and
> will need to customize a framework implementation to use your own
> permission management model.
> --
>
>  *BJ Hargrave*
> Senior Technical Staff Member, IBM
> OSGi Fellow and CTO of the *OSGi Alliance* <http://www.osgi.org/>*
> **hargr...@us.ibm.com* <hargr...@us.ibm.com>
>
> office: +1 386 848 1781
> mobile: +1 386 848 3788
>
>
>
>
>
> From:        Raymond Auge <raymond.a...@liferay.com>
> To:        Equinox development mailing list <equinox-dev@eclipse.org>
> Date:        2013/04/18 12:29
> Subject:        Re: [equinox-dev] PermissionInfoCollection issues with
> perms cloning
> Sent by:        equinox-dev-boun...@eclipse.org
> ------------------------------
>
>
>
> PS: We were not loading our permissions from a standard policy file. Hence
> how we ended up with what we have.
>
>
> On Thu, Apr 18, 2013 at 12:26 PM, Raymond Auge 
> <*raymond.a...@liferay.com*<raymond.a...@liferay.com>>
> wrote:
> Ok, I stand corrected. After looking at the code for PolicyParser it seems
> the 0, 1, 2 rule is indeed the case.
>
> Other documentation seems to have implied that an arbitrary number of
> constructor arguments were acceptable:
>
> *
> http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA
> *<http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#AppA>
>
> However, I guess each of these different policy files must have it's own
> parser.
>
> Sorry about my confusion.
>
> - Ray
>
> Thx
>
>
> On Thu, Apr 18, 2013 at 12:05 PM, BJ Hargrave 
> <*hargr...@us.ibm.com*<hargr...@us.ibm.com>>
> wrote:
> > Essentially the PermissionInfoCollection.addPermissions method
> > attempts to create a "copy" of the permission for the purpose adding
> > to it's collection.
>
> Also, to be clear, there is no copying going on here. The code needs to
> construct a Permission object from the information in the PermissionInfo.
> The PermissionInfo contains the class name of the permission type with 0, 1
> or 2 String arguments for the constructor. This very much the same as would
> be done by the Policy object to create permissions based upon the grant
> information in the policy file.
> --
>
>  *BJ Hargrave*
> Senior Technical Staff Member, IBM
> OSGi Fellow and CTO of the *OSGi Alliance* <http://www.osgi.org/>*
> **hargr...@us.ibm.com* <hargr...@us.ibm.com>
>
> office: *+1 386 848 1781* <%2B1%20386%20848%201781>
> mobile: *+1 386 848 3788* <%2B1%20386%20848%203788>
>
>
> _______________________________________________
> equinox-dev mailing list*
> **equinox-dev@eclipse.org* <equinox-dev@eclipse.org>*
> **https://dev.eclipse.org/mailman/listinfo/equinox-dev*<https://dev.eclipse.org/mailman/listinfo/equinox-dev>
>
>
>
>
> -- *
> **Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> <http://twitter.com/#!/rotty3000> | Senior Software Architect | *Liferay,
> Inc.* <http://www.liferay.com/>  <https://twitter.com/#!/liferay>
>
> ---
> 24-25 October 2012 |* Liferay **Spain Symposium* | 
> *liferay.com/spain2012*<http://www.liferay.com/spain2012>
> 16 November 2012 |* Liferay **Italy Symposium* | 
> *liferay.com/italy2012*<http://www.liferay.com/italy2012>
>
>
>
>
> -- *
> **Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> <http://twitter.com/#!/rotty3000> | Senior Software Architect | *Liferay,
> Inc.* <http://www.liferay.com/>  <https://twitter.com/#!/liferay>
>
> ---
> 24-25 October 2012 |* Liferay **Spain Symposium* | 
> *liferay.com/spain2012*<http://www.liferay.com/spain2012>
> 16 November 2012 |* Liferay **Italy Symposium* | 
> *liferay.com/italy2012*<http://www.liferay.com/italy2012>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>


-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
<http://twitter.com/#!/rotty3000> | Senior Software Architect | *Liferay,
Inc.* <http://www.liferay.com>  <https://twitter.com/#!/liferay>

---

24-25 October 2012 |* Liferay **Spain Symposium* |
liferay.com/spain2012<http://www.liferay.com/spain2012>

16 November 2012 |* Liferay **Italy Symposium* |
liferay.com/italy2012<http://www.liferay.com/italy2012>
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to