Package org.opennms.pris.util
Class AssetUtils
java.lang.Object
org.opennms.pris.util.AssetUtils
Utility methods for normalizing asset field values before they are stored in
a requisition.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringassetStringCleaner(String assetString, Integer maxSize) Cleans up an asset string by stripping trademark markers, abbreviating common vendor and operating-system names, collapsing runs of whitespace and truncating the result to a maximum length.
-
Method Details
-
assetStringCleaner
Cleans up an asset string by stripping trademark markers, abbreviating common vendor and operating-system names, collapsing runs of whitespace and truncating the result to a maximum length.- Parameters:
assetString- the raw asset value, may benullmaxSize- the maximum number of characters to keep- Returns:
- the cleaned value, or an empty string if
assetStringisnull
-