Class OMRSRepositoryPropertiesUtilities

  • All Implemented Interfaces:
    OMRSRepositoryPropertiesHelper

    public class OMRSRepositoryPropertiesUtilities
    extends Object
    implements OMRSRepositoryPropertiesHelper
    OMRSRepositoryPropertiesUtilities implements the methods to add and remove values from InstanceProperties objects as defined by the OMRSRepositoryPropertiesHelper interface.
    • Field Detail

      • METADATA_COLLECTION_ID_PROPERTY_NAME

        public static final String METADATA_COLLECTION_ID_PROPERTY_NAME
        See Also:
        Constant Field Values
      • METADATA_COLLECTION_NAME_PROPERTY_NAME

        public static final String METADATA_COLLECTION_NAME_PROPERTY_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • OMRSRepositoryPropertiesUtilities

        public OMRSRepositoryPropertiesUtilities()
    • Method Detail

      • removeProperty

        protected void removeProperty​(String propertyName,
                                      InstanceProperties properties)
        Remove the named property from the instance properties object.
        Parameters:
        propertyName - name of property to remove
        properties - instance properties object to work on
      • getStringProperty

        public String getStringProperty​(String sourceName,
                                        String propertyName,
                                        InstanceProperties properties,
                                        String methodName)
        Return the requested property or null if property is not found. If the property is not a string property then a logic exception is thrown
        Specified by:
        getStringProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • removeStringProperty

        public String removeStringProperty​(String sourceName,
                                           String propertyName,
                                           InstanceProperties properties,
                                           String methodName)
        Return the requested property or null if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a string property then a logic exception is thrown.
        Specified by:
        removeStringProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • getEnumPropertyOrdinal

        public int getEnumPropertyOrdinal​(String sourceName,
                                          String propertyName,
                                          InstanceProperties properties,
                                          String methodName)
        Retrieve the ordinal value from an enum property.
        Specified by:
        getEnumPropertyOrdinal in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        int ordinal or -1 if not found
      • removeEnumPropertyOrdinal

        public int removeEnumPropertyOrdinal​(String sourceName,
                                             String propertyName,
                                             InstanceProperties properties,
                                             String methodName)
        Retrieve the ordinal value from an enum property.
        Specified by:
        removeEnumPropertyOrdinal in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        int ordinal or -1 if not found
      • getMapProperty

        public InstanceProperties getMapProperty​(String sourceName,
                                                 String propertyName,
                                                 InstanceProperties properties,
                                                 String methodName)
        Return the requested property or null if property is not found. If the property is not a map property then a logic exception is thrown
        Specified by:
        getMapProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • getStringArrayProperty

        public List<String> getStringArrayProperty​(String sourceName,
                                                   String propertyName,
                                                   InstanceProperties properties,
                                                   String callingMethodName)
        Locates and extracts a string array property and extracts its values.
        Specified by:
        getStringArrayProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - all the properties of the instance
        callingMethodName - method of caller
        Returns:
        array property value or null
      • removeStringArrayProperty

        public List<String> removeStringArrayProperty​(String sourceName,
                                                      String propertyName,
                                                      InstanceProperties properties,
                                                      String methodName)
        Locates and extracts a string array property and extracts its values. If the property is found, it is removed from the InstanceProperties structure. If the property is not an array property then a logic exception is thrown.
        Specified by:
        removeStringArrayProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - all the properties of the instance
        methodName - method of caller
        Returns:
        array property value or null
      • getStringMapFromProperty

        public 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.
        Specified by:
        getStringMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • removeStringMapFromProperty

        public 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. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.
        Specified by:
        removeStringMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • getBooleanMapFromProperty

        public Map<String,​Boolean> getBooleanMapFromProperty​(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.
        Specified by:
        getBooleanMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • removeBooleanMapFromProperty

        public Map<String,​Boolean> removeBooleanMapFromProperty​(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. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.
        Specified by:
        removeBooleanMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • getLongMapFromProperty

        public Map<String,​Long> getLongMapFromProperty​(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.
        Specified by:
        getLongMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • removeLongMapFromProperty

        public Map<String,​Long> removeLongMapFromProperty​(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. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.
        Specified by:
        removeLongMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • getIntegerMapFromProperty

        public Map<String,​Integer> getIntegerMapFromProperty​(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.
        Specified by:
        getIntegerMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • removeIntegerMapFromProperty

        public Map<String,​Integer> removeIntegerMapFromProperty​(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. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.
        Specified by:
        removeIntegerMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • getMapFromProperty

        public 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.
        Specified by:
        getMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - all the properties of the instance
        methodName - method of caller
        Returns:
        map property value or null
      • removeMapFromProperty

        public 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. If the property is found, it is removed from the InstanceProperties structure. If the property is not a map property then a logic exception is thrown.
        Specified by:
        removeMapFromProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested map property
        properties - values of the property
        methodName - method of caller
        Returns:
        map property value or null
      • getIntProperty

        public int getIntProperty​(String sourceName,
                                  String propertyName,
                                  InstanceProperties properties,
                                  String methodName)
        Return the requested property or 0 if property is not found. If the property is not an int property then a logic exception is thrown.
        Specified by:
        getIntProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • removeIntProperty

        public int removeIntProperty​(String sourceName,
                                     String propertyName,
                                     InstanceProperties properties,
                                     String methodName)
        Return the requested property or 0 if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not an int property then a logic exception is thrown.
        Specified by:
        removeIntProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • getDateProperty

        public Date getDateProperty​(String sourceName,
                                    String propertyName,
                                    InstanceProperties properties,
                                    String methodName)
        Return the requested property or null if property is not found. If the property is not a date property then a logic exception is thrown.
        Specified by:
        getDateProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • removeDateProperty

        public Date removeDateProperty​(String sourceName,
                                       String propertyName,
                                       InstanceProperties properties,
                                       String methodName)
        Return the requested property or null if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a date property then a logic exception is thrown.
        Specified by:
        removeDateProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • getBooleanProperty

        public boolean getBooleanProperty​(String sourceName,
                                          String propertyName,
                                          InstanceProperties properties,
                                          String methodName)
        Return the requested property or false if property is not found. If the property is not a boolean property then a logic exception is thrown
        Specified by:
        getBooleanProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • removeBooleanProperty

        public boolean removeBooleanProperty​(String sourceName,
                                             String propertyName,
                                             InstanceProperties properties,
                                             String methodName)
        Return the requested property or false if property is not found. If the property is found, it is removed from the InstanceProperties structure. If the property is not a boolean property then a logic exception is thrown.
        Specified by:
        removeBooleanProperty in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - source of call
        propertyName - name of requested property
        properties - properties from the instance.
        methodName - method of caller
        Returns:
        string property value or null
      • addStringPropertyToInstance

        public InstanceProperties addStringPropertyToInstance​(String sourceName,
                                                              InstanceProperties properties,
                                                              String propertyName,
                                                              String propertyValue,
                                                              String methodName)
        Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addStringPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        propertyValue - value of property
        methodName - calling method name
        Returns:
        instance properties object.
      • addIntPropertyToInstance

        public InstanceProperties addIntPropertyToInstance​(String sourceName,
                                                           InstanceProperties properties,
                                                           String propertyName,
                                                           int propertyValue,
                                                           String methodName)
        Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addIntPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        propertyValue - value of property
        methodName - calling method name
        Returns:
        instance properties object.
      • addLongPropertyToInstance

        public InstanceProperties addLongPropertyToInstance​(String sourceName,
                                                            InstanceProperties properties,
                                                            String propertyName,
                                                            long propertyValue,
                                                            String methodName)
        Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addLongPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to may be null.
        propertyName - name of property
        propertyValue - value of property
        methodName - calling method name
        Returns:
        instance properties object.
      • addFloatPropertyToInstance

        public InstanceProperties addFloatPropertyToInstance​(String sourceName,
                                                             InstanceProperties properties,
                                                             String propertyName,
                                                             float propertyValue,
                                                             String methodName)
        Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addFloatPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to may be null.
        propertyName - name of property
        propertyValue - value of property
        methodName - calling method name
        Returns:
        instance properties object.
      • addDatePropertyToInstance

        public InstanceProperties addDatePropertyToInstance​(String sourceName,
                                                            InstanceProperties properties,
                                                            String propertyName,
                                                            Date propertyValue,
                                                            String methodName)
        If the supplied property is not null, add it to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addDatePropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to may be null.
        propertyName - name of property
        propertyValue - value of property
        methodName - calling method name
        Returns:
        instance properties object.
      • addBooleanPropertyToInstance

        public InstanceProperties addBooleanPropertyToInstance​(String sourceName,
                                                               InstanceProperties properties,
                                                               String propertyName,
                                                               boolean propertyValue,
                                                               String methodName)
        Add the supplied property to an instance properties object. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addBooleanPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        propertyValue - value of property
        methodName - calling method name
        Returns:
        instance properties object.
      • addEnumPropertyToInstance

        public 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. If the instance property object supplied is null, a new instance properties object is created.
        Specified by:
        addEnumPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        ordinal - numeric value of property
        symbolicName - String value of property
        description - String description of property value
        methodName - calling method name
        Returns:
        instance properties object.
      • addStringArrayPropertyToInstance

        public InstanceProperties addStringArrayPropertyToInstance​(String sourceName,
                                                                   InstanceProperties properties,
                                                                   String propertyName,
                                                                   List<String> arrayValues,
                                                                   String methodName)
        If the supplied array property is not null, add it to an instance properties object. The supplied array is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addStringArrayPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        arrayValues - contents of the array
        methodName - calling method name
        Returns:
        instance properties object.
      • addMapPropertyToInstance

        public InstanceProperties addMapPropertyToInstance​(String sourceName,
                                                           InstanceProperties properties,
                                                           String propertyName,
                                                           Map<String,​Object> mapValues,
                                                           String methodName)
        If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addMapPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addStringMapPropertyToInstance

        public InstanceProperties addStringMapPropertyToInstance​(String sourceName,
                                                                 InstanceProperties properties,
                                                                 String propertyName,
                                                                 Map<String,​String> mapValues,
                                                                 String methodName)
        If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addStringMapPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addBooleanMapPropertyToInstance

        public InstanceProperties addBooleanMapPropertyToInstance​(String sourceName,
                                                                  InstanceProperties properties,
                                                                  String propertyName,
                                                                  Map<String,​Boolean> mapValues,
                                                                  String methodName)
        If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addBooleanMapPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addLongMapPropertyToInstance

        public InstanceProperties addLongMapPropertyToInstance​(String sourceName,
                                                               InstanceProperties properties,
                                                               String propertyName,
                                                               Map<String,​Long> mapValues,
                                                               String methodName)
        If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addLongMapPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addIntMapPropertyToInstance

        public InstanceProperties addIntMapPropertyToInstance​(String sourceName,
                                                              InstanceProperties properties,
                                                              String propertyName,
                                                              Map<String,​Integer> mapValues,
                                                              String methodName)
        If the supplied map property is not null, add it to an instance properties object. The supplied map is stored as a single property in the instances properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addIntMapPropertyToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addPropertyMapToInstance

        public InstanceProperties addPropertyMapToInstance​(String sourceName,
                                                           InstanceProperties properties,
                                                           Map<String,​Object> mapValues,
                                                           String methodName)
        Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addPropertyMapToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addStringPropertyMapToInstance

        public InstanceProperties addStringPropertyMapToInstance​(String sourceName,
                                                                 InstanceProperties properties,
                                                                 String propertyName,
                                                                 Map<String,​String> mapValues,
                                                                 String methodName)
        Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addStringPropertyMapToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addBooleanPropertyMapToInstance

        public InstanceProperties addBooleanPropertyMapToInstance​(String sourceName,
                                                                  InstanceProperties properties,
                                                                  String propertyName,
                                                                  Map<String,​Boolean> mapValues,
                                                                  String methodName)
        Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addBooleanPropertyMapToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addLongPropertyMapToInstance

        public InstanceProperties addLongPropertyMapToInstance​(String sourceName,
                                                               InstanceProperties properties,
                                                               String propertyName,
                                                               Map<String,​Long> mapValues,
                                                               String methodName)
        Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addLongPropertyMapToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • addIntPropertyMapToInstance

        public InstanceProperties addIntPropertyMapToInstance​(String sourceName,
                                                              InstanceProperties properties,
                                                              String propertyName,
                                                              Map<String,​Integer> mapValues,
                                                              String methodName)
        Add the supplied property map to an instance properties object. Each of the entries in the map is added as a separate property in instance properties unless it is null. If the instance properties object supplied is null, a new instance properties object is created.
        Specified by:
        addIntPropertyMapToInstance in interface OMRSRepositoryPropertiesHelper
        Parameters:
        sourceName - name of caller
        properties - properties object to add property to, may be null.
        propertyName - name of property
        mapValues - contents of the map
        methodName - calling method name
        Returns:
        instance properties object.
      • applyPatch

        public TypeDef applyPatch​(String sourceName,
                                  TypeDef originalTypeDef,
                                  TypeDefPatch typeDefPatch,
                                  String methodName)
                           throws InvalidParameterException,
                                  PatchErrorException
        Returns an updated TypeDef that has had the supplied patch applied. It throws an exception if any part of the patch is incompatible with the original TypeDef. For example, if there is a mismatch between the type or version that either represents.
        Parameters:
        sourceName - source of the TypeDef (used for logging)
        originalTypeDef - typeDef to update
        typeDefPatch - patch to apply
        methodName - calling method
        Returns:
        updated TypeDef
        Throws:
        InvalidParameterException - the original typeDef or typeDefPatch is null
        PatchErrorException - the patch is either badly formatted, or does not apply to the supplied TypeDef
      • getUniquePropertiesList

        protected List<String> getUniquePropertiesList​(List<TypeDefAttribute> definedAttributes,
                                                       List<String> currentList)
        Add the list of unique properties for the type to the supplied list and return the combined results.
        Parameters:
        definedAttributes - list of attributes defined for the typedef
        currentList - current list of properties extracted from the subtypes
        Returns:
        accumulated list of properties.