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