Interface ResourceDescriptionResolver
-
- All Known Subinterfaces:
ParentResourceDescriptionResolver
- All Known Implementing Classes:
ChildResourceDescriptionResolver
,DeprecatedResourceDescriptionResolver
,NonResolvingResourceDescriptionResolver
,StandardResourceDescriptionResolver
,SubsystemResourceDescriptionResolver
public interface ResourceDescriptionResolver
Resolves localized text descriptions of resources and their components.- Author:
- Brian Stansberry (c) 2011 Red Hat Inc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getChildTypeDescription(String childType, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's child types.String
getNotificationDescription(String notificationType, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's notification.String
getOperationDeprecatedDescription(String operationName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operations.String
getOperationDescription(String operationName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operations.String
getOperationParameterDeprecatedDescription(String operationName, String paramName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operation's parameters.String
getOperationParameterDescription(String operationName, String paramName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operation's parameters.String
getOperationParameterValueTypeDescription(String operationName, String paramName, Locale locale, ResourceBundle bundle, String... suffixes)
Gets the description of a portion of a complex value type of one of the resource's operation's parameters.String
getOperationReplyDescription(String operationName, Locale locale, ResourceBundle bundle)
Gets the description of the reply value for one of the resource's operations, ornull
if there is no description.String
getOperationReplyValueTypeDescription(String operationName, Locale locale, ResourceBundle bundle, String... suffixes)
Gets the description of a portion of a complex value type of the reply value for one of the resource's operations, ornull
if there is no description.String
getResourceAttributeDeprecatedDescription(String attributeName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's attributes.String
getResourceAttributeDescription(String attributeName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's attributes.String
getResourceAttributeValueTypeDescription(String attributeName, Locale locale, ResourceBundle bundle, String... suffixes)
Gets the description of a portion of a complex value type of one of the resource's attributes.ResourceBundle
getResourceBundle(Locale locale)
Returns aResourceBundle
for the givenLocale
, ornull
if this resolver is not based on resource bundles.String
getResourceDeprecatedDescription(Locale locale, ResourceBundle bundle)
Gets the description of the resource.String
getResourceDescription(Locale locale, ResourceBundle bundle)
Gets the description of the resource.
-
-
-
Method Detail
-
getResourceBundle
ResourceBundle getResourceBundle(Locale locale)
Returns aResourceBundle
for the givenLocale
, ornull
if this resolver is not based on resource bundles.This method will be invoked at least once before a series of invocations of the other methods in this interface, and the returned bundle will be passed to those methods as a parameter. The intent is to cache a resource bundle on the stack during the execution of all the methods needed to describe a resource or operation.
- Parameters:
locale
- the locale- Returns:
- the resource bundle, or
null
-
getResourceDescription
String getResourceDescription(Locale locale, ResourceBundle bundle)
Gets the description of the resource.- Parameters:
locale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getResourceAttributeDescription
String getResourceAttributeDescription(String attributeName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's attributes.- Parameters:
attributeName
- the name of the attributelocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getResourceAttributeValueTypeDescription
String getResourceAttributeValueTypeDescription(String attributeName, Locale locale, ResourceBundle bundle, String... suffixes)
Gets the description of a portion of a complex value type of one of the resource's attributes.- Parameters:
attributeName
- the name of the attributelocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
suffixes
- suffixes to dot-append to the base attribute key to generate a key- Returns:
- the localized description
-
getOperationDescription
String getOperationDescription(String operationName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operations.- Parameters:
operationName
- the name of the operationlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getOperationParameterDescription
String getOperationParameterDescription(String operationName, String paramName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operation's parameters.- Parameters:
operationName
- the name of the operationparamName
- the name of the operation's parameterlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getOperationParameterValueTypeDescription
String getOperationParameterValueTypeDescription(String operationName, String paramName, Locale locale, ResourceBundle bundle, String... suffixes)
Gets the description of a portion of a complex value type of one of the resource's operation's parameters.- Parameters:
operationName
- the name of the operationparamName
- the name of the operation's parameterlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
suffixes
- suffixes to dot-append to the base attribute key to generate a key- Returns:
- the localized description
-
getOperationReplyDescription
String getOperationReplyDescription(String operationName, Locale locale, ResourceBundle bundle)
Gets the description of the reply value for one of the resource's operations, ornull
if there is no description.- Parameters:
operationName
- the name of the operationlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description , or
null
-
getOperationReplyValueTypeDescription
String getOperationReplyValueTypeDescription(String operationName, Locale locale, ResourceBundle bundle, String... suffixes)
Gets the description of a portion of a complex value type of the reply value for one of the resource's operations, ornull
if there is no description.- Parameters:
operationName
- the name of the operationlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
suffixes
- suffixes to dot-append to the base attribute key to generate a key- Returns:
- the localized description , or
null
-
getNotificationDescription
String getNotificationDescription(String notificationType, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's notification.- Parameters:
notificationType
- the type of the notificationlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getChildTypeDescription
String getChildTypeDescription(String childType, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's child types.- Parameters:
childType
- the name of the child typelocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getResourceDeprecatedDescription
String getResourceDeprecatedDescription(Locale locale, ResourceBundle bundle)
Gets the description of the resource.- Parameters:
locale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getResourceAttributeDeprecatedDescription
String getResourceAttributeDeprecatedDescription(String attributeName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's attributes.- Parameters:
attributeName
- the name of the attributelocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getOperationDeprecatedDescription
String getOperationDeprecatedDescription(String operationName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operations.- Parameters:
operationName
- the name of the operationlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
getOperationParameterDeprecatedDescription
String getOperationParameterDeprecatedDescription(String operationName, String paramName, Locale locale, ResourceBundle bundle)
Gets the description of one of the resource's operation's parameters.- Parameters:
operationName
- the name of the operationparamName
- the name of the operation's parameterlocale
- the localebundle
- a resource bundle previously obtained from a call togetResourceBundle(java.util.Locale)
, ornull
if that call returnednull
- Returns:
- the localized description
-
-