Class JsonDeleteTokenManager


  • class JsonDeleteTokenManager
    extends java.lang.Object
    Manager for deletion tokens in the JSON protocols. This is a separate manager to be able to support the RESTful API where the connection where a token is generated may be broken before the client's deletion request containing the token is sent.

    Note this is package private and is not part of a committed to API.

    Since:
    4.15.6
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean acceptToken​(java.lang.String type, java.lang.String name, java.lang.String token)
      Accept a token.
      (package private) static JsonDeleteTokenManager getDefault()
      Use this method to access the default instance.
      (package private) java.lang.String getToken​(java.lang.String type, java.lang.String name)
      Generate a token to allow deletion following the rejection of a deletion request.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • acceptToken

        boolean acceptToken​(@Nonnull
                            java.lang.String type,
                            @Nonnull
                            java.lang.String name,
                            @CheckForNull
                            java.lang.String token)
        Accept a token. If the token is not valid, any valid token is also invalidated.
        Parameters:
        type - the type of the object to delete
        name - the name of the object to delete
        token - the token to test
        Returns:
        true if the token was accepted; false otherwise
      • getToken

        java.lang.String getToken​(@Nonnull
                                  java.lang.String type,
                                  @Nonnull
                                  java.lang.String name)
        Generate a token to allow deletion following the rejection of a deletion request.
        Parameters:
        type - the type of the object to delete
        name - the name of the object to delete
        Returns:
        the token to use to confirm a deletion should be accepted