View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the
5    * "License"); you may not use this file except in compliance with the
6    * License.  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
13   * implied.  See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  
17  package org.kuali.student.r2.common.datadictionary.service;
18  
19  import java.util.List;
20  import javax.jws.WebParam;
21  import javax.jws.WebService;
22  import javax.jws.soap.SOAPBinding;
23  
24  import org.kuali.student.r2.common.datadictionary.dto.DictionaryEntryInfo;
25  import org.kuali.student.r2.common.dto.ContextInfo;
26  
27  import org.kuali.student.r2.common.exceptions.DoesNotExistException;
28  import org.kuali.student.r2.common.exceptions.MissingParameterException;
29  import org.kuali.student.r2.common.exceptions.OperationFailedException;
30  import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
31  import org.kuali.student.r2.common.util.constants.DataDictionaryServiceConstants;
32  
33  /**
34   * Data Dictionary Service
35   *
36   * Provides a read-only view of meta data about the objects and fields
37   * on those objects that are known to the service for which the data
38   * dictionary is included.
39   *
40   * The dictionary service is aligned with Rice's KRAD dictionary, as
41   * such the dictionary structures should match up field for field.
42   *
43   * The Data Dictionary Service is an "included" service in that it is
44   * not expected to be a web service on it's own but instead it's
45   * methods simply appear (are "included") on the service that includes
46   * it.
47   *
48   * @version 0.0.7
49   *
50   * @author nwright
51   */
52  
53  @WebService(name = "DataDictionaryService", targetNamespace = DataDictionaryServiceConstants.NAMESPACE)
54  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
55  
56  public interface DataDictionaryService {
57  
58      /**
59       * Get the list of entry keys in this dictionary.
60       *
61       * The list of keys is stored in the ref object URI strcture E.g
62       * http://student.kuali.org/wsdl/cluService/CluInfo will be the
63       * objectTypeURI for the CluInfo structure The refObjectURI has
64       * three parts:<ol> <li>http://student.kuali.org/wsdl -- which is
65       * fixed <li>cluService -- which should match the namespace of the
66       * service in which the object is defined <li>CluInfo -- which
67       * should match the java class's simple name </ol>
68       *
69       * @param contextInfo information containing the principalId and
70       *        locale information about the caller of service operation
71       * @return a list of all the known data dictionary entry keys in
72       *         the ref object URI structure.
73       * @throws OperationFailedException unable to complete request
74       * @throws MissingParameterException contextInfo is missing or null
75       * @throws PermissionDeniedException an authorization failure occurred
76       */
77      public List<String> getDataDictionaryEntryKeys(@WebParam(name = "contextInfo") ContextInfo contextInfo) throws OperationFailedException, MissingParameterException, PermissionDeniedException;
78  
79      /**
80       * Get the data dictionary entry for the specified entry key.
81       * 
82       * @param entryKey the identifier for the dictionary entry, this
83       *        is done by specifying a refObjectURI
84       * @param contextInfo information containing the principalId and
85       *        locale information about the caller of service operation
86       * @return the data dictionary entry requested
87       * @throws OperationFailedException unable to complete request
88       * @throws MissingParameterException entryKey or contextInfo is
89       *         missing or null
90       * @throws DoesNotExistException entryKey is not found
91       * @throws PermissionDeniedException an authorization failure occurred
92       */
93      public DictionaryEntryInfo getDataDictionaryEntry(@WebParam(name = "entryKey") String entryKey, @WebParam(name = "contextInfo") ContextInfo contextInfo) throws OperationFailedException, MissingParameterException, PermissionDeniedException, DoesNotExistException;
94  }