Configuring the Integrated Development Environment (IDE)
This topic describes how you can configure the IDE to customize PTC Arbortext Content Delivery.
Prerequisites
To successfully configure the IDE, you must do the following:
1. Log on to the computer (Windows or Linux) on which PTC Arbortext Content Delivery is installed and start the servers.
2. Copy any customization file (for example, MyPricingDelegate.java file) to the computer’s local drive.
3. Download or copy Eclipse (Mars and later versions) to the computer’s local drive and install it.
Installing the Eclipse Application
To install Eclipse,
1. Extract the eclipse-java-mars-2-win32-x86_64.zip file to any folder on the local drive of the computer on which PTC Arbortext Content Delivery is installed.
2. Navigate to the Eclipse folder and double-click the eclipse.exe file. The Workspace Launcher opens.
3. In the Workspace Launcher, browse to a workspace folder as shown in the following image:
4. Click OK.
5. Add the environment variables JAVA_HOME and PATH as shown in the following image:
* 
Java version should be SDK 11.
Creating a Project and Configuring the Libraries
To create a new project, perform the following steps:
1. Start Eclipse, browse to the file, and create a new Java project as shown in the following image.
2. Click Next and select the Allow output folders for source folders check box as shown in the following image.
3. Click Finish.
4. Click Windows > Preferences. Expand the Java folder, click Installed JDKs, and ensure that the JDK name is added as shown in the following image.
5. Right-click the project, navigate to the build path, and select configure build path.
6. In the Java build path, navigate to the Libraries tab and click Add External JARs….
7. Add the JAR files from the library location into the project class path: <HOME>\Applications\Windchill.ear\codebase.war\WEB-INF\lib
8. Click Open.
9. Click Apply and then click OK.
The JAR files are added to your project.
Enabling the Pricing Toggle Button by Default
You must create custom delegates to enable the Pricing toggle button by default, as follows:
1. Browse to the PTC Arbortext Content Delivery Viewer application and navigate to any active shopping cart. The Pricing toggle button is disabled by default.
2. Browse to Eclipse, right-click the src folder, create a new com.ptc.sc.services.plugins package, and then click Finish, as shown in the following image.
3. Right-click the package and create a new MyPricingDelegate.java class.
4. Copy the code from the customization file (MyPricingDelegate.java file in this example) to the new MyPricingDelegate.java class as shown in the following image.
5. Build this project and ensure that the MyPricingDelegate.class file is created in the Eclipse workspace at the location that is shown in the following image.
Building a JAR File from Java Code
To build a JAR file from your Java code, perform the following steps:
1. Browse to Eclipse, right-click the project, and select Export.
2. Click Java > JAR file, and then click Next.
3. Select the resources to export, select the generated class files and resources, select the export destination, and then click Next.
4. Select options for handling problems, and then click Finish.
5. Copy the generated JAR file to <HOME>\SW\SW\Applications\Windchill.ear\codebase.war\WEB-INF\lib
Configuring Services
To configure the services, perform the following steps:
1. Edit the <HOME>\SW\SW\Applications\Windchill.ear\codebase.war\com\ptc\sc\xconf\sc.service.properties.xconf file to add your Java class name.
2. Change the service class that is associated with the com.ptc.sc.services.plugins.PricingDelegate service to match your Java class full name.
Propagating the Changes
To propagate the changes, perform the following steps:
1. Open the command prompt and navigate to the C:\<HOME>\SW\SW\Applications\Windchill.ear\bin folder.
2. Type the following commands:
a. windchill shell
b. xconfmanager -p
3. Restart jboss.
Verifying the Changes in the PTC Arbortext Content Delivery Viewer Application
To verify, perform the following steps:
1. Browse to the PTC Arbortext Content Delivery Viewer application and navigate to any active shopping cart.
2. Verify that the Pricing toggle button is enabled by default.
Was this helpful?