04.12.2012 Views

Windchill System Administrator's Guide

Windchill System Administrator's Guide

Windchill System Administrator's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Customizing the Naming Service<br />

The naming service uses the <strong>Windchill</strong> service delegate mechanism to allow the<br />

user to specify the following for the new CAD document (EPMDocument) to be<br />

created:<br />

• A number for the EPMDocument<br />

• A name for the EPMDocument<br />

• Parameter values for the EPMDocument<br />

The following steps explain how to customize the naming service:<br />

1. Create a Java class that implements the interface<br />

EPMDocumentNamingDelegate. The interface definition is as follows:<br />

package com.ptc.prowt.proesvcs.namesvc;<br />

import java.util.ArrayList;<br />

public interface EPMDocumentNamingDelegate<br />

{<br />

/* This method is not yet supported. Provide a dummy<br />

implementation */<br />

public void validateDocumentIdentifiers(ArrayList<br />

docIdentifier);<br />

/* Implement the customized business logic for<br />

naming/numbering EPMDocument(s) in this method */<br />

public void validateDocumentIdentifier(DocIdentifier<br />

docIdentifier);<br />

}<br />

The definition of the class DocIdentifier is as below:<br />

package com.ptc.prowt.proesvcs.namesvc;<br />

import java.util.HashMap;<br />

public class DocIdentifier<br />

{<br />

{<br />

private String m_modelName;<br />

private String m_docName;<br />

private String m_docNumber;<br />

private HashMap m_parameters;<br />

}<br />

public DocIdentifier(String modelName, String docName,<br />

String docNumber, HashMap params)<br />

{<br />

m_modelName = modelName;<br />

m_docName= docName;<br />

m_docNumber= docNumber;<br />

m_parameters= params;<br />

}<br />

/** get the CAD Name for the model **/<br />

public String getModelName()<br />

{<br />

return m_modelName;<br />

}<br />

/** get the EPMDocument name for the model **/<br />

Customizing and Administrating Pro/ENGINEER Wildfire 10-13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!