All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.labs64.netlicensing.domain.vo.ValidationParameters Maven / Gradle / Ivy

There is a newer version: 2.10.0-jdk17
Show newest version
package com.labs64.netlicensing.domain.vo;

import java.util.HashMap;
import java.util.Map;

public class ValidationParameters {

    private String productNumber;
    private String licenseeName;
    private String licenseeSecret;
    private Map> parameters;

    /**
     * Sets the target product
     *
     * @param productNumber
     *            optional productNumber, must be provided in case licensee auto-create is enabled
     */
    public void setProductNumber(String productNumber) {
        this.productNumber = productNumber;
    }

    public String getProductNumber() {
        return productNumber;
    }

    /**
     * Sets the name for the new licensee
     * 
     * @param licenseeName
     *            optional human-readable licensee name in case licensee will be auto-created. This parameter must not
     *            be the name, but can be used to store any other useful string information with new licensees, up to
     *            1000 characters.
     */
    public void setLicenseeName(String licenseeName) {
        this.licenseeName = licenseeName;
    }

    public String getLicenseeName() {
        return licenseeName;
    }

    /**
     * Sets the licensee secret
     * 
     * @param licenseeSecret
     *            licensee secret stored on the client side. Refer to Licensee Secret documentation for details.
     */
    public void setLicenseeSecret(String licenseeSecret) {
        this.licenseeSecret = licenseeSecret;
    }

    public String getLicenseeSecret() {
        return licenseeSecret;
    }

    public Map> getParameters() {
        if (parameters == null) {
            parameters = new HashMap>();
        }
        return parameters;
    }

    public Map getProductModuleValidationParameters(final String productModuleNumber) {
        if (!getParameters().containsKey(productModuleNumber)) {
            getParameters().put(productModuleNumber, new HashMap());
        }
        return getParameters().get(productModuleNumber);
    }

    public void setProductModuleValidationParameters(final String productModuleNumber,
            final Map productModuleParameters) {
        getParameters().put(productModuleNumber, productModuleParameters);
    }

    public void put(final String productModuleNumber, final String key, final String value) {
        getProductModuleValidationParameters(productModuleNumber).put(key, value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy