package com.atlassian.stash.internal.license;

import com.atlassian.bitbucket.license.LicenseService;
import com.atlassian.extras.api.bitbucket.BitbucketServerLicense;

import javax.annotation.Nonnull;

/**
 * An interface for internal-only operations on the {@link LicenseService}
 */
public interface InternalLicenseService extends LicenseService {
    /**
     * Forces the license to be set even if it is invalid. Note: the string supplied must be valid in the sense it
     * must represent a real license - it is the validity of the license details that go unchecked
     * (allowing expired licenses, licenses for the wrong SEN etc to be set).
     *
     * @return the possibly invalid license that was set
     */
    @Nonnull
    BitbucketServerLicense setUnvalidated(@Nonnull String license);
}
