// Decompiled by DJ v2.6.6.51 Copyright 2000 Atanas Neshkov  Date: 6/15/2001 17:43:10
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   com/macromedia/generator/app/CacheProperties

package com.macromedia.generator.app;


public class CacheProperties
{

    public CacheProperties()
    {
        rcMaxSize = 0L;
        rcForce = false;
        rcDefaultExpire = 0L;
        rcRecycle = true;
        tcMaxSize = 0L;
        tcForce = false;
        tcDefaultExpire = 0L;
        tcRecycle = true;
        tcCheckModifiedSince = true;
        mcMaxSize = 0L;
        mcForce = false;
        mcDefaultExpire = 0L;
        mcRecycle = true;
        mcCheckModifiedSince = true;
        fcMaxSize = 0L;
        fcForce = false;
        fcDefaultExpire = 0L;
        fcRecycle = true;
        fcCheckModifiedSince = true;
        fcLoad = false;
        diskBufferSize = 0;
        netBufferSize = 0;
        logLevel = 0;
        logCycle = 0L;
        logsMax = 10;
        useInternalCaches = true;
        imcMaxSize = 1024L;
        itcMaxSize = 1024L;
    }

    public CacheProperties(long l, boolean flag, long l1, boolean flag1, long l2, boolean flag2, long l3, boolean flag3, boolean flag4, long l4, boolean flag5, long l5, boolean flag6, boolean flag7, long l6, boolean flag8, long l7, boolean flag9, boolean flag10, boolean flag11, 
            int i, int j, int k, long l8, int i1)
    {
        rcMaxSize = l;
        rcForce = flag;
        rcDefaultExpire = l1;
        rcRecycle = flag1;
        tcMaxSize = l2;
        tcForce = flag2;
        tcDefaultExpire = l3;
        tcRecycle = flag3;
        tcCheckModifiedSince = flag4;
        mcMaxSize = l4;
        mcForce = flag5;
        mcDefaultExpire = l5;
        mcRecycle = flag6;
        mcCheckModifiedSince = flag7;
        fcMaxSize = l6;
        fcForce = flag8;
        fcDefaultExpire = l7;
        fcRecycle = flag9;
        fcCheckModifiedSince = flag10;
        fcLoad = flag11;
        diskBufferSize = i;
        netBufferSize = j;
        logLevel = k;
        logCycle = l8;
        logsMax = logsMax;
        useInternalCaches = true;
        imcMaxSize = 1024L;
        itcMaxSize = 1024L;
    }

