com.ibm.jarm.api.util

Class NamingUtils

  • java.lang.Object
    • com.ibm.jarm.api.util.NamingUtils


  • public class NamingUtils
    extends java.lang.Object
    A utility class that provides support for auto-generated entity names and validation of such.
    • Method Detail

      • generateNextVolumeName

        public static java.lang.String generateNextVolumeName(RecordVolumeContainer parent)
        This procedure generates the next name for a record volume based on the parent container specified. The volume name is usually incremented off the previous record volume's name.
        Parameters:
        parent - the RecordVolumeContainer parent of the record volume that will have its name generated.
        Returns:
        A name String generated for the next volume based on the given parent container.
      • generateRecordNameFromPattern

        public static java.lang.String generateRecordNameFromPattern(Container parent)
        This procedure generates the name for a record based on the naming pattern specified. It processes the substitution macros for dates, numbers, username, and metadata on its parent.
        Parameters:
        parent - the Container parent of the record being created. This entry cannot be null.
        Returns:
        A name String generated based on naming pattern and macro substitution.
      • generateCategoryNameFromPattern

        public static java.lang.String generateCategoryNameFromPattern(Container parent)
        This procedure generates the name for a record category based on the naming pattern specified. It processes the substitution macros for dates, numbers, username, and metadata on its parent.
        Parameters:
        parent - the Container parent of the record category being created. This entry cannot be null.
        Returns:
        The name String generated based on naming pattern and macro substitution.
      • generateFolderNameFromPattern

        public static java.lang.String generateFolderNameFromPattern(RecordContainer parent)
        This procedure generates the name for a record folder based on the naming pattern specified. It processes the substitution macros for dates, numbers, username, and metadata on its parent.
        Parameters:
        parent - the Container parent of the record folder being created. This entry cannot be null.
        Returns:
        The name String generated based on naming pattern and macro substitution.
      • isRecordNameConsistentWithPattern

        public static java.lang.Boolean isRecordNameConsistentWithPattern(java.lang.String proposedName,
                                                          Container parent)
        This procedure validates a proposed name for a record based on the naming pattern for its container. It processes the substitution macros for dates, numbers, username, and metadata on its parent and assure that the proposed name matches the pattern.
        Parameters:
        proposedName - the proposed name String for the record that is checked against the pattern.
        parent - the Container parent of the record being created. This entry cannot be null.
        Returns:
        Boolean.TRUE if the name is consistent with the pattern OR if no pattern applies, Boolean.FALSE otherwise.
      • isCategoryNameConsistentWithPattern

        public static java.lang.Boolean isCategoryNameConsistentWithPattern(java.lang.String proposedName,
                                                            Container parent)
        This procedure validates the proposed name for a record category based on the naming pattern. It processes the substitution macros for dates, numbers, username, and metadata on its parent.
        Parameters:
        proposedName - the proposed name String for the record category to validate against the pattern.
        parent - the Container parent of the record category being created. This entry cannot be null.
        Returns:
        Boolean.TRUE if the name is consistent with the pattern or if no pattern applies, Boolean.FALSE otherwise.
      • isFolderNameConsistentWithPattern

        public static java.lang.Boolean isFolderNameConsistentWithPattern(java.lang.String proposedName,
                                                          Container parent)
        This procedure validates the name for a record folder based on the naming pattern. It processes the substitution macros for dates, numbers, username, and metadata on its parent.
        Parameters:
        proposedName - The proposed name String for the record folder to validate against the pattern.
        parent - The parent Container of the record folder being created. This entry cannot be null.
        Returns:
        Boolean.TRUE if the name is consistent with the pattern OR if no pattern applies, Boolean.FALSE otherwise.
      • isNamingPatternValid

        public static java.lang.Boolean isNamingPatternValid(java.lang.String namingPattern)
        This procedure validates whether a naming pattern is valid. It checks that all of the macros are valid, but it does not check the property names specified by [parent.xxxxx]
        Parameters:
        namingPattern - The naming pattern to validate
        Returns:
        Boolean.TRUE if the specified pattern is valid, Boolean.FALSE otherwise.
      • getNamingPatternSequence

        public static NamingPatternSequence getNamingPatternSequence(Container parent)
        This procedure will retrieve a naming pattern sequence object associcated with a container
        Parameters:
        parent - - retrieve the object associated with this container
        Returns:
        the naming pattern sequence object or null if one does not exist

© Copyright IBM Corp. 2010, 2013. All Rights Reserved.