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  
 /**
 23  
  * Maps one Document type to other document Type.
 24  
  * 
 25  
  * This interface can be used to implement KNS to workflow document type
 26  
  * mapping relationships other than one-to-one.
 27  
  * 
 28  
  * @author mpk35
 29  
  *
 30  
  */
 31  
 public interface DataDictionaryMapper {
 32  
         /**
 33  
          * This method gets the business object entry for a concrete class
 34  
          * 
 35  
          * @param className
 36  
          * @return
 37  
          */
 38  
         public BusinessObjectEntry getBusinessObjectEntryForConcreteClass(DataDictionaryIndex index, String className);
 39  
         
 40  
         /**
 41  
          * @return List of businessObject classnames
 42  
          */
 43  
         public List<String> getBusinessObjectClassNames(DataDictionaryIndex index);
 44  
 
 45  
         /**
 46  
          * @param className
 47  
          * @return BusinessObjectEntry for the named class, or null if none exists
 48  
          */
 49  
         public BusinessObjectEntry getBusinessObjectEntry(DataDictionaryIndex index, String className );
 50  
 
 51  
         /**
 52  
          * @return Map of (classname, BusinessObjectEntry) pairs
 53  
          */
 54  
         public Map<String, BusinessObjectEntry> getBusinessObjectEntries(DataDictionaryIndex index);
 55  
         
 56  
         /**
 57  
          * @param className
 58  
          * @return DataDictionaryEntryBase for the named class, or null if none
 59  
          *         exists
 60  
          */
 61  
         public DataDictionaryEntry getDictionaryObjectEntry(DataDictionaryIndex index, String className);
 62  
         
 63  
         /**
 64  
          * Returns the KNS document entry for the given lookup key.  The documentTypeDDKey is interpreted
 65  
          * successively in the following ways until a mapping is found (or none if found):
 66  
          * <ol>
 67  
          * <li>KEW/workflow document type</li>
 68  
          * <li>business object class name</li>
 69  
          * <li>maintainable class name</li>
 70  
          * </ol>
 71  
          * This mapping is compiled when DataDictionary files are parsed on startup (or demand).  Currently this
 72  
          * means the mapping is static, and one-to-one (one KNS document maps directly to one and only
 73  
          * one key).
 74  
          * 
 75  
          * @param documentTypeDDKey the KEW/workflow document type name
 76  
          * @return the KNS DocumentEntry if it exists
 77  
          */
 78  
         public DocumentEntry getDocumentEntry(DataDictionaryIndex index, String documentTypeDDKey);
 79  
 
 80  
         /**
 81  
          * Note: only MaintenanceDocuments are indexed by businessObject Class
 82  
          * 
 83  
          * This is a special case that is referenced in one location. Do we need
 84  
          * another map for this stuff??
 85  
          * 
 86  
          * @param businessObjectClass
 87  
          * @return DocumentEntry associated with the given Class, or null if there
 88  
          *         is none
 89  
          */
 90  
         public MaintenanceDocumentEntry getMaintenanceDocumentEntryForBusinessObjectClass(DataDictionaryIndex index, Class businessObjectClass);
 91  
                 
 92  
         public Map<String, DocumentEntry> getDocumentEntries(DataDictionaryIndex index);
 93  
 
 94  
         public Set<InactivationBlockingMetadata> getAllInactivationBlockingMetadatas(DataDictionaryIndex index, Class blockedClass);
 95  
         
 96  
         /**
 97  
          * Returns mapped document type based on the given document type.
 98  
          * 
 99  
          * @param documentType
 100  
          * @return new document type or null if given documentType was not found.
 101  
          */
 102  
         public String getDocumentTypeName(DataDictionaryIndex index, String documentTypeName);
 103  
         
 104  
         /**
 105  
          * Returns mapped document type class based on the given document type.
 106  
          * 
 107  
          * @param documentType
 108  
          * @return the class of the mapped document type or null if given documentType was not found.
 109  
          */
 110  
         //public Class getDocumentTypeClass(String documentTypeName);
 111  
 }