public void executeTask(String sTaskClass) {

    m_appview.waitCursorBegin();

    if (m_appuser.hasPermission(sTaskClass)) {
      try {
        ProcessAction myProcess = (ProcessAction) m_appview.getBean(sTaskClass);

        // execute the proces
        try {
          MessageInf m = myProcess.execute();
          if (m != null) {
            // si devuelve un mensaje, lo muestro
            JMessageDialog.showMessage(JPrincipalApp.this, m);
          }
        } catch (BasicException eb) {
          // Si se produce un error lo muestro.
          JMessageDialog.showMessage(JPrincipalApp.this, new MessageInf(eb));
        }
      } catch (BeanFactoryException e) {
        JMessageDialog.showMessage(
            JPrincipalApp.this,
            new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("Label.LoadError"), e));
      }
    } else {
      // No hay permisos para ejecutar la accion...
      JMessageDialog.showMessage(
          JPrincipalApp.this,
          new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.notpermissions")));
    }
    m_appview.waitCursorEnd();
  }
Exemple #2
0
 public ProcessAction<?, ?> sortedDESC() {
   return processAction.sortedDESC();
 }
Exemple #3
0
 public ProcessAction<T, R> mapAsList(Function<List<T>, List<R>> mapper) {
   return processAction.mapAsList(mapper);
 }
Exemple #4
0
 public ProcessAction<T, R> reduce(BinaryOperator<List<R>> accumulator) {
   return processAction.reduce(accumulator);
 }
Exemple #5
0
 public ProcessAction<T, R> forEach(Consumer<T> action) {
   return processAction.forEach(action);
 }
Exemple #6
0
 public ProcessAction<T, R> map(Function<T, R> mapper) {
   return processAction.map(mapper);
 }
Exemple #7
0
 public ProcessAction<T, R> filter(Predicate<T> predicate) {
   return processAction.filter(predicate);
 }
Exemple #8
0
 public ProcessAction<T, R> data(List<T> data) {
   return processAction.data(data);
 }
Exemple #9
0
 public ProcessAction<T, R> data(List<T> data, int min_range) {
   return processAction.data(data, min_range);
 }