// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) deadcode 
// Source File Name:   TemplateProjectWTDocumentDelegate.java

package com.ptc.windchill.enterprise.templates.doc.server;

import java.io.*;
import java.util.HashMap;
import wt.enterprise.RevisionControlled;
import wt.enterprise.Templateable;
import wt.fc.EvolvableHelper;
import wt.pds.PDSObjectInput;
import wt.util.WTException;

// Referenced classes of package com.ptc.windchill.enterprise.templates.doc.server:
//            TemplatesEnterpriseWTDocumentDelegate

public class TemplateProjectWTDocumentDelegate extends TemplatesEnterpriseWTDocumentDelegate
    implements Externalizable
{

    public TemplateProjectWTDocumentDelegate()
    {
    }

    public void writeExternal(ObjectOutput output)
        throws IOException
    {
        output.writeLong(0x36556656af2b3adL);
        super.writeExternal(output);
    }

    public void readExternal(ObjectInput input)
        throws IOException, ClassNotFoundException
    {
        long readSerialVersionUID = input.readLong();
        readVersion(this, input, readSerialVersionUID, false, false);
    }

    protected boolean readVersion(TemplateProjectWTDocumentDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
        throws IOException, ClassNotFoundException
    {
        boolean success = true;
        if(readSerialVersionUID == 0x36556656af2b3adL)
        {
            if(!superDone)
                super.readExternal(input);
        } else
        {
            success = readOldVersion(input, readSerialVersionUID, passThrough, superDone);
            if(input instanceof PDSObjectInput)
                EvolvableHelper.requestRewriteOfEvolvedBlobbedObject();
        }
        return success;
    }

    private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
        throws IOException, ClassNotFoundException
    {
        boolean success = true;
        if(readSerialVersionUID != 0xf3c0206a4a5b3cb7L)
            if(!superDone)
            {
                success = super.readVersion(this, input, readSerialVersionUID, false, false);
                if(success && !passThrough && readSerialVersionUID != 0xd4b6b5eeea339daL)
                    readVersion(this, input, input.readLong(), false, true);
            } else
            {
                throw new InvalidClassException(CLASSNAME, "Local class not compatible: stream classdesc externalizationVersionUID=" + readSerialVersionUID + " local class externalizationVersionUID=" + 0x36556656af2b3adL);
            }
        return success;
    }

    public Templateable doCreateTemplateContextTasks(Templateable object, HashMap inputHash)
        throws WTException
    {
        return super.doCreateTemplateContextTasks(object, inputHash);
    }

    public RevisionControlled doCreateFromTemplateContextTasks(RevisionControlled object, Templateable template, HashMap inputHash)
        throws WTException
    {
        return super.doCreateFromTemplateContextTasks(object, template, inputHash);
    }

    public Templateable doPostCreateTemplateContextTasks(Templateable object, HashMap inputHash)
        throws WTException
    {
        return object;
    }

    public RevisionControlled doPostCreateFromTemplateContextTasks(RevisionControlled object, Templateable template, HashMap inputHash)
        throws WTException
    {
        return super.doPostCreateFromTemplateContextTasks(object, template, inputHash);
    }

    static Class _mthclass$(String x0)
    {
        return Class.forName(x0);
        ClassNotFoundException x1;
        x1;
        throw (new NoClassDefFoundError()).initCause(x1);
    }

    private static final String RESOURCE = "com.ptc.windchill.enterprise.templates.doc.server.serverResource";
    private static final String CLASSNAME;
    static final long serialVersionUID = 1L;
    public static final long EXTERNALIZATION_VERSION_UID = 0x36556656af2b3adL;
    protected static final long OLD_FORMAT_VERSION_UID = 0xf3c0206a4a5b3cb7L;

    static 
    {
        CLASSNAME = (com.ptc.windchill.enterprise.templates.doc.server.TemplateProjectWTDocumentDelegate.class).getName();
    }
}
