Search in sources :

Example 6 with Service

use of com.iggroup.oss.restdoclet.doclet.type.Service in project RESTdoclet by IG-Group.

the class ServiceConfig method getService.

/**
    * Get a service by application name and service id
    * 
    * @param applicationName
    * @param id
    * @return service
    * @throws FileNotFoundException
    * @throws JiBXException parsing error
    */
public static Service getService(final String applicationName, final String id) throws FileNotFoundException, JiBXException {
    LOGGER.debug("getService " + applicationName + " - " + id);
    Service service;
    File serviceConfigFile = new File(configPath + File.separator + applicationName + File.separator + "restdoc-service-" + id + ".xml");
    service = JiBXUtils.unmarshallService(new FileInputStream(serviceConfigFile));
    service.setContext(applicationName);
    serviceConfigFile = null;
    return service;
}
Also used : Service(com.iggroup.oss.restdoclet.doclet.type.Service) File(java.io.File) FileInputStream(java.io.FileInputStream)

Aggregations

Service (com.iggroup.oss.restdoclet.doclet.type.Service)6 Services (com.iggroup.oss.restdoclet.doclet.type.Services)3 Uri (com.iggroup.oss.restdoclet.doclet.type.Uri)3 File (java.io.File)3 FileInputStream (java.io.FileInputStream)3 ArrayList (java.util.ArrayList)2 Controller (com.iggroup.oss.restdoclet.doclet.type.Controller)1 ControllerSummary (com.iggroup.oss.restdoclet.doclet.type.ControllerSummary)1 Method (com.iggroup.oss.restdoclet.doclet.type.Method)1 ControllerTypePredicate (com.iggroup.oss.restdoclet.doclet.util.ControllerTypePredicate)1 DirectoryBuilder (com.iggroup.oss.restdoclet.plugin.io.DirectoryBuilder)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 IBindingFactory (org.jibx.runtime.IBindingFactory)1 IUnmarshallingContext (org.jibx.runtime.IUnmarshallingContext)1