class TokenService {

    public TokenInfo updateTokenFriendlyName(String tokenId, String friendlyName) throws TokenNotFoundException,
            ActionNotPossibleException {

        // check that updating friendly name is possible
        TokenInfo tokenInfo = getToken(tokenId);
        auditDataHelper.put(tokenInfo);
        auditDataHelper.put(TOKEN_FRIENDLY_NAME, friendlyName); // Override old value with the new
        possibleActionsRuleEngine.requirePossibleTokenAction(PossibleActionEnum.EDIT_FRIENDLY_NAME,
                tokenInfo);

        try {
            signerProxyFacade.setTokenFriendlyName(tokenId, friendlyName);
            tokenInfo = signerProxyFacade.getToken(tokenId);
        } catch (CodedException e) {
            if (isCausedByTokenNotFound(e)) {
                throw new TokenNotFoundException(e);
            } else {
                throw e;
            }
        } catch (Exception other) {
            throw new SignerNotReachableException("update token friendly name failed", other);
        }
        return tokenInfo;
    }

    @Autowired public  TokenService(SignerProxyFacade signerProxyFacade,
            PossibleActionsRuleEngine possibleActionsRuleEngine,
            AuditDataHelper auditDataHelper);

}