diff options
author | Adam Young <ayoung@redhat.com> | 2011-11-17 11:52:24 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-12-22 16:39:30 -0500 |
commit | fd669390a16a0bce341df685c990f3159df11d53 (patch) | |
tree | 7be051a021fe74773a081a48dd3a10789b75780e /pki/base/common/src/com/netscape/certsrv | |
parent | ee93fc8f86eb62d52811ce2458e8ccd12bc1cd20 (diff) | |
download | pki-fd669390a16a0bce341df685c990f3159df11d53.tar.gz pki-fd669390a16a0bce341df685c990f3159df11d53.tar.xz pki-fd669390a16a0bce341df685c990f3159df11d53.zip |
type safety for certserv.authorization
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv')
4 files changed, 12 insertions, 16 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java index b9d9bb96c..aebe91709 100644 --- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java +++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java @@ -29,7 +29,6 @@ package com.netscape.certsrv.authorization; public class AuthzMgrPlugin { protected String mId = null; protected String mClassPath = null; - protected Class mClass = null; protected boolean mVisible = true; /** diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java index a0f7133a7..0b5db00aa 100644 --- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java +++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java @@ -35,12 +35,8 @@ import com.netscape.certsrv.base.IAttrSet; * @version $Revision$, $Date$ */ public class AuthzToken implements IAttrSet { - /** - * - */ private static final long serialVersionUID = 4716145610877112054L; - - private Hashtable mAttrs = null; + private Hashtable<String, Object> mAttrs = null; /** * Plugin name of the authorization manager that created the @@ -90,7 +86,7 @@ public class AuthzToken implements IAttrSet { * @param authzMgr The authorization manager that created this Token. */ public AuthzToken(IAuthzManager authzMgr) { - mAttrs = new Hashtable(); + mAttrs = new Hashtable<String, Object>(); mAttrs.put(TOKEN_AUTHZMGR_INST_NAME, authzMgr.getName()); mAttrs.put(TOKEN_AUTHZMGR_IMPL_NAME, authzMgr.getImplName()); mAttrs.put(TOKEN_AUTHZTIME, new Date()); @@ -127,7 +123,7 @@ public class AuthzToken implements IAttrSet { * Enumerate all attribute names in the AuthzToken. * @return Enumeration of all attribute names in this AuthzToken. */ - public Enumeration getElements() { + public Enumeration<String> getElements() { return (mAttrs.keys()); } @@ -135,7 +131,7 @@ public class AuthzToken implements IAttrSet { * Enumerate all attribute values in the AuthzToken. * @return Enumeration of all attribute names in this AuthzToken. */ - public Enumeration getVals() { + public Enumeration<Object> getVals() { return (mAttrs.elements()); } diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java index 167911c40..25a665052 100644 --- a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java +++ b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java @@ -21,6 +21,7 @@ package com.netscape.certsrv.authorization; import java.util.Enumeration; import java.util.Hashtable; +import com.netscape.certsrv.acls.ACL; import com.netscape.certsrv.acls.EACLsException; import com.netscape.certsrv.acls.IACL; import com.netscape.certsrv.authentication.IAuthToken; @@ -131,7 +132,7 @@ public interface IAuthzManager { * Get ACL entries * @return enumeration of ACL entries. */ - public Enumeration getACLs(); + public Enumeration<ACL> getACLs(); /** * Get individual ACL entry for the given name of entry. @@ -155,7 +156,7 @@ public interface IAuthzManager { * Get all registered evaluators. * @return All registered evaluators. */ - public Enumeration aclEvaluatorElements(); + public Enumeration<IAccessEvaluator> aclEvaluatorElements(); /** * Register new evaluator @@ -168,6 +169,6 @@ public interface IAuthzManager { * Return a table of evaluators * @return A table of evaluators */ - public Hashtable getAccessEvaluators(); + public Hashtable<String, IAccessEvaluator> getAccessEvaluators(); } diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java index f6fc3547f..281a11a2d 100644 --- a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java +++ b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java @@ -99,7 +99,7 @@ public interface IAuthzSubsystem extends ISubsystem { * authorization component. * @return a list of authorization managers */ - public Enumeration getAuthzManagers(); + public Enumeration<IAuthzManager> getAuthzManagers(); /** * Initialize authz info - usually used for BasicAclAuthz @@ -114,7 +114,7 @@ public interface IAuthzSubsystem extends ISubsystem { * Gets an enumeration of authorization manager plugins. * @return list of authorization manager plugins */ - public Enumeration getAuthzManagerPlugins(); + public Enumeration<AuthzMgrPlugin> getAuthzManagerPlugins(); /** * Gets a single authorization manager plugin implementation @@ -134,13 +134,13 @@ public interface IAuthzSubsystem extends ISubsystem { * Get a hashtable containing all authentication plugins. * @return all authentication plugins. */ - public Hashtable getPlugins(); + public Hashtable<String, AuthzMgrPlugin> getPlugins(); /** * Get a hashtable containing all authentication instances. * @return all authentication instances. */ - public Hashtable getInstances(); + public Hashtable<String, AuthzManagerProxy> getInstances(); /** * Get an authorization manager interface for the given name. |