public final class IdentifierParsingUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Optional<String> |
getNamespace(String stringRepresentation) |
static ComponentIdentifier |
parseComponentIdentifier(String stringRepresentation,
String defaultNamespace)
Creates a
ComponentIdentifier from a string representation where the expected format is namespace:name. |
static ComponentIdentifier |
parseErrorType(String stringRepresentation,
String defaultNamespace)
Creates a
ComponentIdentifier for an error type from a string representation where the expected format is
NAMESPACE:TYPE. |
public static ComponentIdentifier parseComponentIdentifier(String stringRepresentation, String defaultNamespace)
ComponentIdentifier from a string representation where the expected format is namespace:name. If the string
doesn't contain the namespace then it just needs to be the name of the component and the namespace will default to the passed
defaultNamespace.stringRepresentation - the component identifier represented as a stringdefaultNamespace - if the passed string representation doesn't have a namespace, the resulting
ComponentIdentifier will use this value as the namespace.ComponentIdentifier created from its string representation.public static ComponentIdentifier parseErrorType(String stringRepresentation, String defaultNamespace)
ComponentIdentifier for an error type from a string representation where the expected format is
NAMESPACE:TYPE. If the string doesn't contain the namespace then it just needs to be the error type, and the namespace will
default to the passed defaultNamespace.stringRepresentation - the error type represented as a stringdefaultNamespace - if the passed string representation doesn't have a namespace, the resulting
ComponentIdentifier will use this value as the namespace.ComponentIdentifier created from its string representation.public static Optional<String> getNamespace(String stringRepresentation)
stringRepresentation - the string representation of a ComponentIdentifierOptional otherwise.Copyright © 2022 MuleSoft, Inc.. All rights reserved.