Class PropertyFileServiceImpl
java.lang.Object
org.glassfish.hk2.configuration.persistence.properties.internal.PropertyFileServiceImpl
- All Implemented Interfaces:
PropertyFileService
- Author:
- jwells
-
Field Summary
Fields inherited from interface org.glassfish.hk2.configuration.persistence.properties.PropertyFileService
DEFAULT_INSTANCE_NAME, DEFAULT_TYPE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyFileBean(PropertyFileBean propertyFileBean) This is a utility method that will add the givenPropertyFileBeanto the Hub for use in configuring this serviceCreates a PropertyFileHandle for reading an HK2 property file.createPropertyHandleOfAnyType(String defaultTypeName, String defaultInstanceName) Creates a PropertyFileHandle for reading an HK2 property file.createPropertyHandleOfSpecificType(String specificTypeName) Creates a PropertyFileHandle for reading an HK2 property file that has a specific type name.createPropertyHandleOfSpecificType(String specificTypeName, String defaultInstanceName) Creates a PropertyFileHandle for reading an HK2 property file that has a specific type name.voidThis is a utility method that will remove thePropertyFileBeanfrom the Hub if it is present
-
Constructor Details
-
PropertyFileServiceImpl
public PropertyFileServiceImpl()
-
-
Method Details
-
createPropertyHandleOfSpecificType
public PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName, String defaultInstanceName) Description copied from interface:PropertyFileServiceCreates a PropertyFileHandle for reading an HK2 property file that has a specific type name. This is generally used for property files that provide a specific set of instances for a single type. The default instance name will be set to the defaultInstanceName given- Specified by:
createPropertyHandleOfSpecificTypein interfacePropertyFileService- Parameters:
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 used- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
createPropertyHandleOfSpecificType
Description copied from interface:PropertyFileServiceCreates a PropertyFileHandle for reading an HK2 property file that has a specific type name. This is generally used for property files that provide a specific set of instances for a single type- Specified by:
createPropertyHandleOfSpecificTypein interfacePropertyFileService- Parameters:
specificTypeName- The non-null, non-empty string specific type name. All instances created or modified with this PropertyFileHandle will be in this type- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
createPropertyHandleOfAnyType
public PropertyFileHandle createPropertyHandleOfAnyType(String defaultTypeName, String defaultInstanceName) Description copied from interface:PropertyFileServiceCreates a PropertyFileHandle for reading an HK2 property file. This is used for property files that provide instances of multiple types within the same property file- Specified by:
createPropertyHandleOfAnyTypein interfacePropertyFileService- Parameters:
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 used- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
createPropertyHandleOfAnyType
Description copied from interface:PropertyFileServiceCreates a PropertyFileHandle for reading an HK2 property file. This is used for property files that provide instances of multiple types within the same property file. Will use the default type name of DEFAULT_TYPE for types that cannot be determined and the default instance name of DEFAULT for instance names that cannot be determined- Specified by:
createPropertyHandleOfAnyTypein interfacePropertyFileService- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
addPropertyFileBean
Description copied from interface:PropertyFileServiceThis is a utility method that will add the givenPropertyFileBeanto the Hub for use in configuring this service- Specified by:
addPropertyFileBeanin interfacePropertyFileService- Parameters:
propertyFileBean- The non-null property file bean that should either be added to the Hub or be used to modify the existing bean in the hub
-
removePropertyFileBean
public void removePropertyFileBean()Description copied from interface:PropertyFileServiceThis is a utility method that will remove thePropertyFileBeanfrom the Hub if it is present- Specified by:
removePropertyFileBeanin interfacePropertyFileService
-