Coverage Report - org.kuali.rice.krad.datadictionary.DataDictionaryMapper
 
Classes in this File Line Coverage Branch Coverage Complexity
DataDictionaryMapper
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2010 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.datadictionary;
 17  
 
 18  
 import org.kuali.rice.krad.uif.container.View;
 19  
 
 20  
 import java.util.List;
 21  
 import java.util.Map;
 22  
 import java.util.Set;
 23  
 
 24  
 /**
 25  
  * Maps one Document type to other document Type.
 26  
  * 
 27  
  * This interface can be used to implement KNS to workflow document type
 28  
  * mapping relationships other than one-to-one.
 29  
  * 
 30  
  * @author mpk35
 31  
  *
 32  
  */
 33  
 public interface DataDictionaryMapper {
 34  
         /**
 35  
          * This method gets the business object entry for a concrete class
 36  
          * 
 37  
          * @param className
 38  
          * @return
 39  
          */
 40  
     @Deprecated
 41  
         public BusinessObjectEntry getBusinessObjectEntryForConcreteClass(DataDictionaryIndex index, String className);
 42  
         
 43  
         /**
 44  
      * This method gets the DataOjectEntry (or subclass) for a concrete class
 45  
      * 
 46  
      * @param className
 47  
      * @return the DataObjectEntry for the class or null if not found
 48  
      */
 49  
     public DataObjectEntry getDataObjectEntryForConcreteClass(DataDictionaryIndex index, String className);
 50  
     
 51  
     
 52  
         /**
 53  
          * @return List of businessObject classnames
 54  
          */
 55  
     @Deprecated
 56  
         public List<String> getBusinessObjectClassNames(DataDictionaryIndex index);
 57  
 
 58  
         /**
 59  
          * @param className
 60  
          * @return BusinessObjectEntry for the named class, or null if none exists
 61  
          */
 62  
         @Deprecated
 63  
         public BusinessObjectEntry getBusinessObjectEntry(DataDictionaryIndex index, String className );
 64  
 
 65  
         /**
 66  
      * @param className
 67  
      * @return DataObjectEntry for the named class, or null if none exists
 68  
      */
 69  
     public DataObjectEntry getDataObjectEntry(DataDictionaryIndex index, String className );
 70  
 
 71  
         /**
 72  
          * @return Map of (classname, BusinessObjectEntry) pairs
 73  
          */
 74  
     @Deprecated
 75  
         public Map<String, BusinessObjectEntry> getBusinessObjectEntries(DataDictionaryIndex index);
 76  
         
 77  
         /**
 78  
          * @param className
 79  
          * @return DataDictionaryEntryBase for the named class, or null if none
 80  
          *         exists
 81  
          */
 82  
         public DataDictionaryEntry getDictionaryObjectEntry(DataDictionaryIndex index, String className);
 83  
         
 84  
         /**
 85  
          * Returns the KNS document entry for the given lookup key.  The documentTypeDDKey is interpreted
 86  
          * successively in the following ways until a mapping is found (or none if found):
 87  
          * <ol>
 88  
          * <li>KEW/workflow document type</li>
 89  
          * <li>business object class name</li>
 90  
          * <li>maintainable class name</li>
 91  
          * </ol>
 92  
          * This mapping is compiled when DataDictionary files are parsed on startup (or demand).  Currently this
 93  
          * means the mapping is static, and one-to-one (one KNS document maps directly to one and only
 94  
          * one key).
 95  
          * 
 96  
          * @param documentTypeDDKey the KEW/workflow document type name
 97  
          * @return the KNS DocumentEntry if it exists
 98  
          */
 99  
         public DocumentEntry getDocumentEntry(DataDictionaryIndex index, String documentTypeDDKey);
 100  
 
 101  
         /**
 102  
          * Note: only MaintenanceDocuments are indexed by businessObject Class
 103  
          * 
 104  
          * This is a special case that is referenced in one location. Do we need
 105  
          * another map for this stuff??
 106  
          * 
 107  
          * @param businessObjectClass
 108  
          * @return DocumentEntry associated with the given Class, or null if there
 109  
          *         is none
 110  
          */
 111  
         public MaintenanceDocumentEntry getMaintenanceDocumentEntryForBusinessObjectClass(DataDictionaryIndex index, Class<?> businessObjectClass);
 112  
                 
 113  
         public Map<String, DocumentEntry> getDocumentEntries(DataDictionaryIndex index);
 114  
 
 115  
         public Set<InactivationBlockingMetadata> getAllInactivationBlockingMetadatas(DataDictionaryIndex index, Class<?> blockedClass);
 116  
         
 117  
         /**
 118  
          * Returns mapped document type based on the given document type.
 119  
          * 
 120  
          * @param documentType
 121  
          * @return new document type or null if given documentType was not found.
 122  
          */
 123  
         public String getDocumentTypeName(DataDictionaryIndex index, String documentTypeName);
 124  
         
 125  
         /**
 126  
          * Returns mapped document type class based on the given document type.
 127  
          * 
 128  
          * @param documentType
 129  
          * @return the class of the mapped document type or null if given documentType was not found.
 130  
          */
 131  
         //public Class getDocumentTypeClass(String documentTypeName);
 132  
         
 133  
         /**
 134  
          * Returns the View entry identified by the given id
 135  
          * 
 136  
          * @param index - the view dictionary index
 137  
          * @param viewId - unique id for view
 138  
          * @return View instance associated with the id
 139  
          */
 140  
         public View getViewById(UifDictionaryIndex index, String viewId);
 141  
         
 142  
         /**
 143  
          * Called to retrieve a <code>View</code> instance that is of the given type
 144  
          * based on the index key
 145  
          * 
 146  
          * @param index - the view dictionary index
 147  
          * @param viewTypeName
 148  
          *            - type name for the view
 149  
          * @param indexKey
 150  
          *            - Map of index key parameters, these are the parameters the
 151  
          *            indexer used to index the view initially and needs to identify
 152  
          *            an unique view instance
 153  
          * @return View instance that matches the given index
 154  
          */
 155  
         public View getViewByTypeIndex(UifDictionaryIndex index, String viewTypeName, Map<String, String> indexKey);
 156  
         
 157  
         /**
 158  
          * Gets all <code>View</code> prototypes configured for the given view type
 159  
          * name
 160  
          * 
 161  
          * @param index - the view dictionary index
 162  
          * @param viewTypeName
 163  
          *            - view type name to retrieve
 164  
          * @return List<View> view prototypes with the given type name, or empty
 165  
          *         list
 166  
          */
 167  
         public List<View> getViewsForType(UifDictionaryIndex index, String viewTypeName);
 168  
 }