Exemplo n.º 1
0
 /** Puts a response loopback path together */
 private String buildResponseLoopbackPath(
     String root, String serviceName, EEnvironment environment) throws ServiceException {
   String result = "";
   String servicePath = FilenameUtils.concat(root, serviceName);
   String environmentPath = FilenameUtils.concat(servicePath, environment.value());
   String loopbackPath = FilenameUtils.concat(environmentPath, "Loopbacks");
   String loopbackResponse = FilenameUtils.concat(loopbackPath, "Response");
   if (folderExists(loopbackResponse)) result = loopbackResponse;
   else {
     try {
       createLogFolder(servicePath);
       createLogFolder(environmentPath);
       createLogFolder(loopbackPath);
       createLogFolder(loopbackResponse);
     } catch (IOException e) {
       throw new ServiceException(
           "COR006#Could not build path(s);"
               + servicePath
               + ":"
               + environmentPath
               + ":"
               + loopbackPath);
     }
   }
   return result;
 }
Exemplo n.º 2
0
 /** Builds a logging path in the format <logRoot>/<service-name>/<environment>/ */
 private String buildLogPath(String root, String serviceName, EEnvironment environment)
     throws ServiceException {
   String servicePath = buildLogPath(root, serviceName);
   String environmentPath = FilenameUtils.concat(servicePath, environment.value());
   try {
     createLogFolder(environmentPath);
   } catch (IOException e) {
     throw new ServiceException(
         "COR006#Could not build path(s);" + servicePath + ":" + environmentPath, e);
   }
   return environmentPath;
 }