Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Select Git revision
  • 89219ea7315a5984286b7da90d9c9026a65bba38
  • development default
  • feature/EDELIVERY-13760-translate-server-side-error-messages
  • bugfix/EDELIVERY-14172-domismp-accepts-requests-with-wrong-domain-header-value
  • EDELIVERY-15372-upgrade-libraries-and-plugins-and-update-httpclient-to-httpclient5
  • EDELIVERY-15377-migrate-to-angular-20
  • feature/EDELIVERY-15382-rest-api-jwt-authentication-for-dynamic-discovery-client
  • bugfix/EDELIVERY-14196-select-domain-select-resource-dropdown-should-be-order-alphabetically
  • feature/EDELIVERY-12753-sml-integration-migration-to-different-smp
  • feature/EDELIVERY-13757-extend-session-dialog-should-have-an-active-counter
  • EDELIVERY-15144-sql-update
  • bugfix/EDELIVERY-14326-ui-edit-resource-filters
  • feature/EDELIVERY-15144-domismp-system-notification-generalize-time-expiration-alerts
  • bugfix/EDELIVERY-15102-alert-is-not-appearing-when-adding-duplicated-certificate
  • bugfix/EDELIVERY-15203-small-left-grid-shows-no-data-found-for-1-2-seconds-before-loading-the-data
  • EDELIVERY-15219-search-filter-with-understore-char-does-not-work
  • bugfix/EDELIVERY-15226-certificates-error-when-trying-to-delete-certificates
  • bugfix/EDELIVERY-15224-error-when-trying-to-update-info-from-profile-page
  • bugfix/EDELIVERY-15225-emails-are-not-sent-in-domismp
  • release/5.1.x
  • feature/EDELIVERY-12746-external-secret-sharing-services-as-vaults
  • 5.1.1
  • 5.1
  • 5.1-TEST
  • 5.1-RC1
  • 5.0.1
  • 5.0
  • 5.0-RC1
  • 4.2
  • 4.2-RC1
  • 4.1.2
  • 4.1.1
  • 4.1.0
  • 4.1.0-RC1
  • 4.0.0
  • 4.0.0-RC1
  • 3.0.2
  • 3.0.1
  • 3.0.0
39 results

DomainModel.java

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    DomainModel.java 4.54 KiB
    package rest.models;
    
    import ddsl.enums.ResponseCertificates;
    import org.apache.commons.lang3.StringUtils;
    import utils.Generator;
    import utils.Utils;
    
    import java.util.List;
    
    import static ddsl.enums.ResponseCertificates.SMP_DOMAIN_01;
    import static ddsl.enums.ResponseCertificates.SMP_DOMAIN_02;
    
    public class DomainModel {
    
        private String smlSmpId;
        private String domainCode;
        private String domainId;
        private boolean smlRegistered;
        private String visibility;
        private String smlClientKeyAlias;
        private String signatureKeyAlias;
        private String smlSubdomain;
        private String smlParticipantIdentifierRegExp;
        private boolean smlClientCertAuth;
        private Object actionMessage;
        private Object defaultResourceTypeIdentifier;
        private List<Object> groups;
        private Long index;
        private List<String> resourceDefinitions;
        private Long status;
        public DomainModel() {
        }
        public String getSmlSmpId() {
            return smlSmpId;
        }
    
        public String getDomainCode() {
            return domainCode;
        }
    
        public boolean isSmlRegistered() {
            return smlRegistered;
        }
    
        public String getVisibility() {
            return visibility.toUpperCase();
        }
    
        public String getSmlClientKeyAlias() {
            return smlClientKeyAlias;
        }
    
        public String getSignatureKeyAlias() {
            return signatureKeyAlias;
        }
    
        public String getSmlSubdomain() {
            return smlSubdomain;
        }
    
        public String getSmlParticipantIdentifierRegExp() {
            return smlParticipantIdentifierRegExp;
        }
    
        public boolean isSmlClientCertAuth() {
            return smlClientCertAuth;
        }
    
        public void setIndex(Long index) {
            this.index = index;
        }
    
        public void setStatus(Long status) {
            this.status = status;
        }
    
        public void setResourceDefinitions(List<String> resourceDefinitions) {
            this.resourceDefinitions = resourceDefinitions;
        }
    
        public void setSmlSmpId(String smlSmpId) {
            this.smlSmpId = smlSmpId;
        }
    
        public void setDomainCode(String domainCode) {
            this.domainCode = domainCode;
        }
    
        public String getDomainId() {
            return domainId;
        }
    
        public void setDomainId(String domainId) {
            this.domainId = domainId;
        }
    
        public void setSmlRegistered(boolean smlRegistered) {
            this.smlRegistered = smlRegistered;
        }
    
        public void setVisibility(String visibility) {
            this.visibility = visibility;
        }
    
        public void setSmlClientKeyAlias(String smlClientKeyAlias) {
            this.smlClientKeyAlias = smlClientKeyAlias;
        }
    
        public void setSignatureKeyAlias(String signatureKeyAlias) {
            this.signatureKeyAlias = signatureKeyAlias;
        }
    
        public void setSmlSubdomain(String smlSubdomain) {
            this.smlSubdomain = smlSubdomain;
        }
    
        public void setSmlParticipantIdentifierRegExp(String smlParticipantIdentifierRegExp) {
            this.smlParticipantIdentifierRegExp = smlParticipantIdentifierRegExp;
        }
    
        public void setSmlClientCertAuth(boolean smlClientCertAuth) {
            this.smlClientCertAuth = smlClientCertAuth;
        }
    
        public void setActionMessage(Object actionMessage) {
            this.actionMessage = actionMessage;
        }
    
        public void setDefaultResourceTypeIdentifier(Object defaultResourceTypeIdentifier) {
            this.defaultResourceTypeIdentifier = defaultResourceTypeIdentifier;
        }
    
        public void setGroups(List<Object> groups) {
            this.groups = groups;
        }
    
        public static DomainModel generatePublicDomainModelWithSML() {
            DomainModel domainModel = new DomainModel();
            domainModel.domainCode = "AUTDom" + Generator.randomAlphaNumeric(6);
            domainModel.signatureKeyAlias = Utils.randomEnum(new ResponseCertificates[]{SMP_DOMAIN_01, SMP_DOMAIN_02}).getName();
            domainModel.visibility = "PUBLIC";
            domainModel.smlClientCertAuth = true;
            domainModel.smlSubdomain = "AUTDomSML" + Generator.randomAlphaNumeric(6);
            domainModel.smlSmpId = "AUTSMLSMP" + Generator.randomAlphaNumeric(4);
            domainModel.smlClientKeyAlias = StringUtils.lowerCase(Utils.randomEnum(new ResponseCertificates[]{SMP_DOMAIN_01, SMP_DOMAIN_02}).toString());
            return domainModel;
        }
    
        public static DomainModel generatePublicDomainModelWithoutSML() {
            DomainModel domainModel = new DomainModel();
            domainModel.domainCode = "AUTDom" + Generator.randomAlphaNumeric(6);
            domainModel.signatureKeyAlias = Utils.randomEnum(ResponseCertificates.values()).getName();
            domainModel.visibility = "PUBLIC";
            return domainModel;
        }
    }