class CLIParser extends AbstractCLIParser {

    @Override
    public <T> ObligationParsingResult getObligations(Attachment attachment, User user, T context) throws TException {
        AttachmentContent attachmentContent = attachmentContentProvider.getAttachmentContent(attachment);
        ObligationParsingResult result = new ObligationParsingResult();

        InputStream attachmentStream = null;

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

            result.setObligationsAtProject(getObligations(doc));
            result.setAttachmentContentId(attachment.getAttachmentContentId());
            result.setStatus(ObligationInfoRequestStatus.SUCCESS);
        } catch (ParserConfigurationException | IOException | XPathExpressionException | SAXException | SW360Exception e) {
            log.error(e);
            result.setStatus(ObligationInfoRequestStatus.FAILURE).setMessage("Error while parsing CLI file: " + e.toString());
        } finally {
            closeQuietly(attachmentStream, log);
        }
        return result;
    }

    public  CLIParser(AttachmentConnector attachmentConnector, AttachmentContentProvider attachmentContentProvider);

}