// 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:   WTDocumentDelegate.java

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

import com.ptc.core.foundation.container.common.FdnWTContainerHelper;
import com.ptc.core.foundation.container.common.FdnWTContainerService;
import com.ptc.core.foundation.type.server.impl.TypeHelper;
import com.ptc.core.meta.common.*;
import com.ptc.core.meta.server.TypeIdentifierUtility;
import com.ptc.windchill.enterprise.copy.server.CoreMetaUtility;
import com.ptc.windchill.enterprise.nativeapp.server.*;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
import wt.access.AccessControlException;
import wt.adapter.attribute.AttributeHelper;
import wt.doc.*;
import wt.enterprise.EnterpriseHelper;
import wt.enterprise.TemplateInfo;
import wt.fc.*;
import wt.folder.Folder;
import wt.folder.FolderHelper;
import wt.inf.container.*;
import wt.lifecycle.*;
import wt.org.*;
import wt.project.Role;
import wt.recent.RecentlyVisitedHelper;
import wt.recent.RecentlyVisitedService;
import wt.services.applicationcontext.UnableToCreateServiceException;
import wt.services.applicationcontext.implementation.DefaultServiceProvider;
import wt.session.SessionManagerSvr;
import wt.session.SessionServerHelper;
import wt.util.*;
import wt.workflow.work.WorkflowHelper;
import wt.workflow.work.WorkflowService;

// Referenced classes of package com.ptc.windchill.enterprise.doc.server:
//            DocumentDelegate, DocumentUtility

