Class PropertyFileServiceImpl
- java.lang.Object
-
- org.glassfish.hk2.configuration.persistence.properties.internal.PropertyFileServiceImpl
-
- All Implemented Interfaces:
PropertyFileService
@Service public class PropertyFileServiceImpl extends Object implements 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 Constructor Description PropertyFileServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyFileBean(PropertyFileBean propertyFileBean)
This is a utility method that will add the givenPropertyFileBean
to the Hub for use in configuring this servicePropertyFileHandle
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 thePropertyFileBean
from the Hub if it is present
-
-
-
Method Detail
-
createPropertyHandleOfSpecificType
public PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName, String defaultInstanceName)
Description copied from interface:PropertyFileService
Creates 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:
createPropertyHandleOfSpecificType
in 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
public PropertyFileHandle createPropertyHandleOfSpecificType(String specificTypeName)
Description copied from interface:PropertyFileService
Creates 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:
createPropertyHandleOfSpecificType
in 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:PropertyFileService
Creates 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:
createPropertyHandleOfAnyType
in 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
public PropertyFileHandle createPropertyHandleOfAnyType()
Description copied from interface:PropertyFileService
Creates 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:
createPropertyHandleOfAnyType
in interfacePropertyFileService
- Returns:
- A non-null PropertyFileHandle that can be used to read the property file
-
addPropertyFileBean
public void addPropertyFileBean(PropertyFileBean propertyFileBean)
Description copied from interface:PropertyFileService
This is a utility method that will add the givenPropertyFileBean
to the Hub for use in configuring this service- Specified by:
addPropertyFileBean
in 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:PropertyFileService
This is a utility method that will remove thePropertyFileBean
from the Hub if it is present- Specified by:
removePropertyFileBean
in interfacePropertyFileService
-
-