|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.web.mock.TokenServiceMockWrapper
@Named(value="persistentResourceTokenService") public class TokenServiceMockWrapper
| Constructor Summary | |
|---|---|
TokenServiceMockWrapper()
Default constructor into which mock is initialized |
|
| Method Summary | |
|---|---|
PersistentResourceToken |
get(EntityReference ref)
Gets the token of the resource referred by the specified EntityReference. |
PersistentResourceToken |
get(String tokenValue)
Gets the token with the specified value from the data source. |
PersistentResourceTokenService |
getTokenServiceMock()
Gets the mock |
PersistentResourceToken |
initialize(EntityReference ref)
Initializes the token of the resource referred by the specified EntityReference. |
void |
remove(EntityReference ref)
Removes quietly the token of the resource referred by the specified entity reference. |
void |
remove(String tokenValue)
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 TokenServiceMockWrapper()
| Method Detail |
|---|
public PersistentResourceTokenService getTokenServiceMock()
public PersistentResourceToken initialize(EntityReference ref)
throws TokenException
PersistentResourceTokenServiceEntityReference. If the
resource has already a token, this token is then renewed.
initialize in interface PersistentResourceTokenServiceref - a reference to the resource for which a token will be initialized.
TokenException - if an unexpected error occurs while initializing a token.public PersistentResourceToken get(EntityReference ref)
PersistentResourceTokenServiceEntityReference. If no token
exists for the resource, then PersistentResourceToken.NoneToken is returned.
get in interface PersistentResourceTokenServiceref - a reference to the resource for which a token will be initialized.
public PersistentResourceToken get(String tokenValue)
PersistentResourceTokenServicePersistentResourceToken.NoneToken is returned.
get in interface PersistentResourceTokenServicetokenValue - the value of the token to get.
public void remove(EntityReference ref)
PersistentResourceTokenService
remove in interface PersistentResourceTokenServiceref - the resource for which the token has to be removed.public void remove(String tokenValue)
PersistentResourceTokenService
remove in interface PersistentResourceTokenServicetokenValue - the String representation of the token to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||