Skip to content

Commit

Permalink
Removed obsoleted parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jan 9, 2025
1 parent 93beacb commit d38d7bb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ public ISMPServiceGroupManager createServiceGroupMgr ()
}

@Nonnull
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
return new SMPRedirectManagerMongoDB (aIdentifierFactory);
}

@Nonnull
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
return new SMPServiceInformationManagerMongoDB (aIdentifierFactory);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,13 @@ public ISMPServiceGroupManager createServiceGroupMgr ()
}

@Nonnull
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
return new SMPRedirectManagerJDBC (SMPDBExecutor::new);
}

@Nonnull
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
return new SMPServiceInformationManagerJDBC (SMPDBExecutor::new);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.helger.commons.exception.InitializationException;
import com.helger.commons.state.ETriState;
import com.helger.commons.string.ToStringGenerator;
import com.helger.dao.DAOException;
Expand Down Expand Up @@ -71,7 +72,7 @@ public ISMLInfoManager createSMLInfoMgr ()
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

Expand All @@ -84,7 +85,7 @@ public ISMPSettingsManager createSettingsMgr ()
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

Expand All @@ -97,7 +98,7 @@ public ISMPTransportProfileManager createTransportProfileMgr ()
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

Expand All @@ -110,35 +111,33 @@ public ISMPServiceGroupManager createServiceGroupMgr ()
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

@Nonnull
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
try
{
return new SMPRedirectManagerXML (SMP_REDIRECT_XML);
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

@Nonnull
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
try
{
return new SMPServiceInformationManagerXML (SMP_SERVICE_INFORMATION_XML);
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

Expand All @@ -151,7 +150,7 @@ public ISMPParticipantMigrationManager createParticipantMigrationMgr ()
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

Expand All @@ -165,7 +164,7 @@ public ISMPBusinessCardManager createBusinessCardMgr (@Nonnull final IIdentifier
}
catch (final DAOException ex)
{
throw new RuntimeException (ex.getMessage (), ex);
throw new InitializationException (ex.getMessage (), ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,19 @@ default void afterInitManagers ()
/**
* @param aIdentifierFactory
* The identifier factory to be used. May not be <code>null</code>.
* @param aServiceGroupMgr
* The service group manager to use. May not be <code>null</code>.
* @return A new SMP redirect manager. May not be <code>null</code>.
*/
@Nonnull
ISMPRedirectManager createRedirectMgr (@Nonnull IIdentifierFactory aIdentifierFactory,
@Nonnull ISMPServiceGroupManager aServiceGroupMgr);
ISMPRedirectManager createRedirectMgr (@Nonnull IIdentifierFactory aIdentifierFactory);

/**
* @param aIdentifierFactory
* The identifier factory to be used. May not be <code>null</code>.
* @param aServiceGroupMgr
* The service group manager to use. May not be <code>null</code>.
* @return A new SMP service information manager. May not be
* <code>null</code>.
*/
@Nonnull
ISMPServiceInformationManager createServiceInformationMgr (@Nonnull IIdentifierFactory aIdentifierFactory,
@Nonnull ISMPServiceGroupManager aServiceGroupMgr);
ISMPServiceInformationManager createServiceInformationMgr (@Nonnull IIdentifierFactory aIdentifierFactory);

/**
* @return A new SMP participant migration manager. May not be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,11 @@ protected void onAfterInstantiation (@Nonnull final IScope aScope)
if (m_aServiceGroupMgr == null)
throw new IllegalStateException ("Failed to create ServiceGroup manager!");

m_aRedirectMgr = s_aManagerProvider.createRedirectMgr (m_aIdentifierFactory, m_aServiceGroupMgr);
m_aRedirectMgr = s_aManagerProvider.createRedirectMgr (m_aIdentifierFactory);
if (m_aRedirectMgr == null)
throw new IllegalStateException ("Failed to create Redirect manager!");

m_aServiceInformationMgr = s_aManagerProvider.createServiceInformationMgr (m_aIdentifierFactory,
m_aServiceGroupMgr);
m_aServiceInformationMgr = s_aManagerProvider.createServiceInformationMgr (m_aIdentifierFactory);
if (m_aServiceInformationMgr == null)
throw new IllegalStateException ("Failed to create ServiceInformation manager!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ public ISMPServiceGroupManager createServiceGroupMgr ()
}

@Nonnull
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPRedirectManager createRedirectMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
return new MockSMPRedirectManager ();
}

@Nonnull
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory,
@Nonnull final ISMPServiceGroupManager aServiceGroupMgr)
public ISMPServiceInformationManager createServiceInformationMgr (@Nonnull final IIdentifierFactory aIdentifierFactory)
{
return new MockSMPServiceInformationManager ();
}
Expand Down

0 comments on commit d38d7bb

Please sign in to comment.