Class Util
- java.lang.Object
-
- com.tibco.tibems.tibemsd.security.Util
-
public class Util extends java.lang.Object
Provides some utility functions for implementors of authorization systems.
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isDestinationContainedBy(java.lang.String destination, java.lang.String wildcard)
This will test whether the given destination is a subset of the given wildcard.static boolean
isDestinationMatchedBy(java.lang.String destination1, java.lang.String destination2)
Tests whether the two destinations are a match, in the general sense.static boolean
isWildcard(java.lang.String destination)
Tests for a wildcard destination.
-
-
-
Method Detail
-
isDestinationContainedBy
public static boolean isDestinationContainedBy(java.lang.String destination, java.lang.String wildcard)
This will test whether the given destination is a subset of the given wildcard. No checking is done for well-formed names."foo.*.bar", "foo.>"
returns true."foo.>", "foo.*.bar"
returns false."foo.*.bar", "foo.bar.*"
returns false.- Parameters:
destination
-wildcard
-- Returns:
- true if the destination is a match for the wildcard.
-
isDestinationMatchedBy
public static boolean isDestinationMatchedBy(java.lang.String destination1, java.lang.String destination2)
Tests whether the two destinations are a match, in the general sense."foo.*.bar", "foo.>"
returns true."foo.>", "foo.*.bar"
returns true."foo.*.bar", "foo.bar.*"
returns true."foo.*", "bar"
returns false.- Parameters:
destination1
-destination2
-- Returns:
- true if the destinations match.
-
isWildcard
public static boolean isWildcard(java.lang.String destination)
Tests for a wildcard destination. Any destination containing a ">" or a "*" token is considered a wildcard.- Parameters:
destination
-- Returns:
- true if the destination contains a > or * token.
-
-