|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.silverpeas.token.persistent.service.DefaultTokenService
@Service(value="persistentResourceTokenService") public class DefaultTokenService
The default implementation of the PersistentResourceTokenService
interface.
Constructor Summary | |
---|---|
DefaultTokenService()
|
Method Summary | |
---|---|
PersistentResourceToken |
get(EntityReference resource)
Gets the token of the resource referred by the specified EntityReference . |
PersistentResourceToken |
get(String token)
Gets the token with the specified value from the data source. |
PersistentResourceToken |
initialize(EntityReference resource)
Initializes the token of the resource referred by the specified EntityReference . |
void |
remove(EntityReference resource)
Removes quietly the token of the resource referred by the specified entity reference. |
void |
remove(String token)
Removes quietly the specified token. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTokenService()
Method Detail |
---|
@Transactional(propagation=REQUIRED) public PersistentResourceToken initialize(EntityReference resource) throws TokenException
PersistentResourceTokenService
EntityReference
. If the
resource has already a token, this token is then renewed.
initialize
in interface PersistentResourceTokenService
resource
- a reference to the resource for which a token will be initialized.
TokenException
- if an error occurs while initializing a token.PersistentResourceTokenService.initialize(org.silverpeas.EntityReference)
public PersistentResourceToken get(EntityReference resource)
PersistentResourceTokenService
EntityReference
. If no token
exists for the resource, then PersistentResourceToken.NoneToken
is returned.
get
in interface PersistentResourceTokenService
resource
- a reference to the resource for which a token will be initialized.
PersistentResourceTokenService.get(org.silverpeas.EntityReference)
public PersistentResourceToken get(String token)
PersistentResourceTokenService
PersistentResourceToken.NoneToken
is returned.
get
in interface PersistentResourceTokenService
token
- the value of the token to get.
PersistentResourceTokenService.get(java.lang.String)
@Transactional(propagation=REQUIRED) public void remove(EntityReference resource)
PersistentResourceTokenService
remove
in interface PersistentResourceTokenService
resource
- the resource for which the token has to be removed.PersistentResourceTokenService.remove(org.silverpeas.EntityReference)
@Transactional(propagation=REQUIRED) public void remove(String token)
PersistentResourceTokenService
remove
in interface PersistentResourceTokenService
token
- the String representation of the token to remove.PersistentResourceTokenService.remove(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |