Package edu.indiana.dde.mylead.agent.xmlbeans

Examples of edu.indiana.dde.mylead.agent.xmlbeans.QueryResponseType


      // QueryResultConfigurationType queryResultConfigurationType =
      // params.addNewQueryResultConfiguration();
      // queryResultConfigurationType.setContentFilter(MyLEADUtil.getCFilter(cFilter));
      // queryResultConfigurationType.setHierarchyFilter(MyLEADUtil.getHFilter(hFilter));
      QueryResponseDocument outputMsg = stub.queryByIDs(inputMsg);
      QueryResponseType outputType = outputMsg.getQueryResponse();
      QueryResponseSetType returnDoc = outputType.getQueryResponseSet();
      StatusEnumType.Enum statusType = outputType.getStatus();
      if (statusType.equals(StatusEnumType.SUCCESS)) {
        logger.finest("resultElement: " + returnDoc.toString());
        return returnDoc;
      } else {
        logger.finest("faultMessage: " + outputType.getMessage());
        throw new MyLeadException(outputType.getMessage());
      }
    } catch (RuntimeException e) {
      throw new MyLeadException(e);
    }
  }
View Full Code Here


      elementFilterType.setElementName("title");
      elementFilterType.setElementSource("LEAD");
      elementFilterType.setElementFilter("title");
     
      QueryResponseDocument outputMsg = this.createStub(uid).queryWithContext(cqrdoc);
            QueryResponseType outputType = outputMsg.getQueryResponse();

            StatusEnumType.Enum statusType = outputType.getStatus();

            if (statusType.equals(StatusEnumType.SUCCESS)) {
              if (outputType.isSetMessage()) {
                logger.fine(outputType.getMessage());
                }
                if (outputType.isSetQueryResponseSet()) {
                    QueryResponseSetType queryResponseSetType = outputType.getQueryResponseSet();
                    List<ElementResponseType> elemRespList = queryResponseSetType.getElementResponseList();                  
                    for (ElementResponseType elemResp : elemRespList) {
                          List<MetadataElementDocument.MetadataElement> metadataElementList = elemResp.getMetadataElementList();
                          for (MetadataElementDocument.MetadataElement metadataElement : metadataElementList) {
                             String title = metadataElement.getName();
                             String projectGuid = null;
                             String projectName = null;
                             if ("title".equals(title)) {
                              projectName = metadataElement.getStringValue();
                              projectGuid = elemResp.getObjectId();
                             }
                             if (projectGuid != null && projectName != null) {
                         MyLeadQueryResultItem myLeadItem = new MyLeadQueryResultItem();
                        myLeadItem.setResouceID(projectGuid);
                        myLeadItem.setTitle(projectName);
                        projects.add(myLeadItem);
                         }
              break;
                          }
                     }
              }
            } else {
                if (outputType.isSetMessage()) {
                  throw new MyLeadException("When trying to get a list of " +
                            "projects for user [" + uid + "] received the " +
                                    "following fault message from MyLEAD Agent: " + outputType.getMessage());
                }
                if (outputType.isSetOperationSummary()) {
                  throw new MyLeadException("When trying to get a list of " +
                            "projects for user [" + uid + "] received the " +
                                    "following fault message from MyLEAD Agent: " + outputType.getOperationSummary());
                }
                if (outputType.isSetOperationSummaryStreamUrl()) {
                  throw new MyLeadException("When trying to get a list of " +
                            "projects for user [" + uid + "] received the " +
                                    "following fault message from MyLEAD Agent: " + outputType.getOperationSummaryStreamUrl());
                }
            }

      return projects;
    } catch (RuntimeException e) {
View Full Code Here

        filterDesc.setElementSource("LEAD");
        filterDesc.setElementFilter("abstract");
        QueryResponseDocument outputMsg = createStub(userDN)
            .queryWithContext(query);

        QueryResponseType outputType = outputMsg.getQueryResponse();

        StatusEnumType.Enum statusType = outputType.getStatus();

        if (statusType.equals(StatusEnumType.SUCCESS)) {
          if (outputType.isSetMessage()) {
            logger.finest(outputType.getMessage());
          }
          if (outputType.isSetQueryResponseSet()) {
            QueryResponseSetType queryResponseSetType = outputType
                .getQueryResponseSet();
            List<ElementResponseType> elemRespList = queryResponseSetType
                .getElementResponseList();
            for (ElementResponseType elemResp : elemRespList) {
              String wrkflwTemplateGUID = null;
              String wrkflwName = null;
              String wrkflwDescription = null;
              List<MetadataElementDocument.MetadataElement> metadataElementList = elemResp
                  .getMetadataElementList();
              for (MetadataElementDocument.MetadataElement metadataElement : metadataElementList) {
                String elementName = metadataElement.getName();
                if ("title".equals(elementName)) {
                  wrkflwName = metadataElement
                      .getStringValue();
                  wrkflwTemplateGUID = elemResp.getObjectId();
                } else if ("abstract".equals(elementName)) {
                  wrkflwDescription = metadataElement
                      .getStringValue();
                }
              }
              if (wrkflwTemplateGUID != null) {

                workflows.add(new MyleadWorkflowMetadata(
                    wrkflwTemplateGUID, wrkflwName,
                    wrkflwDescription, userDN, projectID));

              }
            }
          }
        } else {
          if (outputType.isSetMessage()) {
            throw new MyLeadException(outputType.getMessage());
          }
          if (outputType.isSetOperationSummary()) {
            throw new MyLeadException(outputType
                .getOperationSummary().xmlText());
          }
          if (outputType.isSetOperationSummaryStreamUrl()) {
            throw new MyLeadException(outputType
                .getOperationSummaryStreamUrl());
          }
        }
      } catch (Exception e) {
        logger.caught(e);
View Full Code Here

      config.setHierarchyFilter(HierarchyFilterType.TARGET);
      ContentFilterType.Enum cFilter = ContentFilterType.ID_ONLY;
      config.setContentFilter(cFilter);
      QueryResponseDocument outputMsg = createStub(userID)
          .queryWithContext(query);
      QueryResponseType outputType = outputMsg.getQueryResponse();

      StatusEnumType.Enum statusType = outputType.getStatus();

      if (statusType.equals(StatusEnumType.SUCCESS)) {
        if (outputType.isSetMessage()) {
          logger.finest(outputType.getMessage());
        }
        if (outputType.isSetQueryResponseSet()) {
          QueryResponseSetType queryResponseSetType = outputType
              .getQueryResponseSet();
          if (queryResponseSetType.getGuidResponseList().size() > 0) {
            wfTempCollectionId = queryResponseSetType
                .getGuidResponseList().get(0).getObjectId();
          } else {
View Full Code Here

TOP

Related Classes of edu.indiana.dde.mylead.agent.xmlbeans.QueryResponseType

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.