log.error("Access to Repository has failed");
throw new NullPointerException("Access to Repository has failed");
}
String base = PentahoSystem.getApplicationContext().getSolutionRootPath();
String parentPath = ActionInfo.buildSolutionPath(solution, path, "");
ISolutionFile parentFile = repository.getSolutionFile(parentPath, ISolutionRepository.ACTION_CREATE);
String filePath = parentPath + ISolutionRepository.SEPARATOR + action;
ISolutionFile fileToSave = repository.getSolutionFile(fullPath, ISolutionRepository.ACTION_UPDATE);
if (fileToSave != null || (!repository.resourceExists(filePath) && parentFile != null)) {
repository.publish(base, '/' + parentPath, action, content.getBytes() , true);