001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php 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, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.uif.util; 017 018import org.kuali.rice.krad.inquiry.Inquirable; 019import org.kuali.rice.krad.uif.service.ViewDictionaryService; 020import org.kuali.rice.krad.uif.view.ViewSessionPolicy; 021import org.kuali.rice.krad.lookup.LookupForm; 022 023/** 024 * Provides basic view dictionary service functionality for unit tests. 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 */ 028public class TestViewDictionaryService implements ViewDictionaryService { 029 030 /** 031 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#getInquirable(java.lang.Class, java.lang.String) 032 */ 033 @Override 034 public Inquirable getInquirable(Class<?> dataObjectClass, String viewName) { 035 return new MockInquirable(dataObjectClass, viewName); 036 } 037 038 /** 039 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isInquirable(java.lang.Class) 040 */ 041 @Override 042 public boolean isInquirable(Class<?> dataObjectClass) { 043 return false; 044 } 045 046 /** 047 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isLookupable(java.lang.Class) 048 */ 049 @Override 050 public boolean isLookupable(Class<?> dataObjectClass) { 051 return false; 052 } 053 054 /** 055 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isMaintainable(java.lang.Class) 056 */ 057 @Override 058 public boolean isMaintainable(Class<?> dataObjectClass) { 059 return false; 060 } 061 062 /** 063 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#getResultSetLimitForLookup(java.lang.Class, org.kuali.rice.krad.web.form.LookupForm) 064 */ 065 @Override 066 public Integer getResultSetLimitForLookup(Class<?> dataObjectClass, LookupForm form) { 067 return 0; 068 } 069 070 /** 071 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#getViewSessionPolicy(java.lang.String) 072 */ 073 @Override 074 public ViewSessionPolicy getViewSessionPolicy(String viewId) { 075 return null; 076 } 077 078 /** 079 * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isSessionStorageEnabled(java.lang.String) 080 */ 081 @Override 082 public boolean isSessionStorageEnabled(String viewId) { 083 return false; 084 } 085 086}