} )
// have to accept anything for browsers to work
public String doIsParameterizable( @PathParam ( "pathId" ) String pathId ) throws FileNotFoundException {
boolean hasParameterUi = false;
RepositoryFile repositoryFile = getRepository().getFile( fileService.idToPath( pathId ) );
if ( repositoryFile != null ) {
try {
hasParameterUi = hasParameterUi( repositoryFile );
} catch ( NoSuchBeanDefinitionException e ) {
// Do nothing.
}
}
boolean hasParameters = false;
if ( hasParameterUi ) {
try {
IContentGenerator parameterContentGenerator = getContentGenerator( repositoryFile );
if ( parameterContentGenerator != null ) {
ByteArrayOutputStream outputStream = getByteArrayOutputStream();
parameterContentGenerator.setOutputHandler( new SimpleOutputHandler( outputStream, false ) );
parameterContentGenerator.setMessagesList( new ArrayList<String>() );
Map<String, IParameterProvider> parameterProviders = new HashMap<String, IParameterProvider>();
SimpleParameterProvider parameterProvider = getSimpleParameterProvider();
parameterProvider.setParameter( "path", encode( repositoryFile.getPath() ) );
parameterProvider.setParameter( "renderMode", "PARAMETER" );
parameterProviders.put( IParameterProvider.SCOPE_REQUEST, parameterProvider );
parameterContentGenerator.setParameterProviders( parameterProviders );
parameterContentGenerator.setSession( getSession() );