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 Details

    • TokenisedSubjectUtil

      public TokenisedSubjectUtil()
  • Method Details

    • 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 username
      nameSpaces - 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 return
      variableToken - contains value for defined token
      nameSpaces - contains the String for nameSpaces
      Returns:
      value defined by token or null.clear