Package org.emau.icmvc.ganimed.ttp.cm2
Interface GICSManagementService
public interface GICSManagementService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddConsentTemplate(ConsentTemplateDTO consentTemplateDTO, boolean finaliseRelatedEntities) stores the given template
the policies within the modulDTOs are ignored and therefore doesn't need to be setvoidcreates a new domainvoidstores the given modulevoidstores the given policyvoidaddSignerIdType(String domainName, String signerIdTypeName) add a signer id type with the given name to the given domainvoiddeletes the given template (only if it's not in use, i.e.voiddeleteDomain(String domainName) deletes the given domainvoiddeleteModule(ModuleKeyDTO keyDTO) deletes the given module (only if it's not in use, i.e.voiddeletePolicy(PolicyKeyDTO keyDTO) deletes the given policy (only if it's not in use, i.e.voiddeleteSignerIdType(String domainName, String signerIdTypeName) removes the given signer id type from the given domainfilterConsentTemplatesInUse(List<ConsentTemplateKeyDTO> consentTemplateKeys, boolean inUse) Returns a sublist of the specified list with the keys for the respective templates that are used or not w.r.t.inUse.filterModulesInUse(List<ModuleKeyDTO> moduleKeys, boolean inUse) Returns a sublist of the specified list with the keys for the respective modules that are used or not w.r.t.inUse.filterPoliciesInUse(List<PolicyKeyDTO> policyKeys, boolean inUse) Returns a sublist of the specified list with the keys for the respective policies that are used or not w.r.t.inUse.voidfinaliseAllForDomain(String domainName) finalises the given domain and all its policies, modules, and templatesvoidfinaliseDomain(String domainName) finalises the given domainvoidfinaliseModule(ModuleKeyDTO moduleKeyDTO, boolean finaliseRelatedEntities) finalises the given modulevoidfinalisePolicy(PolicyKeyDTO policyKeyDTO) finalises the given policyvoidfinaliseTemplate(ConsentTemplateKeyDTO consentTemplateKeyDTO, boolean finaliseRelatedEntities) finalises the given templatebooleanisConsentTemplateInUse(ConsentTemplateKeyDTO consentTemplateKey) Returns true if there are consents for the specified template.booleanisDomainInUse(String domainName) Returns true if there are policies, modules, or templates defined for this domain.booleanisModuleInUse(ModuleKeyDTO moduleKey) Returns true if there are module templates for the specified module.booleanisPolicyInUse(PolicyKeyDTO policyKey) Returns true if there are signed policies or module policies for the specified policy.voidvoidprocessPolicyValidityChanges(List<DomainDTO> domains) voidupdateConsentTemplate(ConsentTemplateDTO consentTemplateDTO, boolean finaliseRelatedEntities) updates the given templatevoidupdateConsentTemplateInUse(ConsentTemplateDTO consentTemplateDTO) updates label, title, comment, externProperties, scanBase64, scanFileType, assignedModule.comment, assignedModule.externProperties, freeTextDef.commentvoidupdateDomain(DomainDTO domainDTO) updates the given domainvoidupdateDomainInUse(String domainName, String label, String logo, String externProperties, org.emau.icmvc.ttp.dto.ExpirationPropertiesDTO expirationProperties, String comment, DomainConfig config) updates the given domain with the given valuesvoidupdateModule(ModuleDTO moduleDTO, boolean finaliseRelatedEntities) updates the given modulevoidupdateModuleInUse(ModuleKeyDTO moduleKeyDTO, String label, String shortText, String externProperties, String comment, Set<AssignedPolicyDTO> assignedPolicyDTOs) updates the given module with the given valuesvoidupdatePolicy(PolicyDTO policyDTO) updates the given policyvoidupdatePolicyInUse(PolicyKeyDTO policyKeyDTO, String label, String externProperties, String comment) updates the given policy with the given valuesvoidupdateSignerIdType(String domainName, String signerIdTypeName, String label, String comment) updates the given signerIdType with the given values
-
Method Details
-
addDomain
void addDomain(DomainDTO domainDTO) throws DuplicateEntryException, InvalidParameterException, VersionConverterClassException creates a new domain- Parameters:
domainDTO- seeDomainDTO- Throws:
DuplicateEntryException- if a domain with that name already existsInvalidParameterExceptionVersionConverterClassException
-
deleteDomain
void deleteDomain(String domainName) throws InvalidParameterException, ObjectInUseException, UnknownDomainException deletes the given domain- Parameters:
domainName- the name of the domain- Throws:
InvalidParameterExceptionObjectInUseException- if there's at least one pseudonym within that domainUnknownDomainException- if the given domain is not found
-
finaliseAllForDomain
void finaliseAllForDomain(String domainName) throws InvalidParameterException, UnknownDomainException, InvalidVersionException, UnknownPolicyException, UnknownConsentTemplateException, UnknownModuleException, RequirementsNotFullfilledException, VersionConverterClassException finalises the given domain and all its policies, modules, and templates- Parameters:
domainName- the name of the domain- Throws:
InvalidParameterExceptionUnknownDomainExceptionInvalidVersionExceptionUnknownPolicyExceptionUnknownConsentTemplateExceptionUnknownModuleExceptionRequirementsNotFullfilledExceptionVersionConverterClassException
-
finaliseDomain
void finaliseDomain(String domainName) throws InvalidParameterException, UnknownDomainException, VersionConverterClassException finalises the given domain- Parameters:
domainName- the name of the domain- Throws:
InvalidParameterExceptionUnknownDomainExceptionVersionConverterClassException
-
updateDomain
void updateDomain(DomainDTO domainDTO) throws InvalidParameterException, ObjectInUseException, UnknownDomainException, VersionConverterClassException updates the given domain- Parameters:
domainDTO-- Throws:
InvalidParameterExceptionObjectInUseExceptionUnknownDomainExceptionVersionConverterClassException
-
updateDomainInUse
void updateDomainInUse(String domainName, String label, String logo, String externProperties, org.emau.icmvc.ttp.dto.ExpirationPropertiesDTO expirationProperties, String comment, DomainConfig config) throws InvalidParameterException, UnknownDomainException, VersionConverterClassException updates the given domain with the given values- Parameters:
domainName- the name of the domainlabel-logo-externProperties-comment-config-- Throws:
InvalidParameterExceptionUnknownDomainExceptionVersionConverterClassException
-
isDomainInUse
Returns true if there are policies, modules, or templates defined for this domain.- Parameters:
domainName- the name of the domain- Returns:
- true if there are policies, modules, or templates defined for this domain
- Throws:
UnknownDomainException- if the specified domain does not existInvalidParameterException- if the name of the domain is blank
-
addConsentTemplate
void addConsentTemplate(ConsentTemplateDTO consentTemplateDTO, boolean finaliseRelatedEntities) throws UnknownDomainException, UnknownModuleException, DuplicateEntryException, InvalidParameterException, InvalidVersionException, FreeTextConverterStringException, InvalidPropertiesException, RequirementsNotFullfilledException, UnknownConsentTemplateException, IllegalCompositionException stores the given template
the policies within the modulDTOs are ignored and therefore doesn't need to be set- Parameters:
consentTemplateDTO-- Throws:
UnknownDomainExceptionUnknownModuleExceptionDuplicateEntryExceptionInvalidParameterExceptionInvalidVersionExceptionFreeTextConverterStringException- is thrown when the given converter string (in case ofFreeTextType.Date) is not a valid string forSimpleDateFormatInvalidPropertiesExceptionRequirementsNotFullfilledExceptionInvalidParameterExceptionUnknownConsentTemplateExceptionIllegalCompositionException
-
deleteConsentTemplate
void deleteConsentTemplate(ConsentTemplateKeyDTO keyDTO) throws UnknownDomainException, UnknownConsentTemplateException, ObjectInUseException, InvalidParameterException, InvalidVersionException deletes the given template (only if it's not in use, i.e. there's no consent belonging to that template)- Parameters:
keyDTO-- Throws:
UnknownDomainExceptionUnknownConsentTemplateExceptionObjectInUseExceptionInvalidParameterExceptionInvalidVersionException
-
finaliseTemplate
void finaliseTemplate(ConsentTemplateKeyDTO consentTemplateKeyDTO, boolean finaliseRelatedEntities) throws InvalidParameterException, InvalidVersionException, RequirementsNotFullfilledException, UnknownConsentTemplateException, UnknownDomainException finalises the given template- Parameters:
consentTemplateKeyDTO-finaliseRelatedEntities-- Throws:
InvalidParameterExceptionInvalidVersionExceptionRequirementsNotFullfilledExceptionUnknownConsentTemplateExceptionUnknownDomainException
-
updateConsentTemplate
void updateConsentTemplate(ConsentTemplateDTO consentTemplateDTO, boolean finaliseRelatedEntities) throws DuplicateEntryException, FreeTextConverterStringException, InvalidFreeTextException, InvalidParameterException, InvalidPropertiesException, InvalidVersionException, ObjectInUseException, RequirementsNotFullfilledException, UnknownConsentTemplateException, UnknownDomainException, UnknownModuleException, IllegalCompositionException updates the given template- Parameters:
consentTemplateDTO-- Throws:
DuplicateEntryExceptionFreeTextConverterStringExceptionInvalidFreeTextExceptionInvalidParameterExceptionInvalidPropertiesExceptionInvalidVersionExceptionObjectInUseExceptionRequirementsNotFullfilledExceptionUnknownConsentTemplateExceptionUnknownDomainExceptionUnknownModuleExceptionIllegalCompositionException
-
updateConsentTemplateInUse
void updateConsentTemplateInUse(ConsentTemplateDTO consentTemplateDTO) throws InvalidFreeTextException, InvalidParameterException, InvalidVersionException, UnknownConsentTemplateException, UnknownDomainException, UnknownModuleException updates label, title, comment, externProperties, scanBase64, scanFileType, assignedModule.comment, assignedModule.externProperties, freeTextDef.comment- Parameters:
consentTemplateDTO-- Throws:
InvalidFreeTextExceptionInvalidParameterExceptionInvalidVersionExceptionUnknownConsentTemplateExceptionUnknownDomainExceptionUnknownModuleException
-
isConsentTemplateInUse
boolean isConsentTemplateInUse(ConsentTemplateKeyDTO consentTemplateKey) throws UnknownDomainException, UnknownConsentTemplateException, InvalidVersionException, InvalidParameterException Returns true if there are consents for the specified template.- Parameters:
consentTemplateKey- the template key- Returns:
- true if there are consents for the specified template
- Throws:
UnknownDomainException- if the domain referenced in the template key does not existUnknownConsentTemplateException- if the specified template does not existInvalidVersionException- if the template version referenced in the template key is not validInvalidParameterException- if the template key or any of its components is null
-
filterConsentTemplatesInUse
List<ConsentTemplateKeyDTO> filterConsentTemplatesInUse(List<ConsentTemplateKeyDTO> consentTemplateKeys, boolean inUse) throws UnknownDomainException, UnknownConsentTemplateException, InvalidVersionException, InvalidParameterException Returns a sublist of the specified list with the keys for the respective templates that are used or not w.r.t.inUse.- Parameters:
consentTemplateKeys- the template keys to checked whether they are used or notinUse- true to return only keys for used, false to return only keys for unused templates- Returns:
- a sublist of the specified list with the keys for the respective templates that are used or not w.r.t.
inUse - Throws:
UnknownDomainException- if any of the domains referenced in the template keys does not existUnknownConsentTemplateException- if any of the specified template does not existInvalidVersionException- if any of the template versions referenced in the template key is not validInvalidParameterException- if the list of template keys or any of its components is null
-
addModule
void addModule(ModuleDTO moduleDTO, boolean finaliseRelatedEntities) throws UnknownDomainException, UnknownPolicyException, DuplicateEntryException, InvalidParameterException, InvalidVersionException, RequirementsNotFullfilledException, IllegalCompositionException stores the given module -
deleteModule
void deleteModule(ModuleKeyDTO keyDTO) throws UnknownDomainException, UnknownModuleException, ObjectInUseException, InvalidParameterException, InvalidVersionException deletes the given module (only if it's not in use, i.e. there's no template linked to that module)- Parameters:
keyDTO-- Throws:
UnknownDomainExceptionUnknownModuleExceptionObjectInUseExceptionInvalidParameterExceptionInvalidVersionException
-
finaliseModule
void finaliseModule(ModuleKeyDTO moduleKeyDTO, boolean finaliseRelatedEntities) throws InvalidParameterException, InvalidVersionException, RequirementsNotFullfilledException, UnknownDomainException, UnknownModuleException finalises the given module- Parameters:
moduleKeyDTO-finaliseRelatedEntities-- Throws:
InvalidParameterExceptionInvalidVersionExceptionRequirementsNotFullfilledExceptionUnknownDomainExceptionUnknownModuleException
-
updateModule
void updateModule(ModuleDTO moduleDTO, boolean finaliseRelatedEntities) throws DuplicateEntryException, InvalidParameterException, InvalidVersionException, ObjectInUseException, RequirementsNotFullfilledException, UnknownDomainException, UnknownModuleException, UnknownPolicyException, IllegalCompositionException updates the given module -
updateModuleInUse
void updateModuleInUse(ModuleKeyDTO moduleKeyDTO, String label, String shortText, String externProperties, String comment, Set<AssignedPolicyDTO> assignedPolicyDTOs) throws InvalidParameterException, InvalidVersionException, UnknownDomainException, UnknownModuleException updates the given module with the given values- Parameters:
moduleKeyDTO-label-shortText-externProperties-comment-assignedPolicyDTOs- only externProperties and comments of this objects are updated- Throws:
InvalidParameterExceptionInvalidVersionExceptionUnknownDomainExceptionUnknownModuleException
-
isModuleInUse
boolean isModuleInUse(ModuleKeyDTO moduleKey) throws UnknownDomainException, UnknownModuleException, InvalidVersionException, InvalidParameterException Returns true if there are module templates for the specified module.- Parameters:
moduleKey- the module key- Returns:
- true if there are module templates for the specified module
- Throws:
UnknownDomainException- if the domain referenced in the module key does not existUnknownModuleException- if the specified module does not existInvalidVersionException- if the template version referenced in the module key is not validInvalidParameterException- if the module key or any of its components is null
-
filterModulesInUse
List<ModuleKeyDTO> filterModulesInUse(List<ModuleKeyDTO> moduleKeys, boolean inUse) throws UnknownDomainException, UnknownModuleException, InvalidVersionException, InvalidParameterException Returns a sublist of the specified list with the keys for the respective modules that are used or not w.r.t.inUse.- Parameters:
moduleKeys- the module keys to checked whether they are used or notinUse- true to return only keys for used, false to return only keys for unused module- Returns:
- a sublist of the specified list with the keys for the respective modules that are used or not w.r.t.
inUse - Throws:
UnknownDomainException- if any of the domains referenced in the module keys does not existUnknownModuleException- if any of the specified modules does not existInvalidVersionException- if any of the module versions referenced in the module key is not validInvalidParameterException- if the list of module keys or any of its components is null
-
addPolicy
void addPolicy(PolicyDTO policyDTO) throws UnknownDomainException, DuplicateEntryException, InvalidParameterException, InvalidVersionException, RequirementsNotFullfilledException stores the given policy- Parameters:
policyDTO-- Throws:
UnknownDomainExceptionDuplicateEntryExceptionInvalidParameterExceptionInvalidVersionExceptionRequirementsNotFullfilledException
-
deletePolicy
void deletePolicy(PolicyKeyDTO keyDTO) throws UnknownDomainException, UnknownPolicyException, ObjectInUseException, InvalidParameterException, InvalidVersionException deletes the given policy (only if it's not in use, i.e. there's no module linked to that policy)- Parameters:
keyDTO-- Throws:
UnknownDomainExceptionUnknownPolicyExceptionObjectInUseExceptionInvalidParameterExceptionInvalidVersionException
-
finalisePolicy
void finalisePolicy(PolicyKeyDTO policyKeyDTO) throws InvalidParameterException, InvalidVersionException, UnknownDomainException, UnknownPolicyException finalises the given policy- Parameters:
policyKeyDTO-- Throws:
InvalidParameterExceptionInvalidVersionExceptionUnknownDomainExceptionUnknownPolicyException
-
updatePolicy
void updatePolicy(PolicyDTO policyDTO) throws InvalidParameterException, InvalidVersionException, ObjectInUseException, UnknownDomainException, UnknownPolicyException updates the given policy- Parameters:
policyDTO-- Throws:
InvalidParameterExceptionInvalidVersionExceptionObjectInUseExceptionUnknownDomainExceptionUnknownPolicyException
-
updatePolicyInUse
void updatePolicyInUse(PolicyKeyDTO policyKeyDTO, String label, String externProperties, String comment) throws InvalidParameterException, InvalidVersionException, UnknownDomainException, UnknownPolicyException updates the given policy with the given values- Parameters:
policyKeyDTO-label-externProperties-comment-- Throws:
InvalidParameterExceptionInvalidVersionExceptionUnknownDomainExceptionUnknownPolicyException
-
isPolicyInUse
boolean isPolicyInUse(PolicyKeyDTO policyKey) throws UnknownDomainException, UnknownPolicyException, InvalidVersionException, InvalidParameterException Returns true if there are signed policies or module policies for the specified policy.- Parameters:
policyKey- the policy key- Returns:
- true if there are signed policies or module policies for the specified policy
- Throws:
UnknownDomainException- if the domain referenced in the policy key does not existUnknownPolicyException- if the specified policy does not existInvalidVersionException- if the template version referenced in the policy key is not validInvalidParameterException- if the policy key or any of its components is null
-
filterPoliciesInUse
List<PolicyKeyDTO> filterPoliciesInUse(List<PolicyKeyDTO> policyKeys, boolean inUse) throws UnknownDomainException, UnknownPolicyException, InvalidVersionException, InvalidParameterException Returns a sublist of the specified list with the keys for the respective policies that are used or not w.r.t.inUse.- Parameters:
policyKeys- the policy keys to checked whether they are used or notinUse- true to return only keys for used, false to return only keys for unused policy- Returns:
- a sublist of the specified list with the keys for the respective policies that are used or not w.r.t.
inUse - Throws:
UnknownDomainException- if any of the domains referenced in the policy keys does not existUnknownPolicyException- if any of the specified policies does not existInvalidVersionException- if any of the module versions referenced in the policy key is not validInvalidParameterException- if the list of policy keys or any of its components is null
-
addSignerIdType
void addSignerIdType(String domainName, String signerIdTypeName) throws InvalidParameterException, UnknownDomainException, DuplicateEntryException add a signer id type with the given name to the given domain- Parameters:
domainName- domain to which the signerIdType belongs tosignerIdTypeName- identifier- Throws:
InvalidParameterExceptionUnknownDomainException- if the given domain is not foundDuplicateEntryException- if the signerIdType already exists
-
updateSignerIdType
void updateSignerIdType(String domainName, String signerIdTypeName, String label, String comment) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdTypeException updates the given signerIdType with the given values- Parameters:
domainName- domain to which the signerIdType belongs tosignerIdTypeName- identifierlabel-comment-- Throws:
InvalidParameterExceptionUnknownDomainException- if the given domain is not foundUnknownSignerIdTypeException- if the given signerIdType is not found
-
deleteSignerIdType
void deleteSignerIdType(String domainName, String signerIdTypeName) throws InvalidParameterException, UnknownDomainException, UnknownSignerIdTypeException, ObjectInUseException removes the given signer id type from the given domain- Parameters:
domainName- domain to which the signerIdType belongs tosignerIdTypeName- identifier- Throws:
InvalidParameterExceptionUnknownDomainExceptionUnknownSignerIdTypeExceptionObjectInUseException
-
processPolicyValidityChanges
void processPolicyValidityChanges(List<DomainDTO> domains) throws UnknownSignerIdTypeException, UnknownSignerIdException, InvalidVersionException, UnknownDomainException, VersionConverterClassException -
processPoliciyValidityChangesForAllDomains
void processPoliciyValidityChangesForAllDomains() throws UnknownSignerIdTypeException, UnknownSignerIdException, InvalidVersionException, UnknownDomainException, VersionConverterClassException
-