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/**
020 * URLにトークンを付加するためのインタフェイスです
021 * 各種のトークンをサポートするには、CreateToken インターフェースを implements した
022 * クラスを作成してください。
023 * CreateToken 自体はlinkTagクラスよりアクセスされます。
024 *
025 *
026 * @og.group 画面表示
027 * @og.rev 5.8.2.1 (2014/12/13) 新規作成
028 *
029 * @version  4.0
030 * @author       Kazuhiko Hasegawa
031 * @since    JDK5.0,
032 */
033public interface CreateToken {
034
035        
036        /**
037         * トークン付のURLを返します。
038         *
039         * @param       inURL   トークンを付加するURL
040         * @param       time    有効期限(millis)
041         * @param       user    ユーザ
042         * 
043         * @return      トークン付URL
044         */
045        String generateURL( String inURL, long time, String user ) ;
046        
047        /**
048         * トークン付のURLを返します。
049         *
050         * @param       inURL トークンを付加するURL
051         * @param       time 有効期限(millis)
052         * @param       param パラメータ
053         */
054        String generateURL( String inURL, long time, String user, String[] param ) ;
055        
056        /**
057         * Aタグの文字列を解析して、トークンを付加します。
058         *
059         * @param   tag Aタグ文字列
060         * @param   time 有効期限(millis)
061         *
062         * @return  トークンが付加されたAタグ文字列
063         */
064        String embedToken( final String tag, final long time, final String user  );
065        
066        /**
067         * Aタグの文字列を解析して、トークンを付加します。
068         *
069         * @param   tag Aタグ文字列
070         * @param   time 有効期限(millis)
071         *
072         * @return  トークンが付加されたAタグ文字列
073         */
074        String embedToken( final String tag, final long time, final String user, final String[] param  );
075
076
077}