Package org.apache.uima.aae.deployment

Examples of org.apache.uima.aae.deployment.GetMetadataErrors


    if (obj == null) {
      return;
    }
    boolean isAsyncAggErrorConfig = (obj instanceof AsyncAggregateErrorConfiguration);
   
    GetMetadataErrors getGetMetadataErrors = obj.getGetMetadataErrors();
    if (getGetMetadataErrors != null) {
      buf.append("<li><b>GetMetadataErrors</b></li>");
      buf.append("<li bindent=\"20\">MaxRetries: " + getGetMetadataErrors.getMaxRetries()
              + " ; Timeout: " + getGetMetadataErrors.getTimeout() + " ; ErrorAction: "
              + getGetMetadataErrors.getErrorAction() + "</li>");
    }

    ProcessCasErrors processCasErrors = obj.getProcessCasErrors();
    if (processCasErrors != null) {
      buf.append("<li><b>ProcessCasErrors</b></li>");
View Full Code Here


              return "";
            }
          }
        } else if ( ((NameValuePair) obj).getParent() instanceof GetMetadataErrors) {
          // Blank out Error Action if Timeout = 0
          GetMetadataErrors gme = (GetMetadataErrors) ((NameValuePair) obj).getParent();
          if (gme.getTimeout() == 0 && id == GetMetadataErrors.KIND_ERRORACTION) {
            return "";
          }
        }
        return ((NameValuePair) obj).getName();
      }
      return getText(obj);

    } else if (index == COLUMN_VALUE) {
      if (obj instanceof NameValuePair) {
        int id = ((NameValuePair) obj).getId();
       
        if ( ((NameValuePair) obj).getParent() instanceof GetMetadataErrors) {
          if (id == GetMetadataErrors.KIND_TIMEOUT) {
            if ( ((NameValuePair) obj).getValue() == Integer.valueOf(0) ) {
              return AEDeploymentConstants.ERROR_KIND_STRING_NO_TIMEOUT;             
            }
          } else if (id == GetMetadataErrors.KIND_MAX_RETRIES) {
            if ( ((NameValuePair) obj).getValue() == Integer.valueOf(0) ) {
              return AEDeploymentConstants.ERROR_KIND_STRING_NO_RETRIES;             
            }
          } else if (id == GetMetadataErrors.KIND_ERRORACTION) {
            // If Timeout=0, blank out action
            GetMetadataErrors gme = (GetMetadataErrors) ((NameValuePair) obj).getParent();
            if (gme.getTimeout() == 0) {
              return "";
            }

          }
View Full Code Here

            public void modifyText(ModifyEvent e) {
              int selection = spinner.getSelection();
              item.setText(1, Integer.toString(selection));
              int id = nvp.getId();
              if (obj instanceof GetMetadataErrors) {
                GetMetadataErrors getMetadataErrors = (GetMetadataErrors) obj;
                getMetadataErrors.setValueById(id, selection);
                getMetaDataViewer.refresh();

              } else if (obj instanceof ProcessCasErrors) {
                ProcessCasErrors processCasErrors = (ProcessCasErrors) obj;
                processCasErrors.setValueById(id, selection);
                processCasErrorsViewer.refresh();

              } else if (obj instanceof CollectionProcessCompleteErrors) {
                CollectionProcessCompleteErrors completeErrors = (CollectionProcessCompleteErrors) obj;
                completeErrors.setValueById(id, selection);
                collProcessCompleteErrorsViewer.refresh();
              }
              multiPageEditor.setFileDirty();
            }
          });
          editor1.setEditor(spinner, item, 1);

        } else if (nvp.getType() == String.class) {
          final CCombo combo = new CCombo(table, SWT.BORDER | SWT.READ_ONLY);
          combo.setItems(new String[] { "terminate", "disable" }); //$NON-NLS-1$
          combo.setText(item.getText(1));
          combo.pack();
          combo.setFocus();
          combo.addFocusListener(new FocusListener() {

            public void focusGained(FocusEvent e) {
            }

            public void focusLost(FocusEvent e) {
              // Clean up any previous editor control
              Control oldEditor = editor1.getEditor();
              if (oldEditor != null)
                oldEditor.dispose();

              oldEditor = editor2.getEditor();
              if (oldEditor != null)
                oldEditor.dispose();
              combo.dispose();
            }

          });
          combo.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
              String selection = combo.getText();
              item.setText(1, selection);
              int id = nvp.getId();
              if (obj instanceof GetMetadataErrors) {
                GetMetadataErrors getMetadataErrors = (GetMetadataErrors) obj;
                getMetadataErrors.setValueById(id, selection);
                getMetaDataViewer.refresh();

              } else if (obj instanceof ProcessCasErrors) {
                ProcessCasErrors processCasErrors = (ProcessCasErrors) obj;
                processCasErrors.setValueById(id, selection);
View Full Code Here

            public void modifyText(ModifyEvent e) {
              int selection = spinner.getSelection();
              item.setText(1, Integer.toString(selection));
              int id = nvp.getId();
              if (obj instanceof GetMetadataErrors) {
                GetMetadataErrors getMetadataErrors = (GetMetadataErrors) obj;
                getMetadataErrors.setValueById(id, selection);
                getMetaDataViewer.refresh();

              } else if (obj instanceof ProcessCasErrors) {
                ProcessCasErrors processCasErrors = (ProcessCasErrors) obj;
                processCasErrors.setValueById(id, selection);
                processCasErrorsViewer.refresh();

              } else if (obj instanceof CollectionProcessCompleteErrors) {
                CollectionProcessCompleteErrors completeErrors = (CollectionProcessCompleteErrors) obj;
                completeErrors.setValueById(id, selection);
                collProcessCompleteErrorsViewer.refresh();
              }
            }
          });
          editor1.setEditor(spinner, item, 1);

        } else if (nvp.getType() == String.class) {
          final CCombo combo = new CCombo(table, SWT.BORDER | SWT.READ_ONLY);
          combo.setItems(new String[] { "terminate", "disable" }); //$NON-NLS-1$
          combo.setText(item.getText(1));
          combo.pack();
          combo.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
              String selection = combo.getText();
              item.setText(1, selection);
              int id = nvp.getId();
              if (obj instanceof GetMetadataErrors) {
                GetMetadataErrors getMetadataErrors = (GetMetadataErrors) obj;
                getMetadataErrors.setValueById(id, selection);
                getMetaDataViewer.refresh();

              } else if (obj instanceof ProcessCasErrors) {
                ProcessCasErrors processCasErrors = (ProcessCasErrors) obj;
                processCasErrors.setValueById(id, selection);
View Full Code Here

    Object[] objs = null;
    int count = 0;
    int status = 0;

    if (inputElement instanceof GetMetadataErrors) {
      GetMetadataErrors getMetadataErrors = (GetMetadataErrors) inputElement;
      DeploymentMetaData_Impl parentMetaData = getMetadataErrors.getParent().gParentObject();
     
      if ( (parentMetaData instanceof AEDeploymentMetaData)
              && !((AEDeploymentMetaData) parentMetaData).isAsync() ) {
        status = NameValuePair.STATUS_NON_EDITABLE;
      }
     
      objs = new Object[3];
      objs[0] = new NameValuePair(getMetadataErrors, GetMetadataErrors.KIND_TIMEOUT,
              GetMetadataErrors.NAME_TIMEOUT,
              getMetadataErrors.getTimeout(), Integer.class);
      objs[1] = new NameValuePair(getMetadataErrors, GetMetadataErrors.KIND_ERRORACTION,
              GetMetadataErrors.NAME_ERRORACTION,
              getMetadataErrors.getErrorAction(), String.class);
      objs[2] = new NameValuePair(getMetadataErrors, GetMetadataErrors.KIND_MAX_RETRIES,
              GetMetadataErrors.NAME_MAX_RETRIES,
              getMetadataErrors.getMaxRetries(), Integer.class);
      // ((NameValuePair) objs[0]).setStatusFlags(status);
      // ((NameValuePair) objs[1]).setStatusFlags(status);
      ((NameValuePair) objs[2]).setStatusFlags(status);
      return objs;
View Full Code Here

    if (obj == null) {
      return;
    }
    boolean isAsyncAggErrorConfig = (obj instanceof AsyncAggregateErrorConfiguration);
   
    GetMetadataErrors getGetMetadataErrors = obj.getGetMetadataErrors();
    if (getGetMetadataErrors != null) {
      buf.append("<li><b>GetMetadataErrors</b></li>");
      buf.append("<li bindent=\"20\">MaxRetries: " + getGetMetadataErrors.getMaxRetries()
              + " ; Timeout: " + getGetMetadataErrors.getTimeout() + " ; ErrorAction: "
              + getGetMetadataErrors.getErrorAction() + "</li>");
    }

    ProcessCasErrors processCasErrors = obj.getProcessCasErrors();
    if (processCasErrors != null) {
      buf.append("<li><b>ProcessCasErrors</b></li>");
View Full Code Here

    } else if (parent instanceof AsyncAggregateErrorConfiguration) {
      AsyncAggregateErrorConfiguration errorConfig = (AsyncAggregateErrorConfiguration) parent;

    } else if (parent instanceof GetMetadataErrors) {
      GetMetadataErrors getMetadataErrors = (GetMetadataErrors) parent;
      objs = new Object[3];
      objs[0] = "MaxRetries: " + getMetadataErrors.getMaxRetries();
      objs[1] = "Timeout: " + getMetadataErrors.getTimeout();
      objs[2] = "Error Action: " + getMetadataErrors.getErrorAction();
      return objs;

    } else if (parent instanceof ProcessCasErrors) {
      ProcessCasErrors processCasErrors = (ProcessCasErrors) parent;
      objs = new Object[6];
View Full Code Here

        this.parent = parent;
    }
   
    public GetMetadataErrors clone(AsyncAEErrorConfiguration parent)
    {
        GetMetadataErrors clone = new GetMetadataErrors_Impl(parent);
        clone.setErrorAction(getErrorAction());
        clone.setMaxRetries(getMaxRetries());
        clone.setTimeout(getTimeout());
       
        return clone;
    }
View Full Code Here

    Object[] objs = null;
    int count = 0;
    int status = 0;

    if (inputElement instanceof GetMetadataErrors) {
      GetMetadataErrors getMetadataErrors = (GetMetadataErrors) inputElement;
      DeploymentMetaData_Impl parentMetaData = getMetadataErrors.getParent().gParentObject();
     
      if ( (parentMetaData instanceof AEDeploymentMetaData)
              && !((AEDeploymentMetaData) parentMetaData).isAsync() ) {
        status = NameValuePair.STATUS_NON_EDITABLE;
      }
     
      objs = new Object[3];
      objs[0] = new NameValuePair(getMetadataErrors, GetMetadataErrors.KIND_TIMEOUT,
              GetMetadataErrors.NAME_TIMEOUT,
              getMetadataErrors.getTimeout(), Integer.class);
      objs[1] = new NameValuePair(getMetadataErrors, GetMetadataErrors.KIND_ERRORACTION,
              GetMetadataErrors.NAME_ERRORACTION,
              getMetadataErrors.getErrorAction(), String.class);
      objs[2] = new NameValuePair(getMetadataErrors, GetMetadataErrors.KIND_MAX_RETRIES,
              GetMetadataErrors.NAME_MAX_RETRIES,
              getMetadataErrors.getMaxRetries(), Integer.class);
      // ((NameValuePair) objs[0]).setStatusFlags(status);
      // ((NameValuePair) objs[1]).setStatusFlags(status);
      ((NameValuePair) objs[2]).setStatusFlags(status);
      return objs;
View Full Code Here

TOP

Related Classes of org.apache.uima.aae.deployment.GetMetadataErrors

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.