네이밍 서비스 사용자 정의
기본 제공
사용자가 Creo 작업에서 저장 및 업로드를 사용하여 CAD 문서를 작성할 때 기본 제공 위임은 CAD 문서 이름 및 번호에 대한 값을 제공하도록 설계되었습니다.
* 
네이밍 서비스는 업로드 작업 전용입니다.
이름 지정 정책 및 사용자 정의에 사용되는 우선 순위 순서는 다음과 같습니다.
이름:
a. 사용자 정의: 네이밍 서비스 사용자 정의.
b. PTC_COMMON_NAME: Creo Parametric 파일 > 새로 만들기 창을 통해 명시적으로 지정된 공통 이름.
c. 매개변수 기반: 이름 매개변수(작업 > 업로드 작업 > 업로드 > 이름 지정 매개변수 = <문자열 매개변수>).
d. 이름 기반: 파일 이름(기본 설정 작업 > 업로드 작업 > 업로드 > 이름에서 파일 확장명 제외는 파일 이름(CAD 이름)을 기반으로 이름이 지정된 경우에만 적용됩니다.)
번호:
a. 사용자 정의: 네이밍 서비스 사용자 정의.
b. 자동 번호 지정: 기본 설정 작업 > 업로드 작업 > 설정되지 않은 경우 번호의 기본값 업로드파일 이름 및 번호 동기화하지 않음으로 설정된 경우 OIR을 사용하여 번호를 생성합니다.
c. 매개변수 기반: 번호 매개변수(작업 > 업로드 작업 > 업로드 > 번호 지정 매개변수)
d. 이름 기반: 기본 설정 작업 > 업로드 작업 > 업로드 > 번호에서 파일 확장명 제외는 파일 이름[CAD 이름]을 기준으로 번호가 지정된 경우에만 적용됩니다.
* 
OIR이 구성될 때 파일 이름에 자동으로 번호를 지정할 수 있습니다.
이름 지정 및 번호 지정 정책에 대한 자세한 내용은 정책 관리 이름 지정 및 번호 지정을 참조하십시오.
위임을 사용한 사용자 정의 네이밍 서비스
네이밍 서비스는 Windchill 서비스 위임 메커니즘을 사용하여 기본 동작보다 우선 순위가 높은 Java 위임을 생성하여 CAD 문서 이름 또는 번호에 대한 값을 제공할 수 있습니다.
이름 지정 서비스를 사용자 정의하려면 다음 절차를 따르십시오.
1. 인터페이스 EPMDocumentNamingDelegate를 구현하는 Java 클래스를 작성합니다. 인터페이스 정의는 다음과 같습니다.
package com.ptc.windchill.uwgm.proesrv.c11n;
public interface EPMDocumentNamingDelegate
{
public void validateDocumentIdentifier(DocIdentifier
docIdentifier);
}
DocIdentifier 클래스의 정의는 다음과 같습니다.
package com.ptc.windchill.uwgm.proesrv.c11n;
import java.util.HashMap;
public class DocIdentifier
{
{
private String m_modelName;
private String m_docName;
private String m_docNumber;
private HashMap m_parameters;
}
public DocIdentifier(String modelName, String
docName, String docNumber, HashMap params)
{
m_modelName = modelName;
m_docName= docName;
m_docNumber= docNumber;
m_parameters= params;
}
/** get the CAD Name for the model **/

public String getModelName()
{
return m_modelName;
}
/** get the EPMDocument name for the model **/

public String getDocName()
{
return m_docName;
}
/** set the EPMDocument name for the model **/
public void setDocName(String docname)
{
m_docName = docname;
}
/** set the EPMDocument number for the model **/
public void setDocNumber(String docnumber)
{
m_docNumber = docnumber;
}
/** get the EPMDocument number for the model **/
public String getDocNumber()
{
return m_docNumber;
}
/** get the Pro/E designated parameters for the model. These are
name-value pairs indexed by the name **/
public HashMap getParameters()
{
return m_parameters;
}
}
2. 새 클래스에서는 EPMDocument 이름/번호 지정을 위한 비즈니스 로직을 메소드에 구현합니다.
public void validateDocumentIdentifier(DocIdentifier docIdentifier)
DocumentIdentifier 객체는 업로드 서비스가 작성할 EPMDocument의 이름과 번호 정보를 갖습니다.
이 DocIdentifier 객체가 나타내는 EPMDocument의 CAD 이름을 가져오려면 DocIdentifier.getModelName()을 사용합니다.
Creo Parametric에서 지정한 매개변수를 사용하여 EPMDocument 번호/이름 지정을 설정할 수 있습니다.
연관된 매개변수를 가져오려면 DocIdentifier.getParameters()를 사용합니다.
DocIdentifier의 "set" 메소드를 사용하여 새 이름/번호 값을 설정합니다. 업로드 서비스에서는 이 제안이 실행 가능할 경우 적용합니다.
3. site.xconf 파일(<Windchill>에 위치)을 편집하여 서버에서 사용자 정의 서비스의 가용성을 나타내도록 다음 등록 정보를 추가합니다.
<Service context="default" name="com.ptc.windchill.uwgm.proesrv.c11n.EPMDocumentNamingDelegate" targetFile="codebase/service.properties">
<Option cardinality="singleton" requestor="wt.epm.EPMDocument" serviceClass="com.ptc.windchill.uwgm.proesrv.c11n.EPMDefaultDocument NamingDelegate"/>
</Service>
그런 다음 xconfmanager 도구를 사용하여 service.properties 파일에 변경 사항을 적용합니다(-xconfmanager p 실행).
serviceClass 의 값 대신 해당 클래스의 경로를 사용합니다(즉, "com.ptc.windchill.uwgm.proesrv.c11n.EPMDefaultDocumentNamingDelegate"를 해당 클래스의 경로로 대체함).
4. 메소드 서버를 다시 시작합니다.
도움이 되셨나요?