Package org.forgerock.openam.sts
Interface InstanceConfigMarshaller<T extends STSInstanceConfig>
-
- All Known Implementing Classes:
RestSTSInstanceConfigMarshaller
,SoapSTSInstanceConfigMarshaller
public interface InstanceConfigMarshaller<T extends STSInstanceConfig>
Interface to represent the concerns of marshalling to RestSTSInstanceConfig and SoapSTSInstanceConfig instances to/from either the Map> SMS representation or the json representation. Simply wraps the static methods in the RestSTSInstanceConfig and SoapSTSInstanceConfig classes, so that they can be easily mocked.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
fromJson(org.forgerock.json.JsonValue json)
T
fromJsonAttributeMap(org.forgerock.json.JsonValue jsonMapAttributes)
Marshal STSInstanceConfig subclass instance from the SMS representation, wrapped in json.T
fromMapAttributes(Map<String,Set<String>> attributes)
Marshal STSInstanceConfig subclass instance from the SMS representationMap<String,Set<String>>
toMap(T instance)
Called to marshal an STSInstanceConfig subclass instance to the Map> required for SMS persistence.
-
-
-
Method Detail
-
toMap
Map<String,Set<String>> toMap(T instance) throws STSPublishException
Called to marshal an STSInstanceConfig subclass instance to the Map> required for SMS persistence. - Parameters:
instance
- the to-be-marshaled instance- Returns:
- the SMS-persistence-ready representation of STSInstanceConfig state.
- Throws:
STSPublishException
- if an exception occurs during the marshalling
-
fromMapAttributes
T fromMapAttributes(Map<String,Set<String>> attributes) throws STSPublishException
Marshal STSInstanceConfig subclass instance from the SMS representation- Parameters:
attributes
- the attributes retrieved from the SMS- Returns:
- a STSInstanceConfig subclass
- Throws:
STSPublishException
- if an exception occurs during the marshalling
-
fromJsonAttributeMap
T fromJsonAttributeMap(org.forgerock.json.JsonValue jsonMapAttributes) throws STSPublishException
Marshal STSInstanceConfig subclass instance from the SMS representation, wrapped in json. The ViewBean classes which allow AdminConsole users to configure Soap and Rest STS instances ultimately call the sts publish service to publish the Rest or Soap STS instance. The invocation payload is the SMS Map> representation native to the ViewBean context, wrapped in a JsonValue, so that it may be posted to CREST. This method defines the contract to marshal this representation back to a STSInstanceConfig subclass. - Parameters:
jsonMapAttributes
- the Map> native to the ViewBean context and to SMS persistence, wrapped in a JsonValue - Returns:
- a STSInstanceConfig subclass
- Throws:
STSPublishException
- if an exception occurs during the marshalling
-
fromJson
T fromJson(org.forgerock.json.JsonValue json) throws STSPublishException
- Parameters:
json
- The json representation of the STSInstanceConfig subclass- Returns:
- a STSInstanceConfig subclass instance
- Throws:
STSPublishException
- if an exception occurs during the marshalling
-
-