View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.uif.util;
17  
18  import org.kuali.rice.krad.inquiry.Inquirable;
19  import org.kuali.rice.krad.uif.service.ViewDictionaryService;
20  import org.kuali.rice.krad.uif.view.ViewSessionPolicy;
21  import org.kuali.rice.krad.lookup.LookupForm;
22  
23  /**
24   * Provides basic view dictionary service functionality for unit tests. 
25   * 
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public class TestViewDictionaryService implements ViewDictionaryService {
29  
30      /**
31       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#getInquirable(java.lang.Class, java.lang.String)
32       */
33      @Override
34      public Inquirable getInquirable(Class<?> dataObjectClass, String viewName) {
35          return new MockInquirable(dataObjectClass, viewName);
36      }
37  
38      /**
39       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isInquirable(java.lang.Class)
40       */
41      @Override
42      public boolean isInquirable(Class<?> dataObjectClass) {
43          return false;
44      }
45  
46      /**
47       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isLookupable(java.lang.Class)
48       */
49      @Override
50      public boolean isLookupable(Class<?> dataObjectClass) {
51          return false;
52      }
53  
54      /**
55       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isMaintainable(java.lang.Class)
56       */
57      @Override
58      public boolean isMaintainable(Class<?> dataObjectClass) {
59          return false;
60      }
61  
62      /**
63       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#getResultSetLimitForLookup(java.lang.Class, org.kuali.rice.krad.web.form.LookupForm)
64       */
65      @Override
66      public Integer getResultSetLimitForLookup(Class<?> dataObjectClass, LookupForm form) {
67          return 0;
68      }
69  
70      /**
71       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#getViewSessionPolicy(java.lang.String)
72       */
73      @Override
74      public ViewSessionPolicy getViewSessionPolicy(String viewId) {
75          return null;
76      }
77  
78      /**
79       * @see org.kuali.rice.krad.uif.service.ViewDictionaryService#isSessionStorageEnabled(java.lang.String)
80       */
81      @Override
82      public boolean isSessionStorageEnabled(String viewId) {
83          return false;
84      }
85  
86  }