Ejemplo n.º 1
0
 @Override
 public <T extends Task> TaskDescriptor<T> resolveTaskDescriptorByTypeId(final String taskTypeId) {
   // look for descriptors first
   for (TaskDescriptor<?> taskDescriptor : taskDescriptors) {
     if (taskDescriptor.getId().equals(taskTypeId)) {
       return (TaskDescriptor<T>) taskDescriptor;
     }
   }
   // not found by descriptor, try tasks directly
   for (BeanEntry<Named, Task> entry : tasks) {
     // checks: task FQCN, task SimpleName or @Named
     if (entry.getImplementationClass().getName().equals(taskTypeId)
         || entry.getImplementationClass().getSimpleName().equals(taskTypeId)
         || entry.getKey().value().equals(taskTypeId)) {
       return (TaskDescriptor<T>) findTaskDescriptor(entry);
     }
   }
   return null;
 }
Ejemplo n.º 2
0
 public void add(final BeanEntry<Marked, Item> bean, final MarkedItemWatcher watcher)
     throws Exception {
   assertNull(watcher.items.put(Integer.valueOf(bean.getKey().value()), bean.getValue()));
 }
Ejemplo n.º 3
0
 public void remove(
     final BeanEntry<javax.inject.Named, Item> bean, final NamedItemWatcher watcher)
     throws Exception {
   assertEquals(watcher.items.remove(bean.getKey().value()), bean.getValue());
 }
Ejemplo n.º 4
0
 public void add(final BeanEntry<javax.inject.Named, Item> bean, final NamedItemWatcher watcher)
     throws Exception {
   assertNull(watcher.items.put(bean.getKey().value(), bean.getValue()));
 }
Ejemplo n.º 5
0
 public void remove(final BeanEntry<Annotation, Item> bean, final AnnotatedItemWatcher watcher)
     throws Exception {
   assertEquals(watcher.items.remove(bean.getKey()), bean.getValue());
 }
Ejemplo n.º 6
0
 public void add(final BeanEntry<Annotation, Item> bean, final AnnotatedItemWatcher watcher)
     throws Exception {
   assertNull(watcher.items.put(bean.getKey(), bean.getValue()));
 }
Ejemplo n.º 7
0
 public void remove(final BeanEntry<Marked, Item> bean, final MarkedItemWatcher watcher)
     throws Exception {
   assertEquals(watcher.items.remove(Integer.valueOf(bean.getKey().value())), bean.getValue());
 }
Ejemplo n.º 8
0
 public void add(final BeanEntry<Named, Filter> entry, final FilterChainManager manager) {
   manager.addFilter(entry.getKey().value(), entry.getValue(), true);
 }