📄 rightscache.java
字号:
/******************************************************************************* * Copyright (C) 2002, 2003 * ingenieurbuero fuer innovative informationstechnik (iiit) * Dipl.-Ing. Joerg Beckmann, Dortmund, Germany * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * or look at http://www.gnu.org/copleft/lesser.html. * * version $Id: RightsCache.java,v 1.4 2003/04/13 21:13:38 joerg Exp $ ******************************************************************************/package de.iiit.access.common.cache;import de.iiit.cache.*;import java.util.*;/** A cache implementation holding results for one user. * @version $Revision: 1.4 $ $Date: 2003/04/13 21:13:38 $ */public class RightsCache extends GenericInvalidationCache{ /** CVS Version Tag */ private static final String vcid = "$Id: RightsCache.java,v 1.4 2003/04/13 21:13:38 joerg Exp $"; /** Creates a new instance of RightsCache */ public RightsCache() { } /** Creates a new instance of RightsCache * @param invalidationTimeout the period of time after which a specific cache entry will be ignored and * deleted. */ public RightsCache(long invalidationTimeout) { super(invalidationTimeout); } /** Adds the result of one expression to the cache. * @param expression The expression * @param isAllowed The result of the expression */ public void addRight(String expression, boolean isAllowed) { addElement(expression, new Boolean(isAllowed)); } /** Retrieves the result of an expression from the cache. * @param expression The expression * @throws CacheFaultException if the result is not found in the cache * @return the result of the expression */ public boolean getRight(String expression) throws CacheFaultException { return ((Boolean) getElement(expression)).booleanValue(); }}/** * $Log: RightsCache.java,v $ * Revision 1.4 2003/04/13 21:13:38 joerg * Copyright statements changed to LGPL * * Revision 1.3 2003/04/13 20:16:41 joerg * Package structure modified * * Revision 1.2 2003/01/01 21:04:17 joerg * Copyright-Statement aktualisiert * * Revision 1.1 2002/12/19 15:24:23 joerg * Reparatur des CVS-Repositories * * Revision 1.3 2002/12/09 19:29:17 joerg * Versionsdaten in allen JavaDoc-Klassenbeschreibungen ergaenzt * * Revision 1.2 2002/12/09 16:32:26 joerg * JavaDoc Kommentare ergaenzt * * Revision 1.1 2002/11/02 18:23:32 joerg * Klasse verschoben ins Package 'cache' * * Revision 1.1 2002/11/01 21:36:47 joerg * Version mit funktionierenden 1st-level Cache * */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -