net.artima.place
Class PropertyFileResourceInfo

java.lang.Object
  |
  +--net.artima.place.PropertyFileResourceInfo

public abstract class PropertyFileResourceInfo
extends java.lang.Object
implements ResourceInfo

A bundle of information about a resource represented by a Link.

See Also:
Serialized Form

Fields inherited from interface net.artima.place.ResourceInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
PropertyFileResourceInfo(java.lang.String baseName, java.util.Locale[] supportedLocales)
          Construct a PropertyFileResourceInfo.
 
Method Summary
protected abstract  java.lang.ClassLoader getClassLoader()
          Overridden in subclasses that are sent in the same JAR file as the property files.
 java.lang.String getDescription()
          Gets a short description for this resource, suitable for presentation to users, under the current locale.
 java.lang.String getDescription(java.util.Locale locale)
          Gets a short description for this resource, suitable for presentation to users, under the specified locale.
 java.net.URL getIconImageFile(int iconKind)
          Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the current locale.
 java.net.URL getIconImageFile(java.util.Locale locale, int iconKind)
          Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the specified locale.
 java.io.InputStream getIconImageFileAsStream(int iconKind)
          Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the current locale.
 java.io.InputStream getIconImageFileAsStream(java.util.Locale locale, int iconKind)
          Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the specified locale.
 java.lang.String[] getKeywords()
          Gets a set of keywords for this resource, suitable for presentation to users, under the current locale.
 java.lang.String[] getKeywords(java.util.Locale locale)
          Gets a set of keywords for this resource, suitable for presentation to users, under the specified locale.
 java.lang.String getName()
          Gets the name of this resource, suitable for presentation to users,.
 java.lang.String getName(java.util.Locale locale)
          Gets the name of this resource, suitable for presentation to users.
 java.util.Locale[] getSupportedLocales()
          Returns an array of locales supported by this ResourceInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyFileResourceInfo

public PropertyFileResourceInfo(java.lang.String baseName,
                                java.util.Locale[] supportedLocales)
Construct a PropertyFileResourceInfo.
Parameters:
baseName - Base name of property file.
loader - Class loader that can load the property file as a resource.
supportedLocales - Locales supported by this ResourceInfo
Method Detail

getSupportedLocales

public java.util.Locale[] getSupportedLocales()
Returns an array of locales supported by this ResourceInfo. In other words, this ResourceInfo will be able to return user oriented data for each locale in the returned array.
Specified by:
getSupportedLocales in interface ResourceInfo

getName

public java.lang.String getName()
Gets the name of this resource, suitable for presentation to users,. under the current locale.
Specified by:
getName in interface ResourceInfo

getName

public java.lang.String getName(java.util.Locale locale)
Gets the name of this resource, suitable for presentation to users. under the specified locale.
Specified by:
getName in interface ResourceInfo

getKeywords

public java.lang.String[] getKeywords()
Gets a set of keywords for this resource, suitable for presentation to users, under the current locale. Keywords are used by search engines to index the resource.
Specified by:
getKeywords in interface ResourceInfo

getKeywords

public java.lang.String[] getKeywords(java.util.Locale locale)
Gets a set of keywords for this resource, suitable for presentation to users, under the specified locale. Keywords are used by search engines to index the resource.
Specified by:
getKeywords in interface ResourceInfo

getDescription

public java.lang.String getDescription()
Gets a short description for this resource, suitable for presentation to users, under the current locale.
Specified by:
getDescription in interface ResourceInfo

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Gets a short description for this resource, suitable for presentation to users, under the specified locale.
Specified by:
getDescription in interface ResourceInfo

getIconImageFile

public java.net.URL getIconImageFile(int iconKind)
Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the current locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.
Specified by:
getIconImageFile in interface ResourceInfo

getIconImageFileAsStream

public java.io.InputStream getIconImageFileAsStream(int iconKind)
Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the current locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.
Specified by:
getIconImageFileAsStream in interface ResourceInfo

getIconImageFile

public java.net.URL getIconImageFile(java.util.Locale locale,
                                     int iconKind)
Gets a URL for the image file of an icon for this resource, suitable for presentation to users, under the specified locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.
Specified by:
getIconImageFile in interface ResourceInfo

getIconImageFileAsStream

public java.io.InputStream getIconImageFileAsStream(java.util.Locale locale,
                                                    int iconKind)
Gets an InputStream for the image file of an icon for this resource, suitable for presentation to users, under the specified locale. (The image file is likely either a GIF or JPG file, but could be any image file format.) The valid parameter values are the same as for the getIcon method of java.beans.BeanInfo, which for convenience are also declared in this interface: ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32.
Specified by:
getIconImageFileAsStream in interface ResourceInfo

getClassLoader

protected abstract java.lang.ClassLoader getClassLoader()
Overridden in subclasses that are sent in the same JAR file as the property files.