View Javadoc
1   /*
2    * Copyright 2014 The Apache Software Foundation.
3    *
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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  
17  package org.apache.juddi.validation.vsv;
18  
19  import java.util.List;
20  import org.apache.juddi.api.impl.UDDIValueSetCachingImpl;
21  import org.apache.juddi.api.impl.UDDIValueSetValidationImpl;
22  import org.uddi.api_v3.BindingTemplate;
23  import org.uddi.api_v3.BusinessEntity;
24  import org.uddi.api_v3.BusinessService;
25  import org.uddi.api_v3.PublisherAssertion;
26  import org.uddi.api_v3.TModel;
27  import org.uddi.api_v3.TModelInstanceInfo;
28  import org.uddi.v3_service.DispositionReportFaultMessage;
29  
30  /**
31   * This is the value set validator interface. It enables you to define your own validation rules for tModel Keyed References.
32   * To use this, define a tModel containing the following 
33   * <pre>&lt;categoryBag&gt;
34   * &lt;keyedReference keyName=&quot;&quot;
35   * keyValue=&quot;uddi:juddi.apache.org:servicebindings-valueset-cp&quot;
36   * tModelKey=&quot;uddi:uddi.org:identifier:validatedby&quot;/&gt;
37   * &lt;/categoryBag&gt;
38   * </pre>Where uddi:juddi.apache.org:servicebindings-valueset-cp
39   * is the binding key of the service implementing the VSV API (this service).
40   * <Br><BR>
41   * From there, you need to create a class that either implements
42   * {@link ValueSetValidator} or extends {@link AbstractSimpleValidator}. It must
43   * be in the package named org.apache.juddi.validation.vsv and must by named
44   * following the convention outlined in {@link #ConvertKeyToClass(java.lang.String)
45   * @author Alex O'Ree
46   * @since 3.2.1
47   * @see AbstractSimpleValidator
48   * @see UDDIValueSetValidationImpl
49   * @see UDDIValueSetCachingImpl
50   */
51  public interface ValueSetValidator {
52  
53          public void validateTmodelInstanceDetails(List<TModelInstanceInfo> tModelInstanceInfo, String xpath) throws DispositionReportFaultMessage;
54  
55          public void validateValuesBindingTemplate(List<BindingTemplate> items, String xpath) throws DispositionReportFaultMessage;
56  
57          public void validateValuesBusinessEntity(List<BusinessEntity> items) throws DispositionReportFaultMessage;
58  
59          public void validateValuesBusinessService(List<BusinessService> items, String xpath) throws DispositionReportFaultMessage;
60  
61          public void validateValuesPublisherAssertion(List<PublisherAssertion> items) throws DispositionReportFaultMessage;
62  
63          public void validateValuesTModel(List<TModel> items) throws DispositionReportFaultMessage;
64          
65          public List<String> getValidValues();
66  }