diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java | 69 |
1 files changed, 31 insertions, 38 deletions
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 028f55a89..a0f7133a7 100644 --- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java +++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java @@ -17,19 +17,21 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.authorization; + import java.util.Date; import java.util.Enumeration; import java.util.Hashtable; import com.netscape.certsrv.base.IAttrSet; + /** - * Authorization token returned by Authorization Managers. Upon return, it - * contains the name of the authorization manager that create the AuthzToken, - * the plugin name of the authorization manager, time of authorization happened, - * name of the resource, type of operation performed on the resource. + * Authorization token returned by Authorization Managers. + * Upon return, it contains the name of the authorization manager that create + * the AuthzToken, the plugin name of the authorization manager, time of + * authorization happened, name of the resource, type of operation performed + * on the resource. * <p> - * * @version $Revision$, $Date$ */ public class AuthzToken implements IAttrSet { @@ -41,19 +43,19 @@ public class AuthzToken implements IAttrSet { private Hashtable mAttrs = null; /** - * Plugin name of the authorization manager that created the AuthzToken as a - * string. + * Plugin name of the authorization manager that created the + * AuthzToken as a string. */ public static final String TOKEN_AUTHZMGR_IMPL_NAME = "authzMgrImplName"; /** - * Name of the authorization manager that created the AuthzToken as a - * string. + * Name of the authorization manager that created the AuthzToken + * as a string. */ public static final String TOKEN_AUTHZMGR_INST_NAME = "authzMgrInstName"; /** - * Time of authorization as a java.util.Date + * Time of authorization as a java.util.Date */ public static final String TOKEN_AUTHZTIME = "authzTime"; @@ -63,7 +65,7 @@ public class AuthzToken implements IAttrSet { public static final String TOKEN_AUTHZ_RESOURCE = "authzRes"; /** - * name of the operation + * name of the operation */ public static final String TOKEN_AUTHZ_OPERATION = "authzOp"; @@ -71,45 +73,41 @@ public class AuthzToken implements IAttrSet { * Status of the authorization evaluation */ public static final String TOKEN_AUTHZ_STATUS = "status"; - + /** - * Constant for the success status of the authorization evaluation. + * Constant for the success status of the authorization evaluation. */ public static final String AUTHZ_STATUS_SUCCESS = "statusSuccess"; /** - * Constructs an instance of a authorization token. The token by default - * contains the following attributes: <br> - * + * Constructs an instance of a authorization token. + * The token by default contains the following attributes: <br> * <pre> - * "authzMgrInstName" - The authorization manager instance name. - * "authzMgrImplName" - The authorization manager plugin name. - * "authzTime" - The - The time of authorization. + * "authzMgrInstName" - The authorization manager instance name. + * "authzMgrImplName" - The authorization manager plugin name. + * "authzTime" - The - The time of authorization. * </pre> - * * @param authzMgr The authorization manager that created this Token. */ public AuthzToken(IAuthzManager authzMgr) { mAttrs = new Hashtable(); - mAttrs.put(TOKEN_AUTHZMGR_INST_NAME, authzMgr.getName()); - mAttrs.put(TOKEN_AUTHZMGR_IMPL_NAME, authzMgr.getImplName()); + mAttrs.put(TOKEN_AUTHZMGR_INST_NAME, authzMgr.getName()); + mAttrs.put(TOKEN_AUTHZMGR_IMPL_NAME, authzMgr.getImplName()); mAttrs.put(TOKEN_AUTHZTIME, new Date()); } /** * Get the value of an attribute in the AuthzToken - * * @param attrName The attribute name - * @return The value of attrName if any. + * @return The value of attrName if any. */ public Object get(String attrName) { return mAttrs.get(attrName); } /** - * Used by an Authorization manager to set an attribute and value in the - * AuthzToken. - * + * Used by an Authorization manager to set an attribute and value + * in the AuthzToken. * @param attrName The name of the attribute * @param value The value of the attribute to set. */ @@ -119,7 +117,6 @@ public class AuthzToken implements IAttrSet { /** * Removes an attribute in the AuthzToken - * * @param attrName The name of the attribute to remove. */ public void delete(String attrName) { @@ -128,7 +125,6 @@ public class AuthzToken implements IAttrSet { /** * Enumerate all attribute names in the AuthzToken. - * * @return Enumeration of all attribute names in this AuthzToken. */ public Enumeration getElements() { @@ -137,7 +133,6 @@ public class AuthzToken implements IAttrSet { /** * Enumerate all attribute values in the AuthzToken. - * * @return Enumeration of all attribute names in this AuthzToken. */ public Enumeration getVals() { @@ -145,11 +140,10 @@ public class AuthzToken implements IAttrSet { } /** - * Gets the name of the authorization manager instance that created this - * token. - * - * @return The name of the authorization manager instance that created this - * token. + * Gets the name of the authorization manager instance that created + * this token. + * @return The name of the authorization manager instance that created + * this token. */ public String getAuthzManagerInstName() { return ((String) mAttrs.get(TOKEN_AUTHZMGR_INST_NAME)); @@ -158,9 +152,8 @@ public class AuthzToken implements IAttrSet { /** * Gets the plugin name of the authorization manager that created this * token. - * * @return The plugin name of the authorization manager that created this - * token. + * token. */ public String getAuthzManagerImplName() { return ((String) mAttrs.get(TOKEN_AUTHZMGR_IMPL_NAME)); @@ -168,10 +161,10 @@ public class AuthzToken implements IAttrSet { /** * Gets the time of authorization. - * * @return The time of authorization */ public Date getAuthzTime() { return ((Date) mAttrs.get(TOKEN_AUTHZTIME)); } } + |