src/java.base/share/classes/java/security/Identity.java
changeset 58242 94bb65cb37d3
parent 57950 4612a3cfb927
child 58679 9c3209ff7550
equal deleted inserted replaced
58241:33de7752835c 58242:94bb65cb37d3
   111      * Constructs an identity with the specified name and scope.
   111      * Constructs an identity with the specified name and scope.
   112      *
   112      *
   113      * @param name the identity name.
   113      * @param name the identity name.
   114      * @param scope the scope of the identity.
   114      * @param scope the scope of the identity.
   115      *
   115      *
   116      * @exception KeyManagementException if there is already an identity
   116      * @throws    KeyManagementException if there is already an identity
   117      * with the same name in the scope.
   117      * with the same name in the scope.
   118      */
   118      */
   119     public Identity(String name, IdentityScope scope) throws
   119     public Identity(String name, IdentityScope scope) throws
   120     KeyManagementException {
   120     KeyManagementException {
   121         this(name);
   121         this(name);
   171      * method is called with {@code "setIdentityPublicKey"}
   171      * method is called with {@code "setIdentityPublicKey"}
   172      * as its argument to see if it's ok to set the public key.
   172      * as its argument to see if it's ok to set the public key.
   173      *
   173      *
   174      * @param key the public key for this identity.
   174      * @param key the public key for this identity.
   175      *
   175      *
   176      * @exception KeyManagementException if another identity in the
   176      * @throws    KeyManagementException if another identity in the
   177      * identity's scope has the same public key, or if another exception occurs.
   177      * identity's scope has the same public key, or if another exception occurs.
   178      *
   178      *
   179      * @exception  SecurityException  if a security manager exists and its
   179      * @throws     SecurityException  if a security manager exists and its
   180      * {@code checkSecurityAccess} method doesn't allow
   180      * {@code checkSecurityAccess} method doesn't allow
   181      * setting the public key.
   181      * setting the public key.
   182      *
   182      *
   183      * @see #getPublicKey
   183      * @see #getPublicKey
   184      * @see SecurityManager#checkSecurityAccess
   184      * @see SecurityManager#checkSecurityAccess
   198      * method is called with {@code "setIdentityInfo"}
   198      * method is called with {@code "setIdentityInfo"}
   199      * as its argument to see if it's ok to specify the information string.
   199      * as its argument to see if it's ok to specify the information string.
   200      *
   200      *
   201      * @param info the information string.
   201      * @param info the information string.
   202      *
   202      *
   203      * @exception  SecurityException  if a security manager exists and its
   203      * @throws     SecurityException  if a security manager exists and its
   204      * {@code checkSecurityAccess} method doesn't allow
   204      * {@code checkSecurityAccess} method doesn't allow
   205      * setting the information string.
   205      * setting the information string.
   206      *
   206      *
   207      * @see #getInfo
   207      * @see #getInfo
   208      * @see SecurityManager#checkSecurityAccess
   208      * @see SecurityManager#checkSecurityAccess
   233      * method is called with {@code "addIdentityCertificate"}
   233      * method is called with {@code "addIdentityCertificate"}
   234      * as its argument to see if it's ok to add a certificate.
   234      * as its argument to see if it's ok to add a certificate.
   235      *
   235      *
   236      * @param certificate the certificate to be added.
   236      * @param certificate the certificate to be added.
   237      *
   237      *
   238      * @exception KeyManagementException if the certificate is not valid,
   238      * @throws    KeyManagementException if the certificate is not valid,
   239      * if the public key in the certificate being added conflicts with
   239      * if the public key in the certificate being added conflicts with
   240      * this identity's public key, or if another exception occurs.
   240      * this identity's public key, or if another exception occurs.
   241      *
   241      *
   242      * @exception  SecurityException  if a security manager exists and its
   242      * @throws     SecurityException  if a security manager exists and its
   243      * {@code checkSecurityAccess} method doesn't allow
   243      * {@code checkSecurityAccess} method doesn't allow
   244      * adding a certificate.
   244      * adding a certificate.
   245      *
   245      *
   246      * @see SecurityManager#checkSecurityAccess
   246      * @see SecurityManager#checkSecurityAccess
   247      */
   247      */
   284      * method is called with {@code "removeIdentityCertificate"}
   284      * method is called with {@code "removeIdentityCertificate"}
   285      * as its argument to see if it's ok to remove a certificate.
   285      * as its argument to see if it's ok to remove a certificate.
   286      *
   286      *
   287      * @param certificate the certificate to be removed.
   287      * @param certificate the certificate to be removed.
   288      *
   288      *
   289      * @exception KeyManagementException if the certificate is
   289      * @throws    KeyManagementException if the certificate is
   290      * missing, or if another exception occurs.
   290      * missing, or if another exception occurs.
   291      *
   291      *
   292      * @exception  SecurityException  if a security manager exists and its
   292      * @throws     SecurityException  if a security manager exists and its
   293      * {@code checkSecurityAccess} method doesn't allow
   293      * {@code checkSecurityAccess} method doesn't allow
   294      * removing a certificate.
   294      * removing a certificate.
   295      *
   295      *
   296      * @see SecurityManager#checkSecurityAccess
   296      * @see SecurityManager#checkSecurityAccess
   297      */
   297      */
   398      * as its argument to see if it's ok to return the string.
   398      * as its argument to see if it's ok to return the string.
   399      *
   399      *
   400      * @return information about this identity, such as its name and the
   400      * @return information about this identity, such as its name and the
   401      * name of its scope (if any).
   401      * name of its scope (if any).
   402      *
   402      *
   403      * @exception  SecurityException  if a security manager exists and its
   403      * @throws     SecurityException  if a security manager exists and its
   404      * {@code checkSecurityAccess} method doesn't allow
   404      * {@code checkSecurityAccess} method doesn't allow
   405      * returning a string describing this identity.
   405      * returning a string describing this identity.
   406      *
   406      *
   407      * @see SecurityManager#checkSecurityAccess
   407      * @see SecurityManager#checkSecurityAccess
   408      */
   408      */
   428      *
   428      *
   429      * @return information about this identity. If {@code detailed}
   429      * @return information about this identity. If {@code detailed}
   430      * is true, then this method returns more information than that
   430      * is true, then this method returns more information than that
   431      * provided by the {@code toString} method without any arguments.
   431      * provided by the {@code toString} method without any arguments.
   432      *
   432      *
   433      * @exception  SecurityException  if a security manager exists and its
   433      * @throws     SecurityException  if a security manager exists and its
   434      * {@code checkSecurityAccess} method doesn't allow
   434      * {@code checkSecurityAccess} method doesn't allow
   435      * returning a string describing this identity.
   435      * returning a string describing this identity.
   436      *
   436      *
   437      * @see #toString
   437      * @see #toString
   438      * @see SecurityManager#checkSecurityAccess
   438      * @see SecurityManager#checkSecurityAccess