com.sas.services.information.browse
Class BrowseMetadataUtil

com.sas.services.information.browse.BrowseMetadataUtil

public class BrowseMetadataUtil

Utility class for browse metadata objects.

Since:
9.4

Constructor Summary
BrowseMetadataUtil()
           
 
Method Summary
static java.lang.String getAbsolutePath(BrowseMetadataInterface browse)
          Returns the absolute path for the given browse metadata object.
static java.lang.String getCreatedBy(BrowseMetadataInterface browse)
          Gets the name of the user that created the object.
static ResponsibilityDetails getCreatedByDetails(BrowseMetadataInterface browse)
          Gets the details of the user that created the object.
static java.lang.String getDisplayName(BrowseMetadataInterface browse)
          Returns the display name for a given browse metadata object if it exists.
static java.lang.String getDisplayPath(BrowseMetadataInterface browse)
          Returns the display path for the given browse metadata object.
static java.util.Map<java.lang.String,java.lang.String> getExtendedAttributes(BrowseMetadataInterface browse)
          Extract the extended attributes property from the given BrowseMetadataInterface.
static java.util.List<java.lang.String> getKeywords(BrowseMetadataInterface browse)
          Extract the keywords property from the given BrowseMetadataInterface as a list of strings.
static java.lang.String getModifiedBy(BrowseMetadataInterface browse)
          Gets the name of the user that modified the object.
static ResponsibilityDetails getModifiedByDetails(BrowseMetadataInterface browse)
          Gets the details of the user that modified the object.
static java.lang.String getPublicType(BrowseMetadataInterface browse)
          Returns the public type value of the browse metadtata object, or null if not found.
static java.util.List<ResponsibilityDetails> getResponsibilities(BrowseMetadataInterface browse)
          Extract the responsibilities property from the given BrowseMetadataInterface.
static com.sas.util.UsageVersion getUsageVersion(BrowseMetadataInterface browse)
          The usage version of this object.
 

Constructor Detail

BrowseMetadataUtil

public BrowseMetadataUtil()
Method Detail

getPublicType

public static java.lang.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 java.lang.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 java.util.List<java.lang.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 java.util.Map<java.lang.String,java.lang.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 java.lang.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 java.lang.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 java.util.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 java.lang.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:
PathUrl.getDisplayPath()

getAbsolutePath

public static java.lang.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:
PathUrl.getAbsolutePath()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.