Skip to content

Commit

Permalink
Allow the PolicyConfigurationFactory to be set in support of #151
Browse files Browse the repository at this point in the history
This makes sure the platform or authorization implementation can obtain
the PolicyConfigurationFactory

Signed-off-by: Arjan Tijms <arjan.tijms@omnifish.ee>
  • Loading branch information
arjantijms committed Mar 24, 2024
1 parent 59877d4 commit c39ddba
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -105,6 +105,19 @@ public static PolicyConfigurationFactory getPolicyConfigurationFactory() throws
return policyConfigurationFactory;
}

/**
* Set the system-wide PolicyFactory implementation.
*
* <p>
* If an implementation was set previously, it will be replaced.
*
* @param policyConfigurationFactory The PolicyConfigurationFactory instance, which may be null.
*
*/
public static synchronized void setPolicyConfigurationFactory(PolicyConfigurationFactory policyConfigurationFactory) {
PolicyConfigurationFactory.policyConfigurationFactory = policyConfigurationFactory;
}

/**
* This static method uses a system property to find and instantiate (via a public constructor) a provider specific
* factory implementation class.
Expand Down

0 comments on commit c39ddba

Please sign in to comment.