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;
}
Aggregations