public class OMRSRepositoryPropertiesUtilities extends Object implements OMRSRepositoryPropertiesHelper
| Constructor and Description |
|---|
OMRSRepositoryPropertiesUtilities() |
| Modifier and Type | Method and Description |
|---|---|
InstanceProperties |
addBooleanPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
boolean propertyValue,
String methodName)
Add the supplied property to an instance properties object.
|
InstanceProperties |
addDatePropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
Date propertyValue,
String methodName)
Add the supplied property to an instance properties object.
|
InstanceProperties |
addEnumPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
int ordinal,
String symbolicName,
String description,
String methodName)
Add the supplied property to an instance properties object.
|
InstanceProperties |
addFloatPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
float propertyValue,
String methodName)
Add the supplied property to an instance properties object.
|
InstanceProperties |
addIntPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
int propertyValue,
String methodName)
Add the supplied property to an instance properties object.
|
InstanceProperties |
addLongPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
long propertyValue,
String methodName)
Add the supplied property to an instance properties object.
|
InstanceProperties |
addMapPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
Map<String,Object> mapValues,
String methodName)
Add the supplied map property to an instance properties object.
|
InstanceProperties |
addPropertyMapToInstance(String sourceName,
InstanceProperties properties,
Map<String,Object> mapValues,
String methodName)
Add the supplied property map to an instance properties object.
|
InstanceProperties |
addStringArrayPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
List<String> arrayValues,
String methodName)
Add the supplied array property to an instance properties object.
|
InstanceProperties |
addStringMapPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
Map<String,String> mapValues,
String methodName)
Add the supplied map property to an instance properties object.
|
InstanceProperties |
addStringPropertyMapToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
Map<String,String> mapValues,
String methodName)
Add the supplied property map to an instance properties object.
|
InstanceProperties |
addStringPropertyToInstance(String sourceName,
InstanceProperties properties,
String propertyName,
String propertyValue,
String methodName)
Add the supplied property to an instance properties object.
|
TypeDef |
applyPatch(String sourceName,
TypeDef originalTypeDef,
TypeDefPatch typeDefPatch,
String methodName)
Returns an updated TypeDef that has had the supplied patch applied.
|
boolean |
getBooleanProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or false if property is not found.
|
Date |
getDateProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or null if property is not found.
|
List<String> |
getInstancePropertiesAsArray(InstanceProperties instanceProperties,
String callingMethodName)
Convert the values in the instance properties into a String Array.
|
Map<String,Object> |
getInstancePropertiesAsMap(InstanceProperties instanceProperties)
Convert an instance properties object into a map.
|
int |
getIntProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or 0 if property is not found.
|
Map<String,Object> |
getMapFromProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.
|
InstanceProperties |
getMapProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or null if property is not found.
|
List<String> |
getStringArrayProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String callingMethodName)
Locates and extracts a string array property and extracts its values.
|
Map<String,String> |
getStringMapFromProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.
|
String |
getStringProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or null if property is not found.
|
boolean |
removeBooleanProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or false if property is not found.
|
Date |
removeDateProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or null if property is not found.
|
int |
removeIntProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or 0 if property is not found.
|
Map<String,Object> |
removeMapFromProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.
|
protected void |
removeProperty(String propertyName,
InstanceProperties properties)
Remove the named property from the instance properties object.
|
List<String> |
removeStringArrayProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Locates and extracts a string array property and extracts its values.
|
Map<String,String> |
removeStringMapFromProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Locates and extracts a property from an instance that is of type map and then converts its values into a Java map.
|
String |
removeStringProperty(String sourceName,
String propertyName,
InstanceProperties properties,
String methodName)
Return the requested property or null if property is not found.
|
void |
validateTypeDefPatch(String sourceName,
TypeDefPatch typeDefPatch,
String methodName)
Verify that a TypeDefPatch is not null and is for a recognized type.
|
protected void removeProperty(String propertyName, InstanceProperties properties)
propertyName - name of property to removeproperties - instance properties object to work onpublic String getStringProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getStringProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic String removeStringProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeStringProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic InstanceProperties getMapProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getMapProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic List<String> getStringArrayProperty(String sourceName, String propertyName, InstanceProperties properties, String callingMethodName)
getStringArrayProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested map propertyproperties - all of the properties of the instancecallingMethodName - method of callerpublic List<String> removeStringArrayProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeStringArrayProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested map propertyproperties - all of the properties of the instancemethodName - method of callerpublic List<String> getInstancePropertiesAsArray(InstanceProperties instanceProperties, String callingMethodName)
instanceProperties - instance properties containing the values. They should all be primitive Strings.callingMethodName - method of callerpublic Map<String,String> getStringMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getStringMapFromProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested map propertyproperties - values of the propertymethodName - method of callerpublic Map<String,String> removeStringMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeStringMapFromProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested map propertyproperties - values of the propertymethodName - method of callerpublic Map<String,Object> getMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getMapFromProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested map propertyproperties - all of the properties of the instancemethodName - method of callerpublic Map<String,Object> removeMapFromProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeMapFromProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested map propertyproperties - values of the propertymethodName - method of callerpublic Map<String,Object> getInstancePropertiesAsMap(InstanceProperties instanceProperties)
getInstancePropertiesAsMap in interface OMRSRepositoryPropertiesHelperinstanceProperties - packed propertiespublic int getIntProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getIntProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic int removeIntProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeIntProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic Date getDateProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getDateProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic Date removeDateProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeDateProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic boolean getBooleanProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
getBooleanProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic boolean removeBooleanProperty(String sourceName, String propertyName, InstanceProperties properties, String methodName)
removeBooleanProperty in interface OMRSRepositoryPropertiesHelpersourceName - source of callpropertyName - name of requested propertyproperties - properties from the instance.methodName - method of callerpublic InstanceProperties addStringPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, String propertyValue, String methodName)
addStringPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertypropertyValue - value of propertymethodName - calling method namepublic InstanceProperties addIntPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, int propertyValue, String methodName)
addIntPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertypropertyValue - value of propertymethodName - calling method namepublic InstanceProperties addLongPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, long propertyValue, String methodName)
addLongPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to may be null.propertyName - name of propertypropertyValue - value of propertymethodName - calling method namepublic InstanceProperties addFloatPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, float propertyValue, String methodName)
addFloatPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to may be null.propertyName - name of propertypropertyValue - value of propertymethodName - calling method namepublic InstanceProperties addDatePropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Date propertyValue, String methodName)
addDatePropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to may be null.propertyName - name of propertypropertyValue - value of propertymethodName - calling method namepublic InstanceProperties addBooleanPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, boolean propertyValue, String methodName)
addBooleanPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertypropertyValue - value of propertymethodName - calling method namepublic InstanceProperties addEnumPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, int ordinal, String symbolicName, String description, String methodName)
addEnumPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertyordinal - numeric value of propertysymbolicName - String value of propertydescription - String description of property valuemethodName - calling method namepublic InstanceProperties addStringArrayPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, List<String> arrayValues, String methodName)
addStringArrayPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertyarrayValues - contents of the arraymethodName - calling method namepublic InstanceProperties addMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String,Object> mapValues, String methodName)
addMapPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertymapValues - contents of the mapmethodName - calling method namepublic InstanceProperties addStringMapPropertyToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String,String> mapValues, String methodName)
addStringMapPropertyToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertymapValues - contents of the mapmethodName - calling method namepublic InstanceProperties addPropertyMapToInstance(String sourceName, InstanceProperties properties, Map<String,Object> mapValues, String methodName)
addPropertyMapToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.mapValues - contents of the mapmethodName - calling method namepublic InstanceProperties addStringPropertyMapToInstance(String sourceName, InstanceProperties properties, String propertyName, Map<String,String> mapValues, String methodName)
addStringPropertyMapToInstance in interface OMRSRepositoryPropertiesHelpersourceName - name of callerproperties - properties object to add property to, may be null.propertyName - name of propertymapValues - contents of the mapmethodName - calling method namepublic void validateTypeDefPatch(String sourceName, TypeDefPatch typeDefPatch, String methodName) throws InvalidParameterException, PatchErrorException
sourceName - source of the request (used for logging)typeDefPatch - typeDefPatch to testmethodName - calling methodInvalidParameterException - the original typeDef or typeDefPatch is nullPatchErrorException - the typeDefPatch is invalidpublic TypeDef applyPatch(String sourceName, TypeDef originalTypeDef, TypeDefPatch typeDefPatch, String methodName) throws InvalidParameterException, PatchErrorException
sourceName - source of the TypeDef (used for logging)originalTypeDef - typeDef to updatetypeDefPatch - patch to applymethodName - calling methodInvalidParameterException - the original typeDef or typeDefPatch is nullPatchErrorException - the patch is either badly formatted, or does not apply to the supplied TypeDefCopyright © 2018–2020 ODPi. All rights reserved.