Package com.caplin.motif.datasource
Class TokenisedSubjectUtil
- java.lang.Object
-
- com.caplin.motif.datasource.TokenisedSubjectUtil
-
public class TokenisedSubjectUtil extends Object
Util to retrieve values from a given subject defined by the namespace and tokens that the namespace.
-
-
Constructor Summary
Constructors Constructor Description TokenisedSubjectUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getUsername(String subject, String... nameSpaces)
Retrieve username from subject based on nameSpace location.static String
getVariable(String subject, String variableToken, String... nameSpaces)
Retrieve value from subject for the token defined in namespaces given.static boolean
isValid(String subject, String tokenisedNamespace, String... variableTokens)
-
-
-
Method Detail
-
isValid
public static boolean isValid(String subject, String tokenisedNamespace, String... variableTokens)
-
getUsername
public static String getUsername(String subject, String... nameSpaces)
Retrieve username from subject based on nameSpace location.- Parameters:
subject
- contains subject to obtain usernamenameSpaces
- contains String for nameSpace location- Returns:
- username or null.
-
getVariable
public static String getVariable(String subject, String variableToken, String... nameSpaces)
Retrieve value from subject for the token defined in namespaces given.- Parameters:
subject
- String for subject to returnvariableToken
- contains value for defined tokennameSpaces
- contains the String for nameSpaces- Returns:
- value defined by token or null.clear
-
-