|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.svc.ui.util.PropertyFormatter
public class PropertyFormatter
Formats property data for display. The formatProperty method takes a property name and property value. The property name is used to lookup a FieldDefinition for the property. If one is found the type is used to lookup a formatter for the property value. Otherwise, the propertyValue class type is used to lookup a formatter. If both these checks do not match a formatter the text formatter is used by default. The text formatter simply calls toString on the property value object.
Nested Class Summary | |
---|---|
protected class |
PropertyFormatter.BooleanValueFormatter
Renders an object value as a boolean (true/false). |
protected class |
PropertyFormatter.DateValueFormatter
Renders an object value as a Date. |
protected class |
PropertyFormatter.DecimalValueFormatter
|
protected class |
PropertyFormatter.ListValueFormatter
|
protected class |
PropertyFormatter.NumberValueFormatter
|
protected class |
PropertyFormatter.OrganizationValueFormatter
|
protected class |
PropertyFormatter.StatementValueFormatter
|
protected static class |
PropertyFormatter.TextValueFormatter
|
protected class |
PropertyFormatter.UserValueFormatter
|
protected static interface |
PropertyFormatter.ValueFormatter
Formats an Object into a String that can be displayed. |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
PropertyFormatter()
|
Method Summary | |
---|---|
java.lang.String |
formatProperty(Solution pSolution,
java.lang.String pPropertyName,
java.lang.Object pPropertyValue)
Formats the given property value for the given property name. |
java.lang.String |
formatProperty(java.lang.String pPropertyName,
java.lang.Object pPropertyValue)
Formats the given property value for the given property name. |
atg.svc.repository.service.util.AttachmentUtils |
getAttachmentUtils()
Gets the AttachmentUtils component. |
int |
getMaximumFractionDigits()
Sets the maximum number of digits to display to the right of the decimal point. |
int |
getMinimumFractionDigits()
Sets the minimum number of digits to display to the right of the decimal point. |
ProfileService |
getProfileService()
Gets the ProfileService business component. |
SolutionMetadataService |
getSolutionMetadataService()
Gets the SolutionMetadataService business component. |
SolutionService |
getSolutionService()
Gets the SolutionService business component. |
java.lang.String |
getUserNameDisplayPattern()
Gets the format to use to display a user name. |
java.lang.String |
getUserNameDisplayProperties()
Gets a comma separated list of profile properties to use when displaying a username using the userNameDisplayFormat string. |
boolean |
isFormatNumbers()
Returns true if numbers should be formatted using the user's locale. |
void |
setAttachmentUtils(atg.svc.repository.service.util.AttachmentUtils pAttachmentUtils)
Sets the AttachmentUtils component. |
void |
setFormatNumbers(boolean pFormatNumbers)
Set true if numbers should be formatted using the user's locale. |
void |
setMaximumFractionDigits(int pMaximumFractionDigits)
Gets the maximum number of digits to display to the right of the decimal point. |
void |
setMinimumFractionDigits(int pMinimumFractionDigits)
Gets the minimum number of digits to display to the right of the decimal point. |
void |
setProfileService(ProfileService pProfileService)
Sets the ProfileService business component. |
void |
setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
Sets the SolutionMetadataService business component. |
void |
setSolutionService(SolutionService pSolutionService)
Sets the SolutionService business component. |
void |
setUserNameDisplayPattern(java.lang.String pUserNameDisplayPattern)
Sets the format to use to display a user name. |
void |
setUserNameDisplayProperties(java.lang.String pUserNameDisplayProperties)
Sets a comma separated list of profile properties to use when displaying a username using the userNameDisplayFormat string. |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public PropertyFormatter()
Method Detail |
---|
public SolutionService getSolutionService()
public void setSolutionService(SolutionService pSolutionService)
pSolutionService
- The SolutionService business component.public SolutionMetadataService getSolutionMetadataService()
public void setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
pSolutionMetadataService
- The SolutionMetadataService business component.public ProfileService getProfileService()
public void setProfileService(ProfileService pProfileService)
pProfileService
- The ProfileService business component.public atg.svc.repository.service.util.AttachmentUtils getAttachmentUtils()
public void setAttachmentUtils(atg.svc.repository.service.util.AttachmentUtils pAttachmentUtils)
pAttachmentUtils
- The AttachmentUtils component.public java.lang.String getUserNameDisplayPattern()
public void setUserNameDisplayPattern(java.lang.String pUserNameDisplayPattern)
pUserNameDisplayPattern
- The format to use when displaying a user name.public java.lang.String getUserNameDisplayProperties()
public void setUserNameDisplayProperties(java.lang.String pUserNameDisplayProperties)
pUserNameDisplayProperties
- A comma separated string list of profile properties.public int getMaximumFractionDigits()
public void setMaximumFractionDigits(int pMaximumFractionDigits)
pMaximumFractionDigits
- The maximum number of digits to display to the right of the decimal point.public int getMinimumFractionDigits()
public void setMinimumFractionDigits(int pMinimumFractionDigits)
pMinimumFractionDigits
- The minimum number of digits to display to the right of the decimal point.public boolean isFormatNumbers()
public void setFormatNumbers(boolean pFormatNumbers)
pFormatNumbers
- True if numbers should be formatted.public java.lang.String formatProperty(java.lang.String pPropertyName, java.lang.Object pPropertyValue) throws SvcException
formatProperty(Solution, String, Object)
pPropertyName
- The name of the property to render. If the name is null or does not correspond to a field
definition then the type of the pPropertyValue parameter determines the formatter to use.pPropertyValue
- The value of the property the render. If the value is null an empty string is returned.
SvcException
public java.lang.String formatProperty(Solution pSolution, java.lang.String pPropertyName, java.lang.Object pPropertyValue) throws SvcException
formatProperty(String, Object)
pPropertyName
- The name of the property to render. If the name is null or does not correspond to a field
definition then the type of the pPropertyValue parameter determines the formatter to use.pPropertyValue
- The value of the property the render. If the value is null an empty string is returned.
SvcException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |