001/* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016package org.opengion.hayabusa.html; 017 018/** 019 * URLにトークンを付加するためのインタフェイスです 020 * 各種のトークンをサポートするには、CreateToken インターフェースを implements した 021 * クラスを作成してください。 022 * CreateToken 自体はlinkTagクラスよりアクセスされます。 023 * 024 * 025 * @og.group 画面表示 026 * @og.rev 5.8.2.1 (2014/12/13) 新規作成 027 * 028 * @version 4.0 029 * @author Kazuhiko Hasegawa 030 * @since JDK5.0, 031 */ 032public interface CreateToken { 033 034 /** 035 * トークン付のURLを返します。 036 * 037 * @og.rev 6.1.1.0 (2015/01/17) 可変長配列にメソッドを統合。 038 * 039 * @param inURL トークンを付加するURL 040 * @param time 有効期限(millis) 041 * @param user ユーザ 042 * @param param パラメータ配列(可変長引数) 043 * 044 * @return トークン付URL 045 */ 046 String generateURL( final String inURL, final long time, final String user, final String... param ) ; 047 048 /** 049 * Aタグの文字列を解析して、トークンを付加します。 050 * 051 * @og.rev 6.1.1.0 (2015/01/17) 可変長配列にメソッドを統合。 052 * 053 * @param tag Aタグ文字列 054 * @param time 有効期限(millis) 055 * @param user ユーザ 056 * @param param パラメータ配列(可変長引数) 057 * 058 * @return トークンが付加されたAタグ文字列 059 */ 060 String embedToken( final String tag, final long time, final String user, final String... param ); 061}