public class WTDocumentDelegate
    implements DocumentDelegate
{

    public WTDocumentDelegate()
    {
    }

    public WTDocument createDocument(TypeIdentifier objType, HashMap nameValueData, Locale locale)
        throws WTException
    {
        if(VERBOSE)
            System.out.println("Entering " + CLASSNAME + ".createDocument for real");
        String lifeCycle = null;
        String teamTemplate = null;
        String dept = null;
        String type = null;
        String title = null;
        dept = (String)nameValueData.get("department");
        type = (String)nameValueData.get("docType");
        title = (String)nameValueData.get("title");
        if(title != null)
        {
            title = title.trim();
            if(VERBOSE)
                System.out.println("Title = " + title);
        }
        lifeCycle = (String)nameValueData.get("lifeCycleTemplate");
        if(lifeCycle == null)
            lifeCycle = (String)nameValueData.get("lifeCycle");
        if(VERBOSE)
            System.out.println("lifeCycle" + lifeCycle);
        teamTemplate = (String)nameValueData.get("teamTemplateName");
        if(teamTemplate == null)
            teamTemplate = (String)nameValueData.get("teamTemplate");
        if(VERBOSE)
            System.out.println("teamTemplate" + teamTemplate);
        WTDocument document = getNewWTDocument(objType);
        Class doc_class = document.getClass();
        Class obj_class = CoreMetaUtility.getTypeClass(objType);
        if(!doc_class.equals(obj_class))
        {
            Object args[] = {
                obj_class
            };
            throw new WTException("com.ptc.windchill.enterprise.doc.server.serverResource", "10", args);
        }
        if(VERBOSE)
            System.out.println("Type of new document is " + objType.getTypename());
        document = setStandardCreateAttributes(document, nameValueData, locale);
        try
        {
            if(dept != null)
                document.setDepartment(DepartmentList.toDepartmentList(dept));
            else
                document.setDepartment(DepartmentList.getDepartmentListDefault());
            if(type != null)
                document.setDocType(DocumentType.toDocumentType(type));
            else
                document.setDocType(DocumentType.getDocumentTypeDefault());
            if(title != null)
                document.setTitle(title);
        }
        catch(WTPropertyVetoException wtpve)
        {
            throw new WTException(wtpve, "com.ptc.windchill.enterprise.doc.server.serverResource", "5", null);
        }
        document = DocumentUtility.setLifeCycleTemplate(document, lifeCycle);
        document = DocumentUtility.setTeamTemplate(document, teamTemplate);
        document = (WTDocument)PersistenceHelper.manager.store(document);
        if(VERBOSE)
            System.out.println("I am done with creating the document.");
        String submit = null;
        submit = (String)nameValueData.get("submitToLifecycle");
        if(VERBOSE)
            System.out.println("Submit to lifecycle " + submit);
        boolean submittoLC = Boolean.valueOf(submit).booleanValue();
        if(submittoLC)
        {
            Enumeration e = null;
            for(int i = 0; i < 10; i++)
            {
                e = WorkflowHelper.service.getWorkItems(document, Role.SUBMITTER);
                if(e.hasMoreElements())
                    break;
                try
                {
                    Thread.sleep(1000L);
                }
                catch(InterruptedException ie) { }
            }

            try
            {
                document = (WTDocument)LifeCycleHelper.service.submitForApproval(document);
            }
            catch(LifeCycleException lce)
            {
                Object param[] = {
                    document.getName()
                };
                throw new WTException(lce, "com.ptc.windchill.enterprise.doc.server.serverResource", "27", param);
            }
            catch(WTException wte)
            {
                Object param[] = {
                    document.getName()
                };
                throw new WTException(wte, "com.ptc.windchill.enterprise.doc.server.serverResource", "27", param);
            }
        }
        return document;
    }

    public WTDocument updateDocument(WTDocument document, HashMap nameValueData, Locale locale)
        throws WTException
    {
        if(VERBOSE)
            System.out.println("Entering " + CLASSNAME + ".updateDocument");
        document = setStandardUpdateAttributes(document, nameValueData, locale);
        try
        {
            String dept = (String)nameValueData.get("department");
            if(dept != null)
                document.setDepartment(DepartmentList.toDepartmentList(dept));
            else
                document.setDepartment(DepartmentList.getDepartmentListDefault());
            String title = (String)nameValueData.get("title");
            String old_title = document.getTitle();
            if(title != null && title.length() > 0)
            {
                if(old_title == null || !title.equals(old_title))
                    document.setTitle(title);
            } else
            if((title == null || title.length() == 0) && old_title != null)
                document.setTitle(title);
        }
        catch(WTPropertyVetoException wtpve)
        {
            throw new WTException(wtpve, "com.ptc.windchill.enterprise.doc.server.serverResource", "5", null);
        }
        if(document != null)
        {
            document = (WTDocument)PersistenceHelper.manager.save(document);
            TypeIdentifier tid = TypeIdentifierUtility.getTypeIdentifier(document);
            String baseType = TypeHelper.getBaseType(tid);
            if(TypeHelper.hasCustomModeledAttributes(tid.toString(), baseType))
            {
                WTDocumentMaster theMaster = (WTDocumentMaster)document.getMaster();
                PersistenceHelper.manager.save(theMaster);
            }
        }
        if(VERBOSE)
            System.out.println("I am done with updating the document.");
        return document;
    }

    public TypeIdentifier[] getDocumentType(Class objClass, String context)
        throws WTException
    {
        if(VERBOSE)
            System.out.println("Starting " + CLASSNAME + ".getDocumentType...");
        ReferenceFactory referenceFactory = new ReferenceFactory();
        WTContainer container = (WTContainer)referenceFactory.getReference(context).getObject();
        if(WTContainerHelper.isClassicContainer(container))
        {
            String class_list = DOC_TYPES;
            StringTokenizer st = new StringTokenizer(class_list, ",");
            Vector list = new Vector();
            String class_name;
            for(; st.hasMoreElements(); list.add(CoreMetaUtility.getTypeIdentifier(class_name)))
                class_name = st.nextToken();

            int size = list.size();
            TypeIdentifier class_array[] = new TypeIdentifier[size];
            for(int i = 0; i < size; i++)
                class_array[i] = (TypeIdentifier)list.get(i);

            return class_array;
        }
        TypeIdentifier base_type = FdnWTContainerHelper.toTypeIdentifier(objClass);
        if(VERBOSE)
            System.out.println("Base type = " + base_type.toString());
        return FdnWTContainerHelper.service.getCreatableTypesForWTContainer(container, base_type);
    }

    public HashMap getCreateDocumentAttributes(WTContainer context, TypeIdentifier objType, HashMap hashMap, Locale locale)
        throws WTException
    {
        String list[] = getPDMSpecificAttributes("create");
        Class obj_class = CoreMetaUtility.getTypeClass(objType);
        boolean autonumber = EnterpriseHelper.isAutoNumber(obj_class, WTContainerRef.newWTContainerRef(context));
        hashMap = getCreateDocumentAttributes(list, context, objType, hashMap, autonumber, locale);
        WindchillAttributeInformation attrib = (WindchillAttributeInformation)hashMap.get("location");
        try
        {
            attrib.setRequired(true);
        }
        catch(WTPropertyVetoException wtpve)
        {
            throw new WTException(wtpve);
        }
        return hashMap;
    }

    public HashMap getUpdateDocumentAttributes(Persistable object, HashMap hashMap, Locale locale)
        throws WTException
    {
        String list[] = getPDMSpecificAttributes("update");
        return getUpdateDocumentAttributes(list, object, hashMap, locale);
    }

    public HashMap getDetailsDocumentAttributes(Persistable object, HashMap hashMap, ClientConfiguration clientInfo, Locale locale)
        throws WTException
    {
        String list[] = getPDMSpecificAttributes("display");
        return getDetailsDocumentAttributes(list, object, hashMap, clientInfo, locale);
    }

    public HashMap getCheckinDocumentAttributes(Persistable object, HashMap hashMap, Locale locale)
        throws WTException
    {
        String list[] = getPDMSpecificAttributes("checkin");
        return getCheckinDocumentAttributes(list, object, hashMap, locale);
    }

    /**
     * @deprecated Method getCreateDocumentAttributes is deprecated
     */

    protected HashMap getCreateDocumentAttributes(String solutionList[], WTContainer context, TypeIdentifier objType, HashMap hashMap, boolean autoNumber, Locale locale)
        throws WTException
    {
        AttributeHelper attribute_helper = new AttributeHelper();
        TypeInstanceIdentifier tii = null;
        if(hashMap == null)
        {
            hashMap = new HashMap();
            tii = objType.newTypeInstanceIdentifier();
        } else
        {
            try
            {
                tii = getTypeInstanceIdentifier(hashMap);
                if(tii == null)
                    tii = objType.newTypeInstanceIdentifier();
            }
            catch(IllegalFormatException ife)
            {
                tii = objType.newTypeInstanceIdentifier();
            }
            catch(UnableToCreateServiceException utcse)
            {
                tii = objType.newTypeInstanceIdentifier();
            }
        }
        int size = solutionList.length;
        int j = 1;
        for(int i = 0; i < size; i++)
        {
            if(autoNumber && solutionList[i].equals("number"))
                continue;
            WTDocument doc = getNewWTDocument(objType);
            WindchillAttributeInformation attrib = null;
            try
            {
                doc.setContainer(context);
                attrib = WindchillAttributeUtility.getWindchillAttributeInformation(doc, solutionList[i], j, true, attribute_helper, locale);
                if(solutionList[i].equals("name"))
                    attrib.setRequired(true);
                else
                if(solutionList[i].equals("number"))
                    attrib.setRequired(true);
                else
                if(solutionList[i].equals("organization"))
                    attrib.setRequired(true);
                else
                if(solutionList[i].equals("container"))
                {
                    attrib.setRequired(true);
                    attrib.setEditable(false);
                } else
                if(solutionList[i].equals("department"))
                    attrib.setRequired(true);
                else
                if(solutionList[i].equals("lifeCycle"))
                    attrib.setRequired(true);
            }
            catch(WTPropertyVetoException wtpve)
            {
                throw new WTException(wtpve);
            }
            hashMap.put(attrib.getName(), attrib);
            j++;
        }

        return hashMap;
    }

    /**
     * @deprecated Method getUpdateDocumentAttributes is deprecated
     */

    protected HashMap getUpdateDocumentAttributes(String solutionList[], Persistable object, HashMap hashMap, Locale locale)
        throws WTException
    {
        AttributeHelper attribute_helper = new AttributeHelper();
        if(hashMap == null)
            hashMap = new HashMap();
        int size = solutionList.length;
        int j = 1;
        for(int i = 0; i < size; i++)
        {
            String name = solutionList[i];
            boolean editable = true;
            if(name.equals("name") || name.equals("number"))
                editable = false;
            WindchillAttributeInformation attrib = WindchillAttributeUtility.getWindchillAttributeInformation(object, solutionList[i], j++, editable, attribute_helper, locale);
            try
            {
                if(solutionList[i].equals("department"))
                    attrib.setRequired(true);
            }
            catch(WTPropertyVetoException wtpve)
            {
                throw new WTException(wtpve);
            }
            hashMap.put(attrib.getName(), attrib);
        }

        return hashMap;
    }

    /**
     * @deprecated Method getCheckinDocumentAttributes is deprecated
     */

    protected HashMap getCheckinDocumentAttributes(String solutionList[], Persistable object, HashMap hashMap, Locale locale)
        throws WTException
    {
        AttributeHelper attribute_helper = new AttributeHelper();
        if(hashMap == null)
            hashMap = new HashMap();
        int size = solutionList.length;
        int j = 1;
        for(int i = 0; i < size; i++)
        {
            String name = solutionList[i];
            boolean editable = true;
            if(name.equals("name") || name.equals("number"))
                editable = false;
            WindchillAttributeInformation attrib = WindchillAttributeUtility.getWindchillAttributeInformation(object, solutionList[i], j++, editable, attribute_helper, locale);
            try
            {
                if(solutionList[i].equals("department"))
                    attrib.setRequired(true);
            }
            catch(WTPropertyVetoException wtpve)
            {
                throw new WTException(wtpve);
            }
            hashMap.put(attrib.getName(), attrib);
        }

        return hashMap;
    }

    /**
     * @deprecated Method getDetailsDocumentAttributes is deprecated
     */

    protected HashMap getDetailsDocumentAttributes(String solutionList[], Persistable object, HashMap hashMap, ClientConfiguration clientInfo, Locale locale)
        throws WTException
    {
        AttributeHelper attribute_helper;
        int size;
        int j;
        int i;
        attribute_helper = new AttributeHelper();
        if(hashMap == null)
            hashMap = new HashMap();
        size = solutionList.length;
        j = 1;
        WindchillAttributeInformation context = WindchillAttributeUtility.getShortWindchillAttributeInformation(object, "context", j++, attribute_helper, clientInfo, locale);
        hashMap.put(context.getName(), context);
        i = 0;
_L3:
        if(i >= size) goto _L2; else goto _L1
_L1:
        WindchillAttributeInformation attrib = WindchillAttributeUtility.getShortWindchillAttributeInformation(object, solutionList[i], j++, attribute_helper, clientInfo, locale);
        hashMap.put(attrib.getName(), attrib);
        continue; /* Loop/switch isn't completed */
        WTRuntimeException wre;
        wre;
        boolean enforce;
        if(!(wre.getNestedThrowable() instanceof WTException))
            break MISSING_BLOCK_LABEL_255;
        WTException wte = (WTException)wre.getNestedThrowable();
        if(!(wte instanceof AccessControlException))
            break MISSING_BLOCK_LABEL_249;
        enforce = SessionServerHelper.manager.setAccessEnforced(false);
        WindchillAttributeInformation attrib = WindchillAttributeUtility.getShortWindchillAttributeInformation(object, solutionList[i], j++, attribute_helper, clientInfo, locale);
        ResourceBundle serverRb = ResourceBundle.getBundle("com.ptc.windchill.enterprise.doc.server.serverResource", locale);
        try
        {
            attrib.setValue(serverRb.getString("28"));
        }
        catch(WTPropertyVetoException pve)
        {
            throw new WTException(pve);
        }
        hashMap.put(attrib.getName(), attrib);
        SessionServerHelper.manager.setAccessEnforced(enforce);
        continue; /* Loop/switch isn't completed */
        Exception exception;
        exception;
        SessionServerHelper.manager.setAccessEnforced(enforce);
        throw exception;
        throw wre;
        throw wre;
        i++;
          goto _L3
_L2:
        return hashMap;
    }

    private TypeInstanceIdentifier getTypeInstanceIdentifier(HashMap hashMap)
        throws IllegalFormatException, UnableToCreateServiceException
    {
        Set key_set = hashMap.keySet();
        if(hashMap != null && key_set.size() > 0)
        {
            Iterator iterator = key_set.iterator();
            String attrib_name = (String)iterator.next();
            WindchillAttributeInformation attrib = (WindchillAttributeInformation)hashMap.get(attrib_name);
            String tii_strg = attrib.getTypeInstanceIdentifier();
            IdentifierFactory i_factory = null;
            i_factory = (IdentifierFactory)DefaultServiceProvider.getService(com.ptc.core.meta.common.IdentifierFactory.class, "default");
            return (TypeInstanceIdentifier)i_factory.get(tii_strg);
        } else
        {
            return null;
        }
    }

    protected WTDocument getNewWTDocument(TypeIdentifier objType)
        throws WTException
    {
        WTDocument document = WTDocument.newWTDocument();
        Class doc_class = document.getClass();
        Class obj_class = CoreMetaUtility.getTypeClass(objType);
        if(!doc_class.equals(obj_class))
        {
            String classname = obj_class.getName();
            int i = classname.lastIndexOf('.');
            String just_classname = classname.substring(i + 1);
            String just_method = "new" + just_classname;
            try
            {
                Method method_to_run = obj_class.getMethod(just_method, null);
                document = (WTDocument)method_to_run.invoke(null, null);
            }
            catch(InvocationTargetException ite)
            {
                throw new WTException(ite);
            }
            catch(IllegalAccessException iae)
            {
                throw new WTException(iae);
            }
            catch(NoSuchMethodException nsme)
            {
                throw new WTException(nsme);
            }
        }
        document = (WTDocument)CoreMetaUtility.setType(document, objType);
        return document;
    }

    protected WTDocument setStandardCreateAttributes(WTDocument document, HashMap nameValueData, Locale locale)
        throws WTException
    {
        String name;
        String desc;
        WTContainer container;
        WTOrganization wtorg;
        Folder folder;
        String number = null;
        name = null;
        desc = null;
        String context = null;
        String org = null;
        String folRef = null;
        number = (String)nameValueData.get("number");
        if(number != null)
        {
            number = number.trim();
            if(VERBOSE)
                System.out.println("Number = " + number);
        }
        name = (String)nameValueData.get("name");
        if(name != null)
        {
            name = name.trim();
            if(VERBOSE)
                System.out.println("Name = " + name);
        }
        desc = (String)nameValueData.get("description");
        if(desc != null)
        {
            desc = desc.trim();
            if(VERBOSE)
                System.out.println("Description = " + desc);
        }
        context = (String)nameValueData.get("context");
        container = null;
        if(context == null || context.equals(""))
            context = (String)nameValueData.get("container");
        if(context != null)
        {
            if(VERBOSE)
                System.out.println("Context = " + context);
            ReferenceFactory referenceFactory = new ReferenceFactory();
            container = (WTContainer)referenceFactory.getReference(context).getObject();
            RecentlyVisitedHelper.service.addRecentlyVisitedContainer(container);
        }
        org = (String)nameValueData.get("OrganizationDN");
        wtorg = null;
        if(org == null || org.equals(""))
        {
            String org_ref = (String)nameValueData.get("organization");
            if(org_ref != null && !org_ref.equals(""))
            {
                ReferenceFactory referenceFactory = new ReferenceFactory();
                wtorg = (WTOrganization)referenceFactory.getReference(org_ref).getObject();
            }
        }
        if(org != null)
        {
            if(VERBOSE)
                System.out.println("OrganizationDN = " + org);
            org = org.trim();
            wt.org.WTPrincipal p = OrganizationServicesHelper.manager.getPrincipalByDN(org);
            wtorg = (WTOrganization)p;
            if(VERBOSE)
                System.out.println("Organization = " + wtorg.getName());
        }
        folRef = (String)nameValueData.get("folderRef");
        folder = null;
        if(folRef == null)
            folRef = (String)nameValueData.get("location");
        if(folRef != null)
        {
            ReferenceFactory referenceFactory = new ReferenceFactory();
            folder = (Folder)referenceFactory.getReference(folRef.trim()).getObject();
            if(VERBOSE)
                System.out.println("folderRef = " + folder.getName());
        }
        document = DocumentUtility.setNumber(document, number);
        if(name == null)
            name = "temporary";
        document.setName(name);
        if(desc != null)
            document.setDescription(desc);
        document = DocumentUtility.setCustomAttributes(document, nameValueData, locale);
        document.setContainer(container);
        if(wtorg != null)
        {
            document.setOrganization(wtorg);
            RecentlyVisitedHelper.service.addCustomStackObject(wtorg, (wt.org.WTOrganization.class).getName());
        }
        if(folder != null)
            FolderHelper.assignLocation(document, folder);
        return document;
        WTPropertyVetoException wtpve;
        wtpve;
        throw new WTException(wtpve, "com.ptc.windchill.enterprise.doc.server.serverResource", "5", null);
    }

    protected WTDocument setStandardUpdateAttributes(WTDocument document, HashMap nameValueData, Locale locale)
        throws WTException
    {
        String title = (String)nameValueData.get("title");
        String description = (String)nameValueData.get("description");
        try
        {
            String old_desc = document.getDescription();
            if(description != null && description.length() > 0)
            {
                if(old_desc == null || !description.equals(old_desc))
                    document.setDescription(description);
            } else
            if((description == null || description.length() == 0) && old_desc != null)
                document.setDescription(description);
            String enabled = (String)nameValueData.get("enabled");
            TemplateInfo template = document.getTemplate();
            if(template != null && template.isTemplated())
                template.setEnabled(Boolean.valueOf(enabled).booleanValue());
        }
        catch(WTPropertyVetoException wtpve)
        {
            throw new WTException(wtpve, "com.ptc.windchill.enterprise.doc.server.serverResource", "5", null);
        }
        document = DocumentUtility.setCustomAttributes(document, nameValueData, locale);
        return document;
    }

    private String[] getPDMSpecificAttributes(String operation)
    {
        String list[];
        if(operation.equals("checkin"))
        {
            list = (new String[] {
                "number", "name", "department", "title", "description"
            });
            return list;
        }
        if(operation.equals("update"))
        {
            list = (new String[] {
                "number", "name", "department", "title", "description"
            });
            return list;
        }
        String orglist[];
        if(operation.equals("create"))
        {
            list = (new String[] {
                "number", "name", "docType", "department", "title", "location", "lifeCycle", "teamTemplate", "description", "container", 
                "submitToLifecycle"
            });
            orglist = (new String[] {
                "number", "name", "docType", "department", "title", "location", "lifeCycle", "teamTemplate", "description", "container", 
                "organization", "submitToLifecycle"
            });
            if(SHOWORG)
                return orglist;
            else
                return list;
        }
        list = (new String[] {
            "type", "number", "name", "department", "title", "description", "versionInfo", "docType", "checkoutInfo", "location", 
            "lifeCycleTemplate", "teamName", "lifeCycleState", "awaitingPromotion", "primaryName", "primaryFormat", "primarySize", "primaryUpdated", "creator", "createTimestamp", 
            "modifier", "modifyTimestamp", "obid"
        });
        orglist = (new String[] {
            "type", "organizationName", "number", "name", "department", "title", "description", "versionInfo", "docType", "checkoutInfo", 
            "location", "lifeCycleTemplate", "teamName", "lifeCycleState", "awaitingPromotion", "primaryName", "primaryFormat", "primarySize", "primaryUpdated", "creator", 
            "createTimestamp", "modifier", "modifyTimestamp", "obid"
        });
        if(SHOWORG)
            return orglist;
        else
            return list;
    }

    private static final String RESOURCE = "com.ptc.windchill.enterprise.doc.server.serverResource";
    private static final String CLASSNAME;
    private static final String CREATE = "create";
    private static final String UPDATE = "update";
    private static final String DISPLAY = "display";
    private static final String CHECKIN = "checkin";
    private static boolean VERBOSE = false;
    private static final boolean SHOWORG;
    private static final String DOC_TYPES;

    static 
    {
        CLASSNAME = (com.ptc.windchill.enterprise.doc.server.WTDocumentDelegate.class).getName();
        try
        {
            WTProperties properties = WTProperties.getLocalProperties();
            VERBOSE = properties.getProperty("com.ptc.windchill.enterprise.verbose", false);
            SHOWORG = properties.getProperty("wt.org.OrganizationOwned.displayOrganization", false);
            DOC_TYPES = properties.getProperty("com.ptc.windchill.enterprise.doc.DTIDocTypes", "wt.doc.WTDocument");
        }
        catch(Throwable t)
        {
            System.err.println("com.ptc.windchill.enterprise.doc.server.WTDocumentDelegate : Error reading com.ptc.windchill.enterprise.* properties");
            t.printStackTrace(System.err);
            throw new ExceptionInInitializerError(t);
        }
    }
}
