use of java.util.Dictionary in project jetty.project by eclipse.
the class WarUrlActivator method start.
/**
* Register the url stream handler factory.
*
* @param context
*/
@SuppressWarnings("unchecked")
public void start(BundleContext context) throws Exception {
Dictionary props = new Hashtable();
props.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] { "war" });
context.registerService(URLStreamHandlerService.class.getName(), new WarUrlStreamHandler(), props);
}
use of java.util.Dictionary in project jphp by jphp-compiler.
the class UISlider method __getLabelTable.
@Signature
protected Memory __getLabelTable(Environment env, Memory... args) {
Dictionary dictionary = component.getLabelTable();
ArrayMemory result = new ArrayMemory();
for (Object key : Collections.list(dictionary.keys())) {
JLabel label = (JLabel) dictionary.get(key);
result.refOfIndex((Integer) key).assign(label.getText());
}
return result.toConstant();
}
use of java.util.Dictionary in project jphp by jphp-compiler.
the class UISliderTag method addUnknown.
@Override
@SuppressWarnings("unchecked")
public void addUnknown(JSlider component, Node node, UIReader uiReader) {
if (node.getNodeName().equalsIgnoreCase("item")) {
Dictionary hashtable = component.getLabelTable();
if (component.getLabelTable() == null)
hashtable = new Hashtable();
Node value = node.getAttributes().getNamedItem("value");
int index = hashtable.size() - 1;
if (value != null)
index = Integer.parseInt(value.getNodeValue());
hashtable.put(index, new JLabel(node.getTextContent()));
if (component.getLabelTable() == null)
component.setLabelTable(hashtable);
}
}
use of java.util.Dictionary in project opennms by OpenNMS.
the class SyslogdReceiverJavaNetBlueprintIT method addServicesOnStartup.
@SuppressWarnings("rawtypes")
@Override
protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
// Register any mock OSGi services here
final MessageDispatcherFactory messageProducerFactory = mock(MessageDispatcherFactory.class);
final MinionIdentity minionIdentity = mock(MinionIdentity.class);
services.put(MessageDispatcherFactory.class.getName(), new KeyValueHolder<Object, Dictionary>(messageProducerFactory, new Properties()));
services.put(MinionIdentity.class.getName(), new KeyValueHolder<Object, Dictionary>(minionIdentity, new Properties()));
}
use of java.util.Dictionary in project opennms by OpenNMS.
the class LocationAwareDetectorClientIT method addServicesOnStartup.
@SuppressWarnings("rawtypes")
@Override
protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
services.put(MinionIdentity.class.getName(), new KeyValueHolder<Object, Dictionary>(new MinionIdentity() {
@Override
public String getId() {
return "0";
}
@Override
public String getLocation() {
return REMOTE_LOCATION_NAME;
}
}, new Properties()));
Properties props = new Properties();
props.setProperty("alias", "opennms.broker");
services.put(Component.class.getName(), new KeyValueHolder<Object, Dictionary>(queuingservice, props));
services.put(ServiceDetectorRegistry.class.getName(), new KeyValueHolder<Object, Dictionary>(serviceDetectorRegistry, new Properties()));
}
Aggregations