}
protected MarkupParams getMarkupParams(WSRPBaseRequest request) {
MarkupParams markupParams = new MarkupParams();
ClientData clientData = null;
// lets just set this to the consumer agent for now
if (producer.getRegistrationData() != null) {
clientData = new ClientData();
clientData.setUserAgent(producer.getRegistrationData().getConsumerAgent());
}
markupParams.setClientData(clientData);
markupParams.setSecureClientCommunication(this.service.getComponentManager().getLinkService().isSecure());
markupParams.setLocales(consumerEnv.getSupportedLocales());
markupParams.setMimeTypes(consumerEnv.getMimeTypes());
markupParams.setMode(request.getMode());
markupParams.setWindowState(request.getWindowState());
markupParams.setNavigationalState(request.getNavigationalState());
markupParams.setMarkupCharacterSets(consumerEnv.getCharacterEncodingSet());
markupParams.setValidateTag(null); // TODO ValidateTag
// TODO we could cache the modes and window states
final MarkupType markupType = this.desc.getMarkupTypes(0);
markupParams.setValidNewModes(this.getValidValues(consumerEnv.getSupportedModes(), markupType.getModes()));
markupParams.setValidNewWindowStates(this.getValidValues(consumerEnv.getSupportedWindowStates(), markupType.getWindowStates()));
markupParams.setExtensions(this.getMarkupParamsExtensions());
return markupParams;
}