public void revokeReceipt(String receiptId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Void, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); template.intercept(PRE_REVOKE_RECEIPT, properties -> properties.put(RECEIPT_ID, receiptId)) .executeWith(new OperationDelegate<Void>() { @Override public Void execute() throws ConsentManagementException { consentManager.revokeReceipt(receiptId); return null; } }) .intercept(POST_REVOKE_RECEIPT, properties -> properties.put(RECEIPT_ID, receiptId)); }
public void deletePurposeCategory(int purposeCategoryId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Void, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); template.intercept(PRE_DELETE_PURPOSE_CATEGORY, properties -> properties.put(PURPOSE_CATEGORY_ID, purposeCategoryId)) .executeWith(new OperationDelegate<Void>() { @Override public Void execute() throws ConsentManagementException { consentManager.deletePurposeCategory(purposeCategoryId); return null; } }) .intercept(POST_DELETE_PURPOSE_CATEGORY, properties -> properties.put(PURPOSE_CATEGORY_ID, purposeCategoryId)); }
public List<PIICategory> listPIICategories(int limit, int offset) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<List<PIICategory>, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PII_CATEGORY_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .executeWith(new OperationDelegate<List<PIICategory>>() { @Override public List<PIICategory> execute() throws ConsentManagementException { return consentManager.listPIICategories(limit, offset); } }) .intercept(POST_GET_PII_CATEGORY_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .getResult(); }
public List<Purpose> listPurposes(String group, String groupType, int limit, int offset) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<List<Purpose>, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE_LIST, properties -> { properties.put(GROUP, group); properties.put(GROUP_TYPE, groupType); properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .executeWith(new OperationDelegate<List<Purpose>>() { @Override public List<Purpose> execute() throws ConsentManagementException { return consentManager.listPurposes(group, groupType, limit, offset); } }) .intercept(POST_GET_PURPOSE_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .getResult(); }
public void deletePurpose(int purposeId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Void, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); template.intercept(PRE_DELETE_PURPOSE, properties -> properties.put(PURPOSE_ID, purposeId)) .executeWith(new OperationDelegate<Void>() { @Override public Void execute() throws ConsentManagementException { consentManager.deletePurpose(purposeId); return null; } }) .intercept(POST_DELETE_PURPOSE, properties -> properties.put(PURPOSE_ID, purposeId)); }
public void deletePIICategory(int piiCategoryId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Void, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); template.intercept(PRE_DELETE_PII_CATEGORY, properties -> properties.put(PII_CATEGORY_ID, piiCategoryId)) .executeWith(new OperationDelegate<Void>() { @Override public Void execute() throws ConsentManagementException { consentManager.deletePIICategory(piiCategoryId); return null; } }) .intercept(POST_DELETE_PII_CATEGORY, properties -> properties.put(PII_CATEGORY_ID, piiCategoryId)); }
public void deleteReceipt(String receiptId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Void, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); template.intercept(PRE_DELETE_RECEIPT, properties -> properties.put(RECEIPT_ID, receiptId)) .executeWith(new OperationDelegate<Void>() { @Override public Void execute() throws ConsentManagementException { consentManager.deleteReceipt(receiptId); return null; } }) .intercept(POST_DELETE_RECEIPT, properties -> properties.put(RECEIPT_ID, receiptId)); }
public Purpose getPurposeByName(String name, String group, String groupType) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Purpose, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE_BY_NAME, properties -> { properties.put(PURPOSE_NAME, name); properties.put(GROUP, group); properties.put(GROUP_TYPE, groupType); }) .executeWith(new OperationDelegate<Purpose>() { @Override public Purpose execute() throws ConsentManagementException { return consentManager.getPurposeByName(name, group, groupType); } }) .intercept(POST_GET_PURPOSE_BY_NAME, properties -> properties.put(PURPOSE_NAME, name)) .getResult(); }
public boolean isPurposeExists(String name, String group, String groupType) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Boolean, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_IS_PURPOSE_EXIST, properties -> { properties.put(PURPOSE_NAME, name); properties.put(GROUP, group); properties.put(GROUP_TYPE, groupType); }) .executeWith(new OperationDelegate<Boolean>() { @Override public Boolean execute() throws ConsentManagementException { return consentManager.isPurposeExists(name, group, groupType); } }) .intercept(POST_IS_PURPOSE_EXIST, properties -> properties.put(PURPOSE_NAME, name)) .getResult(); }
public PIICategory getPIICategory(int piiCategoryId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<PIICategory, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PII_CATEGORY, properties -> properties.put(PII_CATEGORY_ID, piiCategoryId)) .executeWith(new OperationDelegate<PIICategory>() { @Override public PIICategory execute() throws ConsentManagementException { return consentManager.getPIICategory(piiCategoryId); } }) .intercept(POST_GET_PII_CATEGORY, properties -> properties.put(PII_CATEGORY_ID, piiCategoryId)) .getResult(); }
public boolean isPIICategoryExists(String name) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Boolean, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_IS_PII_CATEGORY_EXIST, properties -> properties.put(PII_CATEGORY_NAME, name)) .executeWith(new OperationDelegate<Boolean>() { @Override public Boolean execute() throws ConsentManagementException { return consentManager.isPIICategoryExists(name); } }) .intercept(POST_IS_PII_CATEGORY_EXIST, properties -> properties.put(PII_CATEGORY_NAME, name)) .getResult(); }
public boolean isPurposeCategoryExists(String name) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Boolean, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_IS_PURPOSE_CATEGORY_EXIST, properties -> properties.put(PURPOSE_CATEGORY_NAME, name)) .executeWith(new OperationDelegate<Boolean>() { @Override public Boolean execute() throws ConsentManagementException { return consentManager.isPurposeCategoryExists(name); } }) .intercept(POST_IS_PURPOSE_CATEGORY_EXIST, properties -> properties.put(PURPOSE_CATEGORY_NAME, name)) .getResult(); }
@Deactivate public List<Purpose> listPurposes(int limit, int offset) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<List<Purpose>, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .executeWith(new OperationDelegate<List<Purpose>>() { @Override public List<Purpose> execute() throws ConsentManagementException { return consentManager.listPurposes(limit, offset); } }) .intercept(POST_GET_PURPOSE_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .getResult(); }
public PIICategory addPIICategory(PIICategory piiCategory) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<PIICategory, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_ADD_PII_CATEGORY, properties -> properties.put(PII_CATEGORY, piiCategory)) .executeWith(new OperationDelegate<PIICategory>() { @Override public PIICategory execute() throws ConsentManagementException { return consentManager.addPIICategory(piiCategory); } }) .intercept(POST_ADD_PII_CATEGORY, properties -> properties.put(PII_CATEGORY, piiCategory)) .getResult(); }
public AddReceiptResponse addConsent(ReceiptInput receiptInput) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<AddReceiptResponse, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_ADD_RECEIPT, properties -> properties.put(RECEIPT_INPUT, receiptInput)) .executeWith(new OperationDelegate<AddReceiptResponse>() { @Override public AddReceiptResponse execute() throws ConsentManagementException { return consentManager.addConsent(receiptInput); } }) .intercept(POST_ADD_RECEIPT, properties -> properties.put(RECEIPT_INPUT, receiptInput)) .getResult(); }
public PurposeCategory getPurposeCategory(int purposeCategoryId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<PurposeCategory, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE_CATEGORY, properties -> properties.put(PURPOSE_CATEGORY_ID, purposeCategoryId)) .executeWith(new OperationDelegate<PurposeCategory>() { @Override public PurposeCategory execute() throws ConsentManagementException { return consentManager.getPurposeCategory(purposeCategoryId); } }) .intercept(POST_GET_PURPOSE_CATEGORY, properties -> properties.put(PURPOSE_CATEGORY_ID, purposeCategoryId)) .getResult(); }
public List<PurposeCategory> listPurposeCategories(int limit, int offset) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<List<PurposeCategory>, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE_CATEGORY_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .executeWith(new OperationDelegate<List<PurposeCategory>>() { @Override public List<PurposeCategory> execute() throws ConsentManagementException { return consentManager.listPurposeCategories(limit, offset); } }) .intercept(POST_GET_PURPOSE_CATEGORY_LIST, properties -> { properties.put(LIMIT, limit); properties.put(OFFSET, offset); }) .getResult(); }
public Purpose addPurpose(Purpose purpose) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Purpose, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_ADD_PURPOSE, properties -> properties.put(PURPOSE, purpose)) .executeWith(new OperationDelegate<Purpose>() { @Override public Purpose execute() throws ConsentManagementException { return consentManager.addPurpose(purpose); } }) .intercept(POST_ADD_PURPOSE, properties -> properties.put(PURPOSE, purpose)) .getResult(); }
public Purpose getPurpose(int purposeId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Purpose, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE, properties -> properties.put(PURPOSE_ID, purposeId)) .executeWith(new OperationDelegate<Purpose>() { @Override public Purpose execute() throws ConsentManagementException { return consentManager.getPurpose(purposeId); } }) .intercept(POST_GET_PURPOSE, properties -> properties.put(PURPOSE_ID, purposeId)) .getResult(); }
public PIICategory getPIICategoryByName(String name) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<PIICategory, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PII_CATEGORY_BY_NAME, properties -> properties.put(PII_CATEGORY_NAME, name)) .executeWith(new OperationDelegate<PIICategory>() { @Override public PIICategory execute() throws ConsentManagementException { return consentManager.getPIICategoryByName(name); } }) .intercept(POST_GET_PII_CATEGORY_BY_NAME, properties -> properties.put(PII_CATEGORY_NAME, name)) .getResult(); }