org.silverpeas.token.persistent
Class PersistentResourceTokenGenerator

java.lang.Object
  extended by org.silverpeas.token.persistent.PersistentResourceTokenGenerator
All Implemented Interfaces:
TokenGenerator

public class PersistentResourceTokenGenerator
extends Object
implements TokenGenerator

A generator of PersistentResourceToken instances.

Author:
mmoquillon

Field Summary
static String RESOURCE_PARAM
          The parameter refers the resource for which the token is.
 
Constructor Summary
PersistentResourceTokenGenerator()
           
 
Method Summary
 PersistentResourceToken generate(TokenGenerationParameter... parameters)
          Generates a new token by taking into account any of the specified generation parameters.
<T extends Token>
T
renew(T token)
          Renews the specified token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_PARAM

public static final String RESOURCE_PARAM
The parameter refers the resource for which the token is. The value of the parameter must be an EntityReference to the resource.

See Also:
Constant Field Values
Constructor Detail

PersistentResourceTokenGenerator

public PersistentResourceTokenGenerator()
Method Detail

generate

public PersistentResourceToken generate(TokenGenerationParameter... parameters)
Description copied from interface: TokenGenerator
Generates a new token by taking into account any of the specified generation parameters.

Specified by:
generate in interface TokenGenerator
Parameters:
parameters - both the identifier and the type of the resource the token to generate has to be belong.
Returns:
a new token.
See Also:
TokenGenerator.

renew

public <T extends Token> T renew(T token)
Description copied from interface: TokenGenerator
Renews the specified token. The token value will be regenerated.

Specified by:
renew in interface TokenGenerator
Type Parameters:
T - the concrete type of the token to renew.
Parameters:
token - the token to renew.
Returns:
the renewed token.


Copyright © 2016 Silverpeas. All Rights Reserved.