Package pl.net.bluesoft.rnd.processtool.ui.widgets.annotations

Examples of pl.net.bluesoft.rnd.processtool.ui.widgets.annotations.AliasName


  private Class<?> getStepClass(String stepType) {
    ProcessToolRegistry reg = GenericEditorApplication.getRegistry();
        Map<String,ProcessToolProcessStep> availableSteps = reg.getAvailableSteps();
        for (ProcessToolProcessStep stepInstance : availableSteps.values()) {
            Class stepClass = stepInstance.getClass();
            AliasName a = Classes.getClassAnnotation(stepClass, AliasName.class);
            if (stepType.equals(a.name())) {
              return stepClass;
            }
        }
        return null;
  }
View Full Code Here


       
        List<Item> items = new LinkedList<Item>();
        Class<? extends ProcessToolActionButton> active = null;
    Map<String, Class<? extends ProcessToolActionButton>> availableButtons = getRegistry().getAvailableButtons();
    for (Class<? extends ProcessToolActionButton> stepClass : availableButtons.values()) {
      AliasName a = Classes.getClassAnnotation(stepClass, AliasName.class);
      items.add(new Item(stepClass,a.name()));
     
      if (a.name().equals(buttonType))
        active=stepClass;
    }
   
   
    Collections.sort(items);
View Full Code Here

      
        // other tasks
        Map<String,ProcessToolProcessStep> availableSteps = getRegistry().getAvailableSteps();
        for (ProcessToolProcessStep stepInstance : availableSteps.values()) {
            Class stepClass = stepInstance.getClass();
            AliasName a = Classes.getClassAnnotation(stepClass, AliasName.class);
            items.add(new Item(a.name(),a.name()));
        }
       
        Collections.sort(items);
       
        for (Item item:items){
View Full Code Here

    }


  public void registerStep(Class<? extends ProcessToolProcessStep> cls) {
        registerStep(cls.getName(), new StepClassFunc(cls));
        AliasName annotation = cls.getAnnotation(AliasName.class);
        if (annotation != null) {
            registerStep(annotation.name(), new StepClassFunc(cls));
        }
  }
View Full Code Here

        logger.info("Unregistered step extension: " + name);
    }

  public void unregisterStep(Class<? extends ProcessToolProcessStep> cls) {
        unregisterStep(cls.getName());
        AliasName annotation = cls.getAnnotation(AliasName.class);
        if (annotation != null) {
            unregisterStep(annotation.name());
        }
  }
View Full Code Here

        return null;
  }

    @Override
  public void registerTaskItemProvider(Class<?> cls) {
    AliasName annotation = cls.getAnnotation(AliasName.class);
    if (annotation != null) {
      TASK_ITEM_REGISTRY.put(annotation.name(), (Class<? extends TaskItemProvider>) cls);
      logger.warning("Registered task item alias: " + annotation.name() + " -> " + cls.getName());
    }
  }
View Full Code Here

  }

  @Override
  public void unregisterTaskItemProvider(Class<?> cls) {
    unregisterTaskItemProvider(cls.getName());
    AliasName annotation = cls.getAnnotation(AliasName.class);
    if (annotation != null) {
      unregisterTaskItemProvider(annotation.name());
    }
  }
View Full Code Here

            classes.add(stepClass);
        }

        for (Class stepClass : classes) {
            Map<String, Object> map = new HashMap<String, Object>();
            AliasName a = Classes.getClassAnnotation(stepClass, AliasName.class);
            map.put(NAME, a.name());
            List<Field> fields = Classes.getFieldsWithAnnotation(stepClass, AutoWiredProperty.class);
            List<Map<String, Object>> parameters = new ArrayList<Map<String, Object>>();
            if (fields != null) {
                for (Field field : fields) {
                    Map<String, Object> parameter = new HashMap<String, Object>();
View Full Code Here

   
  @Override
  public void registerWidget(Class<?> cls) {
    registerWidget(cls.getName(), (Class<? extends ProcessToolWidget>) cls);
        logger.info("Registered widget extension: " + cls.getName());
        AliasName annotation = (AliasName) cls.getAnnotation(AliasName.class);
    if (annotation != null) {
      registerWidget(annotation.name(), (Class<? extends ProcessToolWidget>) cls);
            logger.info("Registered widget alias: " + annotation.name() + " -> " + cls.getName());
        }
  }
View Full Code Here

  @Override
  public void unregisterWidget(Class<?> cls) {
    unregisterWidget(cls.getName());
        logger.info("Unregistered widget extension: " + cls.getName());
    AliasName annotation = (AliasName) cls.getAnnotation(AliasName.class);
    if (annotation != null) {
      unregisterWidget(annotation.name());
            logger.info("Unregistered widget alias: " + annotation.name() + " -> " + cls.getName());
    }
  }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.ui.widgets.annotations.AliasName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.