[security-dev] PicketLink 3 IDM API - Command Chaining

Shane Bryzak sbryzak at redhat.com
Sun Dec 2 18:21:32 EST 2012


On 12/02/2012 12:20 AM, Darran Lofthouse wrote:
> Working with the IdentityManager interface quite a lot of methods are
> returning void - has there been any consideration to them returning an
> appropriate IdentityManager reference to avoid the need for subsequent
> lookup calls and to potentially commands to be chained?
>
> As an example creating a new Tier and obtaining the IdentityManager for
> that Tier takes three lines and introduces the need to cache the Tier
> for it's re-use: -
>
>           Tier internalTier = new Tier("InternalApps", "Tier to contain
> roles for internal apps.", null);
>           im.createTier(internalTier);
>           IdentityManager internalTierIm = im.forTier(internalTier);
>
> Had the call to createTier returned the IdentityManager I could have
> reduced this down to: -
>
>           IdentityManager internalTierIm = im.createTier(new Tier(
>                   "InternalApps",
>                   "Tier to contain roles for internal apps.",
>                   null));

That's an interesting idea, I'll take a look to see where we could 
improve the API like this.


>
> Regards,
> Darran Lofthouse.
> _______________________________________________
> security-dev mailing list
> security-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/security-dev



More information about the security-dev mailing list