Class BrowseMetadataUtil

java.lang.Object
com.sas.services.information.browse.BrowseMetadataUtil

public class BrowseMetadataUtil extends Object
Utility class for browse metadata objects.
Since:
9.4
  • Constructor Details

    • BrowseMetadataUtil

      public BrowseMetadataUtil()
  • Method Details

    • getPublicType

      public static String getPublicType(BrowseMetadataInterface browse)
      Returns the public type value of the browse metadtata object, or null if not found.
      Parameters:
      browse - the browse metadata object
      Returns:
      the public type value
    • getUsageVersion

      public static com.sas.util.UsageVersion getUsageVersion(BrowseMetadataInterface browse)
      The usage version of this object. Returns a null value if a usage version was not found.
      Parameters:
      browse - the browse metadata object
      Returns:
      the object's version
    • getDisplayName

      public static String getDisplayName(BrowseMetadataInterface browse)
      Returns the display name for a given browse metadata object if it exists. Not all objects support a display name property. If the object doesn't, or the display name cannot be found, the object's regular name attribute will be returned instead.
      Parameters:
      browse - the browse metadata object
      Returns:
      the object's display name if it exists, otherwise the object's name
    • getKeywords

      public static List<String> getKeywords(BrowseMetadataInterface browse)
      Extract the keywords property from the given BrowseMetadataInterface as a list of strings. "Keywords" must have been fetched as part of the retrieval of the given browse metadata object.
      Parameters:
      browse - the browse metadata object
      Returns:
      list of keywords
    • getExtendedAttributes

      public static Map<String,String> getExtendedAttributes(BrowseMetadataInterface browse)
      Extract the extended attributes property from the given BrowseMetadataInterface. "Extensions" must have been fetched as part of the retrieval of the given browse metadata object.
      Parameters:
      browse - the browse metadata object
      Returns:
      map of extended attributes as a key/value pair
    • getModifiedBy

      public static String getModifiedBy(BrowseMetadataInterface browse)
      Gets the name of the user that modified the object.
      Parameters:
      browse - the browse metadata object
      Returns:
      modified by name or null if not found
    • getModifiedByDetails

      public static ResponsibilityDetails getModifiedByDetails(BrowseMetadataInterface browse)
      Gets the details of the user that modified the object.
      Parameters:
      browse - the browse metadata object
      Returns:
      modified by details or null if not found
    • getCreatedBy

      public static String getCreatedBy(BrowseMetadataInterface browse)
      Gets the name of the user that created the object.
      Parameters:
      browse - the browse metadata object
      Returns:
      created by name or null if not found
    • getCreatedByDetails

      public static ResponsibilityDetails getCreatedByDetails(BrowseMetadataInterface browse)
      Gets the details of the user that created the object.
      Parameters:
      browse - the browse metadata object
      Returns:
      modified by details or null if not found
    • getResponsibilities

      public static List<ResponsibilityDetails> getResponsibilities(BrowseMetadataInterface browse)
      Extract the responsibilities property from the given BrowseMetadataInterface. "ResponsibleParties" must have been fetched as part of the retrieval of the given browse metadata object.
      Parameters:
      browse - the browse metadata object
      Returns:
      list of responsibilities
    • getDisplayPath

      public static String getDisplayPath(BrowseMetadataInterface browse)
      Returns the display path for the given browse metadata object. This method is only applicable to objects that are contained directly by a folder. It cannot be used for extended paths.

      Note, callers must make sure the object's ancestors list (i.e. its parent folders) is populated prior to calling this method. If a path cannot be constructed, a null will be returned. To do so, a template containing the following information can be used. The "MetadataType" element in the template will need to be substituted with the metadata type of the browse object.

       <MetadataType>
           <Trees/>   
       </MetadataType>
       <Tree>
           <ParentTree/>
           <SoftwareComponents/>
       </Tree>
       
      Parameters:
      browse -
      Returns:
      display path
      See Also:
    • getAbsolutePath

      public static String getAbsolutePath(BrowseMetadataInterface browse)
      Returns the absolute path for the given browse metadata object. The absolute path of an object contains the object's full path, as well as its type value. This method is only applicable to objects that are contained directly by a folder. It cannot be used for extended paths.

      Note, callers must make sure the object's ancestors list (i.e. its parent folders) is populated prior to calling this method. If a path cannot be constructed, a null will be returned.

      For more information, see getDisplayPath(BrowseMetadataInterface).

      Parameters:
      browse -
      Returns:
      display path
      See Also: