class CLIParser extends AbstractCLIParser {

    @Override
    public <T> List<LicenseInfoParsingResult> getLicenseInfos(Attachment attachment, User user, T context) throws TException {
        AttachmentContent attachmentContent = attachmentContentProvider.getAttachmentContent(attachment);
        LicenseInfo licenseInfo = new LicenseInfo().setFilenames(Arrays.asList(attachmentContent.getFilename()));
        LicenseInfoParsingResult result = new LicenseInfoParsingResult().setLicenseInfo(licenseInfo);
        InputStream attachmentStream = null;

        try {
            attachmentStream = attachmentConnector.getAttachmentStream(attachmentContent, user, context);
            Document doc = getDocument(attachmentStream);

            Set<String> copyrights = getCopyrights(doc);
            licenseInfo.setCopyrights(copyrights);

            Set<LicenseNameWithText> licenseNamesWithTexts = getLicenseNameWithTexts(doc);
            licenseInfo.setLicenseNamesWithTexts(licenseNamesWithTexts);

            result.setStatus(LicenseInfoRequestStatus.SUCCESS);
        } catch (ParserConfigurationException | IOException | XPathExpressionException | SAXException | SW360Exception e) {
            log.error(e);
            result.setStatus(LicenseInfoRequestStatus.FAILURE).setMessage("Error while parsing CLI file: " + e.toString());
        } finally {
            closeQuietly(attachmentStream, log);
        }
        return Collections.singletonList(result);
    }

    public  CLIParser(AttachmentConnector attachmentConnector, AttachmentContentProvider attachmentContentProvider);

}