public static void createToken ( Controller controller , String tokenName , int secondsOfTimeOut ) { if ( tokenCache == null ) { String tokenId = String . valueOf ( random . nextLong ( ) ) ; controller . setAttr ( tokenName , tokenId ) ; controller . setSessionAttr ( tokenName , tokenId ) ; createTokenHiddenField ( controller , tokenName , tokenId ) ; } else { createTokenUseTokenIdGenerator ( controller , tokenName , secondsOfTimeOut ) ; } }
Create Token .