On Thu, Jun 30, 2011 at 9:29 AM, Afkham Azeez <[email protected]> wrote:

> and how are you going to change that method?
>
I think we can create Permission objects explicity without just casting.
Some think like this.

 public void addRole(String roleName, String[] userList,
                        org.wso2.carbon.user.api.
Permission[] permissions)
            throws org.wso2.carbon.user.api.UserStoreException {

      Permission[] corePermissions = new Permission[permissions.length]

      // create and assign values to each permission within a for loop

        addRole(roleName, userList, corePermissions);

    }

thanks,
Amila.


> ----
> Sent from my phone
> On Jun 29, 2011 10:16 PM, "Hasini Gunasinghe" <[email protected]> wrote:
> > As per offline chat with Amila, this seems to have introduced during UM
> API
> > separation.
> >
> > Will do the above correction as well, since I will be doing some
> refactoring
> > in this class according to a recent code review.
> >
> > Thanks,
> > Hasini.
> >
> > On Mon, Jun 27, 2011 at 8:48 PM, Amila Suriarachchi <[email protected]>
> wrote:
> >
> >> Add role method has implemented like this,
> >>
> >> public void addRole(String roleName, String[] userList,
> >> org.wso2.carbon.user.api.Permission[] permissions)
> >> throws org.wso2.carbon.user.api.UserStoreException {
> >> addRole(roleName, userList, (Permission[]) permissions);
> >>
> >> }
> >>
> >> in org.wso2.carbon.user.core.ldap.LDAPUserStoreManager.java.
> >>
> >> but org.wso2.carbon.user.core.Permission class extends the
> >> org.wso2.carbon.user.api.Permission
> >>
> >> public class Permission extends org.wso2.carbon.user.api.Permission {
> >>
> >> So it cast down the inheritance hierarchy.
> >>
> >> thanks,
> >> Amila.
> >>
> >> _______________________________________________
> >> Carbon-dev mailing list
> >> [email protected]
> >> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >>
> >>
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to