Package org.wildfly.security.util
Class DefaultTransformationMapper
java.lang.Object
org.wildfly.security.util.DefaultTransformationMapper
- All Implemented Interfaces:
TransformationMapper
Default implementation of TransformationMapper interface.
- Author:
- Peter Skopek
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTransformationSpec(String mechanism, String token) Get TransformationSpec with highest strength.getTransformationSpec(String provider, String mechanism, String token) Get TransformationSpec with highest strength.getTransformationSpecByStrength(String mechanism, String... tokens) Get ordered array of TransformationSpec by strength.getTransformationSpecByStrength(String provider, String mechanism, String... tokens) Get ordered array of TransformationSpec by strength.getTransformationSpecWithStrength(String mechanism, int strength, String... tokens) Get array of TransformationSpec with given strength.getTransformationSpecWithStrength(String provider, String mechanism, int strength, String... tokens) Get array of TransformationSpec with given strength.
-
Field Details
-
transformations
-
-
Constructor Details
-
DefaultTransformationMapper
public DefaultTransformationMapper()
-
-
Method Details
-
getTransformationSpec
public TransformationSpec getTransformationSpec(String mechanism, String token) throws IllegalArgumentException Description copied from interface:TransformationMapperGet TransformationSpec with highest strength.- Specified by:
getTransformationSpecin interfaceTransformationMapper- Parameters:
mechanism- name as per specification. Cannot benull.token- name as per mechanism specification- Returns:
- TransformationSpec object
- Throws:
IllegalArgumentException- if there is no such mechanism or token for the mechanism
-
getTransformationSpec
public TransformationSpec getTransformationSpec(String provider, String mechanism, String token) throws IllegalArgumentException Description copied from interface:TransformationMapperGet TransformationSpec with highest strength.- Specified by:
getTransformationSpecin interfaceTransformationMapper- Parameters:
provider- name as defined by JCAmechanism- name as per specification. Cannot benull.token- name as per mechanism specification- Returns:
- TransformationSpec object
- Throws:
IllegalArgumentException- if there is no such mechanism or token for the mechanism
-
getTransformationSpecByStrength
public TransformationSpec[] getTransformationSpecByStrength(String mechanism, String... tokens) throws IllegalArgumentException Description copied from interface:TransformationMapperGet ordered array of TransformationSpec by strength. Array is ordered from the highest strength to the lowest.- Specified by:
getTransformationSpecByStrengthin interfaceTransformationMapper- Parameters:
mechanism- name as per specification. Cannot benull.tokens- - array of tokens to consider. Names as per mechanism specification.- Returns:
- ordered array of TransformationSpec
- Throws:
IllegalArgumentException- if there is no such mechanism or token for the mechanism
-
getTransformationSpecByStrength
public TransformationSpec[] getTransformationSpecByStrength(String provider, String mechanism, String... tokens) throws IllegalArgumentException Description copied from interface:TransformationMapperGet ordered array of TransformationSpec by strength. Array is ordered from the highest strength to the lowest.- Specified by:
getTransformationSpecByStrengthin interfaceTransformationMapper- Parameters:
provider- name as defined by JCAmechanism- name as per specification. Cannot benull.tokens- - array of tokens to consider. Names as per mechanism specification.- Returns:
- ordered array of TransformationSpec
- Throws:
IllegalArgumentException- if there is no such mechanism or token for the mechanism
-
getTransformationSpecWithStrength
public TransformationSpec[] getTransformationSpecWithStrength(String mechanism, int strength, String... tokens) throws IllegalArgumentException Description copied from interface:TransformationMapperGet array of TransformationSpec with given strength.- Specified by:
getTransformationSpecWithStrengthin interfaceTransformationMapper- Parameters:
mechanism- name as per specification. Cannot benull.strength- of desired transformationtokens- - array of tokens to consider. Names as per mechanism specification.- Returns:
- array of TransformationSpec
- Throws:
IllegalArgumentException- if there is no such mechanism or token for the mechanism
-
getTransformationSpecWithStrength
public TransformationSpec[] getTransformationSpecWithStrength(String provider, String mechanism, int strength, String... tokens) throws IllegalArgumentException Description copied from interface:TransformationMapperGet array of TransformationSpec with given strength.- Specified by:
getTransformationSpecWithStrengthin interfaceTransformationMapper- Parameters:
provider- name as defined by JCAmechanism- name as per specification. Cannot benull.strength- of desired transformationtokens- - array of tokens to consider. Names as per mechanism specification.- Returns:
- array of TransformationSpec
- Throws:
IllegalArgumentException- if there is no such mechanism or token for the mechanism
-