001 package com.allaire.cfx; 002 003 004 005 /** 006 * Alternative Implementation of Jeremy Allaire's Request Interface 007 */ 008 public interface Request { 009 010 /** 011 * checks if attribute with this key exists 012 * @param key key to check 013 * @return has key or not 014 */ 015 public boolean attributeExists(String key); 016 017 /** 018 * @return if tags has set [debug] attribute 019 */ 020 public boolean debug(); 021 022 /** 023 * returns attribute matching key 024 * @param key key to get 025 * @return value to key 026 */ 027 public String getAttribute(String key); 028 029 /** 030 * returns attribute matching key 031 * @param key key to get 032 * @param defaultValue return this value if key not exist 033 * @return value to key 034 */ 035 public String getAttribute(String key, String defaultValue); 036 037 /** 038 * return all sattribute keys 039 * @return all keys 040 */ 041 public String[] getAttributeList(); 042 043 /** 044 * returns attribute as int matching key 045 * @param key key to get 046 * @return value to key 047 * @throws NumberFormatException 048 */ 049 public int getIntAttribute(String key) throws NumberFormatException; 050 051 /** 052 * returns attribute as int matching key 053 * @param key key to get 054 * @param defaultValue return this value if key not exist 055 * @return value to key 056 */ 057 public int getIntAttribute(String key, int defaultValue); 058 059 /** 060 * return given query 061 * @return return given query 062 */ 063 public Query getQuery(); 064 065 /** 066 * returns all the settings 067 * @param key 068 * @return settings 069 */ 070 public String getSetting(String key); 071 072 }