It is important to differentiate class names from Nucleus component names. Multiple components in Nucleus cannot have the same absolute name, but they can have the same class. For example, in the previous section the class Person
is instantiated as the component /services/Person
. It might also be instantiated as another component—for example, /services/Employee
.
It is especially important to differentiate Java source files from the properties files required to build an application. For both types of files, the file’s position in the namespace also determines its position in the file directory. For example:
A Java file for the class
atg.nucleus.Nucleus
should live at{SOURCEDIRECTORY}/atg/nucleus/Nucleus.java
The properties file for component
/services/log/fileLogger
should live at{CONFIGDIR}/services/log/fileLogger.properties
.
A component name and class name are sometimes the same—typically, when an application instantiates a single component from a given class. For example, the class atg.service.scheduler.Scheduler
might be instantiated as the component /services/Scheduler
.