<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_session_rest_service_name) %>;

@javax.annotation.Generated( "Domgen" )
@javax.ws.rs.Path( org.realityforge.replicant.shared.transport.ReplicantContext.SESSION_URL_FRAGMENT )
@javax.ws.rs.Produces( javax.ws.rs.core.MediaType.APPLICATION_JSON )
@javax.enterprise.context.ApplicationScoped
@javax.transaction.Transactional( javax.transaction.Transactional.TxType.REQUIRED )
public class <%= repository.imit.session_rest_service_name %>
  extends org.realityforge.replicant.server.ee.rest.Abstract<%= repository.imit.secured? ? 'Secured' : '' %>SessionRestService
{
  @javax.inject.Inject
  private org.realityforge.replicant.server.transport.ReplicantSessionManager _sessionManager;
<% if repository.imit.secured? -%>
  @javax.inject.Inject
  private org.realityforge.keycloak.sks.SimpleAuthService _authService;
  private boolean _disableSessionServiceProtection;

  @javax.annotation.Nonnull
  @java.lang.Override
  protected org.realityforge.keycloak.sks.SimpleAuthService getAuthService()
  {
    return _authService;
  }

  @java.lang.Override
  protected boolean disableSecurity()
  {
    return _disableSessionServiceProtection;
  }
<% end -%>

  @java.lang.Override
  protected org.realityforge.replicant.server.transport.ReplicantSessionManager getSessionManager()
  {
    return _sessionManager;
  }

  @java.lang.Override
  @javax.annotation.PostConstruct
  public void postConstruct()
  {
    super.postConstruct();
<% if repository.imit.secured? -%>
    try
    {
      _disableSessionServiceProtection = new javax.naming.InitialContext().lookup( "<%= Reality::Naming.underscore(repository.name) -%>/env/disable_session_service_protection" ).equals( Boolean.TRUE );
    }
    catch ( final java.lang.Exception e )
    {
      //Ignored.
    }
<% end -%>
  }<commit_msg>Update session rest service to work with the latest replicant API<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_session_rest_service_name) %>;

@javax.annotation.Generated( "Domgen" )
@javax.ws.rs.Path( org.realityforge.replicant.shared.transport.ReplicantContext.SESSION_URL_FRAGMENT )
@javax.ws.rs.Produces( javax.ws.rs.core.MediaType.APPLICATION_JSON )
@javax.enterprise.context.ApplicationScoped
@javax.transaction.Transactional( javax.transaction.Transactional.TxType.REQUIRED )
public class <%= repository.imit.session_rest_service_name %>
  extends org.realityforge.replicant.server.ee.rest.Abstract<%= repository.imit.secured? ? 'Secured' : '' %>SessionRestService
{
  @javax.annotation.Resource
  private javax.transaction.TransactionSynchronizationRegistry _registry;
  @javax.inject.Inject
  private org.realityforge.replicant.server.transport.ReplicantSessionManager _sessionManager;
<% if repository.imit.secured? -%>
  @javax.inject.Inject
  private org.realityforge.keycloak.sks.SimpleAuthService _authService;
  private boolean _disableSessionServiceProtection;

  @javax.annotation.Nonnull
  @java.lang.Override
  protected org.realityforge.keycloak.sks.SimpleAuthService getAuthService()
  {
    return _authService;
  }

  @java.lang.Override
  protected boolean disableSecurity()
  {
    return _disableSessionServiceProtection;
  }
<% end -%>

  @javax.annotation.Nonnull
  @java.lang.Override
  protected javax.transaction.TransactionSynchronizationRegistry getRegistry()
  {
    return _registry;
  }

  @javax.annotation.Nonnull
  @java.lang.Override
  protected org.realityforge.replicant.server.transport.ReplicantSessionManager getSessionManager()
  {
    return _sessionManager;
  }

  @java.lang.Override
  @javax.annotation.PostConstruct
  public void postConstruct()
  {
    super.postConstruct();
<% if repository.imit.secured? -%>
    try
    {
      _disableSessionServiceProtection = new javax.naming.InitialContext().lookup( "<%= Reality::Naming.underscore(repository.name) -%>/env/disable_session_service_protection" ).equals( Boolean.TRUE );
    }
    catch ( final java.lang.Exception e )
    {
      //Ignored.
    }
<% end -%>
  }
{'fraction_non_alphanumeric': 0.11421628189550426, 'fraction_numerical': 0.0, 'mean_word_length': 4.830028328611898, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1888829', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1273, 'n_words': 184}