| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| DataDictionaryService |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2011 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 1.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/ecl1.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.student.datadictionary.service; | |
| 17 | ||
| 18 | import java.util.List; | |
| 19 | import javax.jws.WebParam; | |
| 20 | import javax.jws.WebService; | |
| 21 | import javax.jws.soap.SOAPBinding; | |
| 22 | import org.kuali.student.common.dto.ContextInfo; | |
| 23 | import org.kuali.student.common.exceptions.DoesNotExistException; | |
| 24 | import org.kuali.student.common.exceptions.MissingParameterException; | |
| 25 | import org.kuali.student.common.exceptions.OperationFailedException; | |
| 26 | import org.kuali.student.common.exceptions.PermissionDeniedException; | |
| 27 | import org.kuali.student.datadictionary.dto.DictionaryEntryInfo; | |
| 28 | ||
| 29 | /** | |
| 30 | * Data Dictionary Service | |
| 31 | * | |
| 32 | * Provides a read-only view of meta data about the objects and fields on those objects | |
| 33 | * that are known to the service for which the data dictionary is included. | |
| 34 | * | |
| 35 | * The dictionary service is aligned with Rice's KRAD dictionary, as such the dictionary | |
| 36 | * structures should match up field for field. | |
| 37 | * | |
| 38 | * The Data Dictionary Service is an "included" service in that it is not expected to be a web service on it's | |
| 39 | * own but instead it's methods simply appear (are "included") on the service that includes it. | |
| 40 | * | |
| 41 | * Version: 1.0 (Dev) | |
| 42 | * | |
| 43 | * @author nwright | |
| 44 | */ | |
| 45 | @WebService(name = "DataDictionaryService", targetNamespace = "http://student.kuali.org/wsdl/datadictionary") | |
| 46 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 47 | public interface DataDictionaryService { | |
| 48 | ||
| 49 | /** | |
| 50 | * Get the list of entry keys in this dictionary | |
| 51 | * | |
| 52 | * The list of keys is stored in the ref object URI strcture | |
| 53 | * E.g http://stduent.kuali.org/LuService/CluInfo will be the objectTypeURI for the CluInfo structure | |
| 54 | * The refObjectURI has three parts:<ol> | |
| 55 | * <li>http://stduent.kuali.org/ -- which is fixed | |
| 56 | * <li>LuService -- which should match the namespace of the service in which the object is defined | |
| 57 | * <li>CluInfo -- which should match the java class's simple name | |
| 58 | * </ol> | |
| 59 | * | |
| 60 | * @param context information about the user and locale | |
| 61 | * @return a list of all the known data dictionary entry keys in the ref object URI structure. | |
| 62 | * @throws OperationFailedException if could not complete the operation | |
| 63 | * @throws MissingParameterException if entryKey is null | |
| 64 | * @throws PermissionDeniedException if user does not have permission to call this method | |
| 65 | */ | |
| 66 | public List<String> getDataDictionaryEntryKeys(@WebParam(name = "context") ContextInfo context) | |
| 67 | throws OperationFailedException, | |
| 68 | MissingParameterException, | |
| 69 | PermissionDeniedException; | |
| 70 | ||
| 71 | /** | |
| 72 | * Get the data dictionary entry for the specified entry key | |
| 73 | * | |
| 74 | * @param entryKey that identifies the dictionary entry, this is done by specifying | |
| 75 | * a refObjectURI | |
| 76 | * @param context information about the user and locale | |
| 77 | * @return the data dictionary entry key | |
| 78 | * @throws OperationFailedException if could not complete the operation | |
| 79 | * @throws MissingParameterException if entryKey is null | |
| 80 | * @throws DoesNotExistException if entryKey does not exist in the dictionary | |
| 81 | * @throws PermissionDeniedException if user does not have permission to call this method | |
| 82 | */ | |
| 83 | public DictionaryEntryInfo getDataDictionaryEntry(@WebParam(name = "entryKey") String entryKey, | |
| 84 | @WebParam(name = "context") ContextInfo context) | |
| 85 | throws OperationFailedException, | |
| 86 | MissingParameterException, | |
| 87 | PermissionDeniedException, | |
| 88 | DoesNotExistException; | |
| 89 | } |