if (log.isDebugEnabled()) {
log.debug("Restoring the API with name : " + artifactName + " : Started");
}
try {
API api = getSynapseConfiguration().getAPI(artifactName);
OMElement apiElement = APISerializer.serializeAPI(api);
if (api.getFileName() != null) {
String fileName = getServerConfigurationInformation().getSynapseXMLLocation()
+ File.separator + MultiXMLConfigurationBuilder.REST_API_DIR
+ File.separator + api.getFileName();
writeToFile(apiElement, fileName);
if (log.isDebugEnabled()) {
log.debug("Restoring the API with name : " + artifactName + " : Completed");
}
log.info("API named '" + artifactName + "' has been restored");