atg.b2bcommerce.invoice
Class PropertyTools
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.b2bcommerce.invoice.PropertyTools
- All Implemented Interfaces:
- NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
public class PropertyTools
- extends GenericService
Utility methods for copying properties between objects and repository
items in a generic way.
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Method Summary |
void |
copyProperties(java.lang.Object pSource,
java.lang.Object pDest,
java.util.Properties pPropertyMap)
Copy property values from one object to another, using a specified
property mapping. |
MutableRepositoryItem |
getMutable(RepositoryItem pItem)
Return a mutable version of the specified repository item. |
Methods inherited from class atg.nucleus.GenericService |
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
sDefaultResources
protected static java.util.ResourceBundle sDefaultResources
PropertyTools
public PropertyTools()
getMutable
public MutableRepositoryItem getMutable(RepositoryItem pItem)
throws InvoiceException
- Return a mutable version of the specified repository item. This method
assumes that the item's parent repository is mutable.
- Parameters:
pItem
- A repository item, which may or may not be mutable.
- Returns:
- A mutable version of pItem. If pItem is already a mutable
repository item, it is returned immediately. Otherwise a mutable
version of the item is retrieved from the repository. In this
case the return value is repository-dependent, and may or may not
be the same object as pItem
- Throws:
InvoiceException
- If any error occurs getting the mutable item. In cases where pItem's
parent repository is not a mutable repository the exception will wrap
an underlying ClassCastException; in all other cases it will wrap an
underlying RepositoryException.
copyProperties
public void copyProperties(java.lang.Object pSource,
java.lang.Object pDest,
java.util.Properties pPropertyMap)
throws InvoiceException
- Copy property values from one object to another, using a specified
property mapping. This method works on any two objects for which
DynamicBeans
can be used to set or
get property values, which implies that either or both of the objects
can be repository items if desired.
- Parameters:
pSource
- The source object from which property values being copied.pDest
- The destination object to which property values are being copied.pPropertyMap
- A mapping of source property name to destination property name.
Each name in the map corresponds to a property of the source object
whose value should be copied, the corresponding value in the map
is the name of the destination property on the destination object.
Either or both of the property names may include dotted subproperty
notation, allowing entries of the form
telephoneNumber=deliveryInfo.phoneNumber
in the property map.
- Throws:
InvoiceException
- if any error occurs getting property values from the source object
or setting them on the destination object