@Contract public interface PropertyFileService
The property file can have structured keys. If the property key has a dot in it (.) then the string before the dot is considered to be the name of the type. If there are two dots then the name of the instance is the string following the first dot and before the second dot. Anything after the second dot is the name of the property.
A specific type name can be given. If a specific type name is provided then the name prior to the first dot is considered the name of the instance, and everything after the first dot is the name of the property
A default name for instances of the type can be given. Any instance name provided in the property file will override the default instance name. The default default instance name is "DEFAULT"
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_INSTANCE_NAME
The default name for an instance if the instance name cannot be determined
|
static String |
DEFAULT_TYPE_NAME
The default name for a type if the type name cannot be determined
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyFileBean(PropertyFileBean propertyFileBean)
This is a utility method that will add the given
PropertyFileBean
to the Hub for use in configuring this service |
PropertyFileHandle |
createPropertyHandleOfAnyType()
Creates a PropertyFileHandle for reading an HK2 property file.
|
PropertyFileHandle |
createPropertyHandleOfAnyType(String defaultTypeName,
String defaultInstanceName)
Creates a PropertyFileHandle for reading an HK2 property file.
|
PropertyFileHandle |
createPropertyHandleOfSpecificType(String specificTypeName)
Creates a PropertyFileHandle for reading an HK2 property file
that has a specific type name.
|
PropertyFileHandle |
createPropertyHandleOfSpecificType(String specificTypeName,
String defaultInstanceName)
Creates a PropertyFileHandle for reading an HK2 property file
that has a specific type name.
|
void |
removePropertyFileBean()
This is a utility method that will remove the
PropertyFileBean
from the Hub if it is present |
static final String DEFAULT_INSTANCE_NAME
static final String DEFAULT_TYPE_NAME
PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName, String defaultInstanceName)
specificTypeName
- The non-null, non-empty string specific type
name. All instances created or modified with this PropertyFileHandle
will be in this typedefaultInstanceName
- The default name to give to instances of
this type if the instance name cannot be determined. If null or
the empty string then the default default instance of DEFAULT will
be usedPropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName)
file
- May not be null. The file to be associated with this
PropertyFileHandlespecificTypeName
- The non-null, non-empty string specific type
name. All instances created or modified with this PropertyFileHandle
will be in this typePropertyFileHandle createPropertyHandleOfAnyType(String defaultTypeName, String defaultInstanceName)
defaultTypeName
- The default type name that will be used
if a type name could not be determined. If null or empty the
default type name of DEFAULT_TYPE will be useddefaultInstanceName
- The default name to give to instances of
this type if the instance name cannot be determined. If null or
the empty string then the default default instance of DEFAULT will
be usedPropertyFileHandle createPropertyHandleOfAnyType()
void addPropertyFileBean(PropertyFileBean propertyFileBean)
PropertyFileBean
to the Hub for use in configuring this servicepropertyFileBean
- The non-null property file bean that should
either be added to the Hub or be used to modify the existing
bean in the hubvoid removePropertyFileBean()
PropertyFileBean
from the Hub if it is presentCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.