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 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 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(); }
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(); }
@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 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 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(); }
public Receipt getReceipt(String receiptId) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<Receipt, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_RECEIPT, properties -> properties.put(RECEIPT_ID, receiptId)) .executeWith(new OperationDelegate<Receipt>() { @Override public Receipt execute() throws ConsentManagementException { return consentManager.getReceipt(receiptId); } }) .intercept(POST_GET_RECEIPT, properties -> properties.put(RECEIPT_ID, receiptId)) .getResult(); }
public PurposeCategory addPurposeCategory(PurposeCategory purposeCategory) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<PurposeCategory, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_ADD_PURPOSE_CATEGORY, properties -> properties.put(PURPOSE_CATEGORY, purposeCategory)) .executeWith(new OperationDelegate<PurposeCategory>() { @Override public PurposeCategory execute() throws ConsentManagementException { return consentManager.addPurposeCategory(purposeCategory); } }) .intercept(POST_ADD_PURPOSE_CATEGORY, properties -> properties.put(PURPOSE_CATEGORY, purposeCategory)) .getResult(); }
public PurposeCategory getPurposeCategoryByName(String name) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<PurposeCategory, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_GET_PURPOSE_CATEGORY_BY_NAME, properties -> properties.put(PURPOSE_CATEGORY_NAME, name)) .executeWith(new OperationDelegate<PurposeCategory>() { @Override public PurposeCategory execute() throws ConsentManagementException { return consentManager.getPurposeCategoryByName(name); } }) .intercept(POST_GET_PURPOSE_CATEGORY_BY_NAME, properties -> properties.put(PURPOSE_CATEGORY_NAME, name)) .getResult(); }
public List<ReceiptListResponse> searchReceipts(int limit, int offset, String piiPrincipalId, String spTenantDomain, String service, String state) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<List<ReceiptListResponse>, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_LIST_RECEIPTS, properties -> { populateProperties(limit, offset, piiPrincipalId, spTenantDomain, service, state, properties); }) .executeWith(new OperationDelegate<List<ReceiptListResponse>>() { @Override public List<ReceiptListResponse> execute() throws ConsentManagementException { return consentManager.searchReceipts(limit, offset, piiPrincipalId, spTenantDomain, service, state); } }) .intercept(POST_LIST_RECEIPTS, properties -> { populateProperties(limit, offset, piiPrincipalId, spTenantDomain, service, state, properties); }) .getResult(); }
@Override public List<ReceiptListResponse> searchReceipts(int limit, int offset, String piiPrincipalId, String spTenantDomain, String service, String state, String principalTenantDomain) throws ConsentManagementException { ConsentMessageContext context = new ConsentMessageContext(); ConsentInterceptorTemplate<List<ReceiptListResponse>, ConsentManagementException> template = new ConsentInterceptorTemplate<>(consentMgtInterceptors, context); return template.intercept(PRE_LIST_RECEIPTS, properties -> { populateProperties(limit, offset, piiPrincipalId, spTenantDomain, service, state, principalTenantDomain, properties); }) .executeWith(new OperationDelegate<List<ReceiptListResponse>>() { @Override public List<ReceiptListResponse> execute() throws ConsentManagementException { return consentManager.searchReceipts(limit, offset, piiPrincipalId, spTenantDomain, service, state, principalTenantDomain); } }) .intercept(POST_LIST_RECEIPTS, properties -> { populateProperties(limit, offset, piiPrincipalId, spTenantDomain, service, state, principalTenantDomain, properties); }) .getResult(); }