[security-dev] PicketLink 3 IDM API - Command Chaining
Darran Lofthouse
darran.lofthouse at jboss.com
Sat Dec 1 09:20:40 EST 2012
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));
Regards,
Darran Lofthouse.
More information about the security-dev
mailing list