View Javadoc

1   package org.kuali.rice.ksb.api.registry;
2   
3   import org.kuali.rice.core.api.mo.common.Versioned;
4   import org.kuali.rice.ksb.api.bus.ServiceConfiguration;
5   
6   /**
7    * A service descriptor includes a serialized XML representation of the
8    * {@link ServiceConfiguration} for the service.
9    * 
10   * <p>It's expected that a client of this service which needs this information
11   * will materialize this value when it's needed to obtain additional
12   * information about the configuration information for the service.  The
13   * process for materializing the information can be dependent upon the
14   * type of the {@link ServiceInfo} which contains this descriptor. 
15   * 
16   * <p>The separation of this descriptor information from the main
17   * {@link ServiceInfo} allows for clients of the registry to only load the
18   * basic information about the services in the registry, and then pull in the
19   * full descriptor for the services they actually need to invoke and work with. 
20   *
21   * @author Kuali Rice Team (rice.collab@kuali.org)
22   *
23   */
24  public interface ServiceDescriptorContract extends Versioned {
25  
26  	/**
27  	 * Returns the id of this service descriptor.  This value should be unique
28  	 * across service descriptors.  This value is generated when the service
29  	 * is published to the registry, so this value can be null if the service
30  	 * has not yet been published to the registry.
31  	 * 
32  	 * @return the id of this service descriptor, or null if the service and
33  	 * it's descriptor has not yet been published to the registry
34  	 */
35  	String getId();
36  	
37  	/**
38  	 * Returns an XML value which can be used to materialize the {@link ServiceConfiguration}
39  	 * for the service.
40  	 * 
41  	 * @return the XML representation of the {@link ServiceConfiguration} for the service,
42  	 * should never return a null or blank value
43  	 */
44  	String getDescriptor();
45  	
46  }