class KieService {

    public T loadContent(Path path) {
        try {
            //If the path is a "dot File" attempt to load the associated "principle file"
            final org.uberfire.java.nio.file.Path ioPath = Paths.convert(path);
            if (pathResolver.isDotFile(ioPath)) {
                org.uberfire.java.nio.file.Path ioPrincipleFilePath = pathResolver.resolveMainFilePath(ioPath);

                //If there is no corresponding "principle file" we have to load the dot-file.
                //See https://bugzilla.redhat.com/show_bug.cgi?id=1263713 which gives legitimate use-cases
                //where a dot-file exists but is not one of "our" dot-files!
                if (!ioService.exists(ioPrincipleFilePath)) {
                    ioPrincipleFilePath = ioPath;
                }

                final Path principleFilePath = Paths.convert(ioPrincipleFilePath);
                return constructContent(principleFilePath,
                                        overviewLoader.loadOverview(principleFilePath));
            } else {
                return constructContent(path,
                                        overviewLoader.loadOverview(path));
            }
        } catch (Exception e) {
            throw ExceptionUtilities.handleException(e);
        }
    }

}