class AttachmentHandler implements AttachmentService.Iface {

    @Override
    public List<AttachmentUsage> getAttachmentUsages(Source owner, String attachmentContentId, UsageData filter) throws TException {
        assertNotNull(owner);
        assertTrue(owner.isSet());
        assertNotNull(attachmentContentId);
        assertNotEmpty(attachmentContentId);

        if (filter != null && filter.isSet()) {
            return attachmentUsageRepository.getUsageForAttachment(owner.getFieldValue().toString(), attachmentContentId,
                    filter.getSetField().toString());
        } else {
            return attachmentUsageRepository.getUsageForAttachment(owner.getFieldValue().toString(), attachmentContentId);
        }
    }

    public  AttachmentHandler();

}