I'm implementing dynamic component presentation on DD4T Java version2. To get DCP on DD4T, following method is used.
org.dd4t.core.factories.ComponentPresentationFactory.getComponentPresentation(component ID, component Template ID)
This method requires component template ID as parameter, but hard coding template's ID is bad because ID is different between development environment and live environment. So I want to get template' ID by template's name to avoid hard coding ID in source code.
What is good way to do that?