package com.philisense.www.license.ftp;

import java.util.prefs.*;

import com.philisense.www.license.*;
import com.philisense.www.utils.*;

public abstract class AbstractLicenseParam extends DefaultLicenseParam implements LicenseParam
{
    private static final String LICENSE_CONTENT_INFO;
    private final KeyStoreParam ftpKeyStoreParam;
    private final int ftpDays;
    
    protected AbstractLicenseParam(final String s, final Preferences preferences, final KeyStoreParam keyStoreParam, final KeyStoreParam ftpKeyStoreParam, final int ftpDays, final CipherParam cipherParam) {
        super(s, preferences, keyStoreParam, cipherParam);
        this.ftpKeyStoreParam = ftpKeyStoreParam;
        this.ftpDays = ftpDays;
    }
    
    @Override
    public LicenseContent createFTPLicenseContent() {
        final LicenseContent licenseContent = new LicenseContent();
        licenseContent.setInfo(AbstractLicenseParam.LICENSE_CONTENT_INFO);
        return licenseContent;
    }
    
    @Override
    public KeyStoreParam getFTPKeyStoreParam() {
        return this.ftpKeyStoreParam;
    }
    
    @Override
    public int getFTPDays() {
        return this.ftpDays;
    }
    
    static {
        LICENSE_CONTENT_INFO = Resources.getString(new ObfuscatedString(new long[] { 3518397844622038312L, 5283581152211342346L, -5949173903170142050L, 5400406727937919437L }).toString());
    }
}