    public boolean set(String s, String s1)
    {
        if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheMaxSize"))
        {
            try
            {
                rcMaxSize = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                rcMaxSize = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheForce"))
        {
            if(s1.equalsIgnoreCase("true"))
                rcForce = true;
            else
                rcForce = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheDefaultExpire"))
        {
            try
            {
                rcDefaultExpire = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                rcDefaultExpire = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheRecycle"))
        {
            if(s1.equalsIgnoreCase("false"))
                rcRecycle = false;
            else
                rcRecycle = true;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheMaxSize"))
        {
            try
            {
                tcMaxSize = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                tcMaxSize = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheForce"))
        {
            if(s1.equalsIgnoreCase("true"))
                tcForce = true;
            else
                tcForce = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheDefaultExpire"))
        {
            try
            {
                tcDefaultExpire = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                tcDefaultExpire = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheRecycle"))
        {
            if(s1.equalsIgnoreCase("false"))
                tcRecycle = false;
            else
                tcRecycle = true;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheCheckModifiedSince"))
        {
            if(s1.equalsIgnoreCase("true"))
                tcCheckModifiedSince = true;
            else
                tcCheckModifiedSince = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheMaxSize"))
        {
            try
            {
                mcMaxSize = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                mcMaxSize = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheForce"))
        {
            if(s1.equalsIgnoreCase("true"))
                mcForce = true;
            else
                mcForce = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheDefaultExpire"))
        {
            try
            {
                mcDefaultExpire = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                mcDefaultExpire = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheRecycle"))
        {
            if(s1.equalsIgnoreCase("false"))
                mcRecycle = false;
            else
                mcRecycle = true;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheCheckModifiedSince"))
        {
            if(s1.equalsIgnoreCase("true"))
                mcCheckModifiedSince = true;
            else
                mcCheckModifiedSince = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheMaxSize"))
        {
            try
            {
                fcMaxSize = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                fcMaxSize = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheForce"))
        {
            if(s1.equalsIgnoreCase("true"))
                fcForce = true;
            else
                fcForce = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheDefaultExpire"))
        {
            try
            {
                fcDefaultExpire = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                fcDefaultExpire = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheRecycle"))
        {
            if(s1.equalsIgnoreCase("false"))
                fcRecycle = false;
            else
                fcRecycle = true;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheCheckModifiedSince"))
        {
            if(s1.equalsIgnoreCase("true"))
                fcCheckModifiedSince = true;
            else
                fcCheckModifiedSince = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheLoadIndex"))
        {
            if(s1.equalsIgnoreCase("true"))
                fcLoad = true;
            else
                fcLoad = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.cacheDiskBufferSize"))
        {
            try
            {
                diskBufferSize = Integer.parseInt(s1);
            }
            catch(NumberFormatException _ex)
            {
                diskBufferSize = 0;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.cacheNetBufferSize"))
        {
            try
            {
                netBufferSize = Integer.parseInt(s1);
            }
            catch(NumberFormatException _ex)
            {
                netBufferSize = 0;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.cacheLoggingLevel"))
        {
            try
            {
                logLevel = Integer.parseInt(s1);
            }
            catch(NumberFormatException _ex)
            {
                logLevel = 0;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.cacheLogCycle"))
        {
            try
            {
                logCycle = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                logCycle = 0L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.cacheLogMaxFiles"))
        {
            try
            {
                logsMax = Integer.parseInt(s1);
            }
            catch(NumberFormatException _ex)
            {
                logsMax = 10;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.useInternalCaches"))
        {
            if(s1.equalsIgnoreCase("true"))
                useInternalCaches = true;
            else
                useInternalCaches = false;
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.internalFontCacheMaxSize"))
        {
            try
            {
                itcMaxSize = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                itcMaxSize = 1024L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.internalMediaCacheMaxSize"))
        {
            try
            {
                imcMaxSize = Long.parseLong(s1);
            }
            catch(NumberFormatException _ex)
            {
                imcMaxSize = 1024L;
            }
            return true;
        }
        if(s.equalsIgnoreCase("com.macromedia.generator.adminUserName"))
            return true;
        return s.equalsIgnoreCase("com.macromedia.generator.adminPassword");
    }

    public String toString(String s)
    {
        if(s == null)
            return null;
        if(!s.startsWith("com.macromedia.generator."))
            s = "com.macromedia.generator." + s;
        String s1 = null;
        try
        {
            if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheMaxSize"))
                s1 = Long.toString(rcMaxSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheForce"))
                s1 = rcForce ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheRecycle"))
                s1 = rcRecycle ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.requestCacheDefaultExpire"))
                s1 = Long.toString(rcDefaultExpire);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheMaxSize"))
                s1 = Long.toString(tcMaxSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheForce"))
                s1 = tcForce ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheDefaultExpire"))
                s1 = Long.toString(tcDefaultExpire);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheRecycle"))
                s1 = tcRecycle ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fontCacheCheckModifiedSince"))
                s1 = tcCheckModifiedSince ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheMaxSize"))
                s1 = Long.toString(mcMaxSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheForce"))
                s1 = mcForce ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheDefaultExpire"))
                s1 = Long.toString(mcDefaultExpire);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheRecycle"))
                s1 = mcRecycle ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.mediaCacheCheckModifiedSince"))
                s1 = mcCheckModifiedSince ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheMaxSize"))
                s1 = Long.toString(fcMaxSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheForce"))
                s1 = fcForce ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheDefaultExpire"))
                s1 = Long.toString(fcDefaultExpire);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheRecycle"))
                s1 = fcRecycle ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheCheckModifiedSince"))
                s1 = fcCheckModifiedSince ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.fileCacheLoadIndex"))
                s1 = fcLoad ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.cacheDiskBufferSize"))
                s1 = Integer.toString(diskBufferSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.cacheNetBufferSize"))
                s1 = Integer.toString(netBufferSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.cacheLoggingLevel"))
                s1 = Integer.toString(logLevel);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.cacheLogCycle"))
                s1 = Long.toString(logCycle);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.cacheLogMaxFiles"))
                s1 = Integer.toString(logsMax);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.useInternalCaches"))
                s1 = useInternalCaches ? "true" : "false";
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.internalMediaCacheMaxSize"))
                s1 = Long.toString(imcMaxSize);
            else
            if(s.equalsIgnoreCase("com.macromedia.generator.internalFontCacheMaxSize"))
                s1 = Long.toString(itcMaxSize);
        }
        catch(Exception _ex) { }
        return s1;
    }

    public static final String kClassPath = "com.macromedia.generator.";
    public static final String kRequestCacheMaxSize = "requestCacheMaxSize";
    public static final String kRequestCacheForce = "requestCacheForce";
    public static final String kRequestCacheDefaultExpire = "requestCacheDefaultExpire";
    public static final String kRequestCacheRecycle = "requestCacheRecycle";
    public static final String kFontCacheMaxSize = "fontCacheMaxSize";
    public static final String kFontCacheForce = "fontCacheForce";
    public static final String kFontCacheDefaultExpire = "fontCacheDefaultExpire";
    public static final String kFontCacheRecycle = "fontCacheRecycle";
    public static final String kFontCacheCheckModifiedSince = "fontCacheCheckModifiedSince";
    public static final String kMediaCacheMaxSize = "mediaCacheMaxSize";
    public static final String kMediaCacheForce = "mediaCacheForce";
    public static final String kMediaCacheDefaultExpire = "mediaCacheDefaultExpire";
    public static final String kMediaCacheRecycle = "mediaCacheRecycle";
    public static final String kMediaCacheCheckModifiedSince = "mediaCacheCheckModifiedSince";
    public static final String kFileCacheMaxSize = "fileCacheMaxSize";
    public static final String kFileCacheForce = "fileCacheForce";
    public static final String kFileCacheDefaultExpire = "fileCacheDefaultExpire";
    public static final String kFileCacheRecycle = "fileCacheRecycle";
    public static final String kFileCacheCheckModifiedSince = "fileCacheCheckModifiedSince";
    public static final String kFileCacheLoadIndex = "fileCacheLoadIndex";
    public static final String kCacheDiskBufferSize = "cacheDiskBufferSize";
    public static final String kCacheNetBufferSize = "cacheNetBufferSize";
    public static final String kCacheLoggingLevel = "cacheLoggingLevel";
    public static final String kCacheLogCycle = "cacheLogCycle";
    public static final String kCacheLogsMax = "cacheLogMaxFiles";
    public static final String kUseInternalCaches = "useInternalCaches";
    public static final String kInternalFontCacheMaxSize = "internalFontCacheMaxSize";
    public static final String kInternalMediaCacheMaxSize = "internalMediaCacheMaxSize";
    public static final String kLogonUserName = "adminUserName";
    public static final String kLogonPassword = "adminPassword";
    public long rcMaxSize;
    public boolean rcForce;
    public long rcDefaultExpire;
    public boolean rcRecycle;
    public long tcMaxSize;
    public boolean tcForce;
    public long tcDefaultExpire;
    public boolean tcRecycle;
    public boolean tcCheckModifiedSince;
    public long mcMaxSize;
    public boolean mcForce;
    public long mcDefaultExpire;
    public boolean mcRecycle;
    public boolean mcCheckModifiedSince;
    public long fcMaxSize;
    public boolean fcForce;
    public long fcDefaultExpire;
    public boolean fcRecycle;
    public boolean fcCheckModifiedSince;
    public boolean fcLoad;
    public int diskBufferSize;
    public int netBufferSize;
    public int logLevel;
    public long logCycle;
    public int logsMax;
    public boolean useInternalCaches;
    public long imcMaxSize;
    public long itcMaxSize;
}