Interface SessionWebService

All Superinterfaces:
Remote

public interface SessionWebService extends Remote
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Starts a explicit transaction for the current session.
    void
    Terminates the current session.
    void
    endTransaction(boolean rollback)
    Ends the explicit transaction of the current session by either commit or rollback.
    boolean
    Checks if a user is logged in for the current session.
    void
    logIn(String userName, String password)
    Logs a user in for the current session.
    void
    logInWithToken(String mechanism, String username, String token)
    This method works for both Teamcenter Security Services SSO and Personal Access Tokens (since Polarion 3.22.1).
    boolean
    Check if there is a explicit transaction (started with beginTransaction) for the current session.
  • Method Details

    • beginTransaction

      void beginTransaction() throws RemoteException
      Starts a explicit transaction for the current session. Usually transactions are started and committed for each call to the webservice, but if a transaction has been started explicitly it also has to be terminated using endTransaction.
      Throws:
      RemoteException
    • endSession

      void endSession() throws RemoteException
      Terminates the current session.
      Throws:
      RemoteException
    • endTransaction

      void endTransaction(boolean rollback) throws RemoteException
      Ends the explicit transaction of the current session by either commit or rollback.
      Parameters:
      rollback - if true the transaction is rolled back otherwise it is commited.
      Throws:
      RemoteException
    • hasSubject

      boolean hasSubject() throws RemoteException
      Checks if a user is logged in for the current session.
      Throws:
      RemoteException
    • logIn

      void logIn(String userName, String password) throws RemoteException
      Logs a user in for the current session.
      Parameters:
      userName - the name of the user to log-in.
      password - the password of the user to log-in.
      Throws:
      RemoteException
    • logInWithToken

      void logInWithToken(String mechanism, String username, String token) throws RemoteException
      This method works for both Teamcenter Security Services SSO and Personal Access Tokens (since Polarion 3.22.1). Possible (case insensitive) values for the mechanism parameters: TcSS and AccessToken. This will NOT work for the other SSO methods supported by Polarion. (Kerberos, SAML, or OAuth2.) For SAML, OAuth2 (or deprecated Kerberos), you should use the SessionWebService.logIn(username, password) method (LDAP configuration should be enabled for web services) or use an access token.
      Parameters:
      mechanism - the mechanism that the client requests for authentication. If the TcSS mechanism is used, the server must be configured for TcSS. (Otherwise, the login with this mechanism will be rejected.) AccessToken is always accepted.
      username - the name of the user to login. Required for TcSS. null for AccessToken
      token - the token of the user to login.
      Throws:
      RemoteException
      Since:
      3.17.0
    • transactionExists

      boolean transactionExists() throws RemoteException
      Check if there is a explicit transaction (started with beginTransaction) for the current session.
      Throws:
      RemoteException