001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.ksb.api.registry;
017
018import org.kuali.rice.core.api.mo.common.Versioned;
019import org.kuali.rice.ksb.api.bus.ServiceConfiguration;
020
021/**
022 * A service descriptor includes a serialized XML representation of the
023 * {@link ServiceConfiguration} for the service.
024 * 
025 * <p>It's expected that a client of this service which needs this information
026 * will materialize this value when it's needed to obtain additional
027 * information about the configuration information for the service.  The
028 * process for materializing the information can be dependent upon the
029 * type of the {@link ServiceInfo} which contains this descriptor. 
030 * 
031 * <p>The separation of this descriptor information from the main
032 * {@link ServiceInfo} allows for clients of the registry to only load the
033 * basic information about the services in the registry, and then pull in the
034 * full descriptor for the services they actually need to invoke and work with. 
035 *
036 * @author Kuali Rice Team (rice.collab@kuali.org)
037 *
038 */
039public interface ServiceDescriptorContract extends Versioned {
040
041        /**
042         * Returns the id of this service descriptor.  This value should be unique
043         * across service descriptors.  This value is generated when the service
044         * is published to the registry, so this value can be null if the service
045         * has not yet been published to the registry.
046         * 
047         * @return the id of this service descriptor, or null if the service and
048         * it's descriptor has not yet been published to the registry
049         */
050        String getId();
051        
052        /**
053         * Returns an XML value which can be used to materialize the {@link ServiceConfiguration}
054         * for the service.
055         * 
056         * @return the XML representation of the {@link ServiceConfiguration} for the service,
057         * should never return a null or blank value
058         */
059        String getDescriptor();
060
061    /**
062     * Deprecated: Will always return null as service descriptors have no version number column. This was included on
063     * the contract interface by mistake during the original implementation.
064     *
065     * @return always returns null
066     * @deprecated always returns null
067     */
068    @Deprecated
069    @Override
070    Long getVersionNumber();
071
072
073
074}