Nothing fancy, just a simple component to delete all profiles with no activity in the last 180 days. We needed this in our development and QA environments to reclaim disk space. import javax.transaction.TransactionManager; import atg.commerce.order.*; import atg.commerce.pricing.*; import atg.dtm.*; import…
Category: ATG
Getting property values from a repository item fetched via RQL
This is just a quick snippet that shows how you can print all property values for a given ItemDescriptor. In this case, I wanted to print the properties for a given product id in the ProductCatalog repository. try { GSARepository…
Example of creating an order in ATG
I spent a lot of time understanding the plumbing of the Pipeline, OrderManager, etc. As I have indicated in the past, simple startup examples of ATG development are hard to find. The out of the box form handlers work far…
ATG custom property descriptor to change data upon retrieving and persisting property
While coming up with a soon to be posted simple example of using the ATG stack to create an order, I found that using the encrypted credit number stored in the DPS_USER_CREDIT_CARD table was not usable upon checkout, as it…
Add BCC admin user with SQL
I was having an issue using my AD account to log into the BCC in the load test environment. In production, we have deleted the admin account for security reasons. This forces users to use their LDAP credentials, which is…
Print HTTP headers in ATG
ATG provides a class named InsertableServletImpl, which can do pretty much what it sounds like. You insert the servlet to be run in the ATG servlet pipeline where you dictate. This allows us to inject behavior into our application at…
How is the ATG CONFIGPATH built?
The CONFIGPATH in ATG is not an operating system variable. In other words, you don’t issue something like the following… export CONFIGPATH=/directory_a /directory_B /directory_B start_app.sh The CONFIGPATH is pretty much what it sounds like. If you have done any work…
What does ATG liveconfig actually do?
liveconfig is essentially a switch to runAssembler that creates a properties file to override default ATG Nucleus behavior. It optimizes the configuration for a “live” production site. Specifically, it overrides the following properties. configurationCheckMilliseconds=10000 -to- configurationCheckMilliseconds=-1 checkFileNameCase=false -to- checkFileNameCase=false (yes,…
ATG scheduler job example
ATG supplies a scheduler of sorts that can be used to run tasks that are supposed to run on a recurring basis. First, cd to your ATG installation directory, and set your CLASSPATH so that the compiler can find the…
Simple ATG JSP and droplet
This post assumes you have installed the Commerce Reference Store. It was also written for ATG 10.0.3, although it may work on other versions, as well. Create the following file, named printAllOrders.java, under $ATG_INSTALL_DIR/home/locallib import java.io.*; import javax.servlet.*; import javax.servlet.http.*;…