org.silverpeas.token
Interface Token

All Superinterfaces:
Serializable
All Known Implementing Classes:
PersistentResourceToken, SynchronizerToken

public interface Token
extends Serializable

A token in Silverpeas is an atom or a symbol, encoded in a String, that is either used to identify uniquely a resource or to stamp a resource for security reason. There is several ways of using a token in an application, but those uses are usually all related to the security. For example, the tokens can be used to authenticate and identify in a single pass a user or, as another example, to stamp a user session or a web page.

Author:
mmoquillon

Method Summary
 String getValue()
          Gets the String representation of this token.
 boolean isDefined()
          Is this token defined?
 

Method Detail

getValue

String getValue()
Gets the String representation of this token.

Returns:
the value of the token (id est its String representation).

isDefined

boolean isDefined()
Is this token defined? A token is defined if it was generated and represents correctly a well-valued token. If it is empty (a none token), then it is considered as undefined. It is expected a token can be never null and a none-token concept is used instead. This method is to check the token is not a none-token, that is to say it is well initialized.

Returns:
true if this token is well-initialized, false otherwise.


Copyright © 2016 Silverpeas. All Rights Reserved.