Class ChangeAuditNCCreator

java.lang.Object
com.ptc.qualitymanagement.audit.ChangeAuditNCCreator
All Implemented Interfaces:
com.ptc.qualitymanagement.audit.NCCreatorDelegate

public class ChangeAuditNCCreator extends Object implements com.ptc.qualitymanagement.audit.NCCreatorDelegate
Populates the NCChangeIssueProxy object based upon the contents of the Audit and Audit Details objects.

This object is intended to be used as a base class for customer extensions. To extend create a class that extends this class then register it as the NCCreatorDelegate for Audit. To register the new class create xconf file xxx.AUDIT.service.properties.xconf and register with Windchill.

 
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE Configuration SYSTEM "xconf.dtd">

 <Configuration targetFile="codebase/service.properties">
   <Service name="com.ptc.qualitymanagement.audit.NCCreatorDelegate">
       <Option
           cardinality="duplicate"
           requestor="com.ptc.qualitymanagement.audit.ChangeAudit"
           selector="audit"
           serviceClass="yourfullyqualifiedclassname"
       />
   </Service>
 </Configuration>
 
 

Register new xconf file with Windchill
xconfmanager -i src\\com\\acme\\udi\\xxx.AUDIT.service.properties.xconf -p



Supported API: true

Extendable: true

  • Method Summary

    Modifier and Type
    Method
    Description
    final com.ptc.qualitymanagement.audit.WTChangeAudit
    Access the Audit object used to populate the NCChangeIssueProxy Report.
    final com.ptc.qualitymanagement.audit.AuditDetail
    Access the AuditDetail object used to populate the NCChangeIssueProxy Report.
    void
    Method is available for customization of initialization logic.
    void
    Populates container in CAPAChangeRequestProxy object from Audit

    Supported API: true
    void
    Populates Controlling Authority in CAPAChangeRequestProxy object from Audit

    Supported API: true
    void
    This method is designed as a location for customers to provide additional populator logic.
    void
    Populates Description in CAPAChangeRequestProxy object from Audit

    Supported API: true
    void
    Populates Name in CAPAChangeRequestProxy object from Audit

    Supported API: true
    void
    Populates Source type in CAPAChangeRequestProxy object

    Supported API: true

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • PopulateDescription

      public void PopulateDescription()
      Populates Description in CAPAChangeRequestProxy object from Audit

      Supported API: true
    • PopulateSourceType

      public void PopulateSourceType()
      Populates Source type in CAPAChangeRequestProxy object

      Supported API: true
    • PopulateControlAuthority

      public void PopulateControlAuthority()
      Populates Controlling Authority in CAPAChangeRequestProxy object from Audit

      Supported API: true
    • PopulateName

      public void PopulateName()
      Populates Name in CAPAChangeRequestProxy object from Audit

      Supported API: true
    • PopulateContainerRef

      public void PopulateContainerRef()
      Populates container in CAPAChangeRequestProxy object from Audit

      Supported API: true
    • populateCustom

      public void populateCustom()
      This method is designed as a location for customers to provide additional populator logic. It does nothing in default configuration.

      It is called last. Values set in this method will override values set by previous methods. Customer may use this method to override or provide new values.

      Developers have access to class level fields as source data by calling the getXXX() methods.

      To access soft attribute values it is best to use a PersistableAdapter as in the code snipit below.

       
      
              try {
                  PersistableAdapter  auditSourceObjectAdapter = new PersistableAdapter (
                          getAudit(), null, SessionHelper.getLocale(), null);
                  auditSourceObjectAdapter.load("attributeName");
      
                  Object value = auditSourceObjectAdapter.get("attributeName");
                  ncChangeIssueProxy.setFieldName((String) value);
              } catch (Exception e) {
                  logger.error("Custom Error", e);
              }
       
       
      Parameters:
      emdr -

      Supported API: true
    • initializeCustom

      public void initializeCustom()
      Method is available for customization of initialization logic.

      Customization should initialize any objects needed for custom population in this method. Customization can call the setXXX() methods to replace the objects set by default initialization. Substitute objects will be used by the copyToNCChangeIssueProxy() method.

      If it is desired to populate additional sections of the report with data from additional objects, those objects should be retrieved here and stored in instance variables.

      Supported API: true

    • getAudit

      public final com.ptc.qualitymanagement.audit.WTChangeAudit getAudit()
      Access the Audit object used to populate the NCChangeIssueProxy Report.

      Call this method to gain access to the object retrieved during initialization

      Supported API: true

    • getAuditDetail

      public final com.ptc.qualitymanagement.audit.AuditDetail getAuditDetail()
      Access the AuditDetail object used to populate the NCChangeIssueProxy Report.

      Call this method to gain access to the object retrieved during initialization

      Supported API: true