git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Component options


I have two questions regarding Component options:

1) Is it possible to get all options as a Map<String,String>

>From the context it's possible to get component:

context.getComponent("componentName");

It also possible to get the Component documentation like

        context.getComponentDocumentation("componentName");

or in later version from the catalog:
catalog.componentHtmlDoc(componentType);

or use context.explainComponentJson(componentName, includeAllOptions)

However this returns documents  (HTML/JSON). I would like to have a
Map<String,String> return like getting the globaloptions:

context.getGlobalOptions()

For example:

context.getComponentOptions("componentName");


2) Is it possible to set another default?

I like to change some of the defaults for components. I know I can do
something like this:

HttpComponent http = context.getComponent("http4", HttpComponent.class);
http.setConnectionTimeToLive(5000);

Is there also a more direct way. For example:

context.setComponentOption("componentName","option","value");

Raymond