Package com.caplin.motif.datasource
Class TokenisedSubjectUtil
- java.lang.Object
-
- com.caplin.motif.datasource.TokenisedSubjectUtil
-
public class TokenisedSubjectUtil extends java.lang.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 java.lang.String
getUsername(java.lang.String subject, java.lang.String... nameSpaces)
Retrieve username from subject based on nameSpace location.static java.lang.String
getVariable(java.lang.String subject, java.lang.String variableToken, java.lang.String... nameSpaces)
Retrieve value from subject for the token defined in namespaces given.static boolean
isValid(java.lang.String subject, java.lang.String tokenisedNamespace, java.lang.String... variableTokens)
-
-
-
Method Detail
-
isValid
public static boolean isValid(java.lang.String subject, java.lang.String tokenisedNamespace, java.lang.String... variableTokens)
-
getUsername
public static java.lang.String getUsername(java.lang.String subject, java.lang.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 java.lang.String getVariable(java.lang.String subject, java.lang.String variableToken, java.lang.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
-
-