Package ietf.params.xml.ns.sppp.base._1

Examples of ietf.params.xml.ns.sppp.base._1.SpppUpdateResponse


public class QueryResultsEndpoint {

  @GET
  public QueryResultsWrapper getQueryResults() {
    QueryResults results = new QueryResults();
    QueryResultsBody body = new QueryResultsBody();
    VocabularyListType vl = new VocabularyListType();
    VocabularyType vt = new VocabularyType();
    VocabularyElementListType elementListType = new VocabularyElementListType();

    VocabularyElementType elementType = new VocabularyElementType();
    AttributeType at = new AttributeType();
    at.setId("someid");
    DocumentBuilder builder;
    Document document;
    try {
      builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
      document = builder.parse(new ByteArrayInputStream("<mynode>value</mynode>".getBytes("utf-8")));
    }
    catch (Exception e) {
      throw new RuntimeException(e);
    }

    document.normalizeDocument();
    at.getAny().add(document.getDocumentElement());

    document = builder.newDocument();
    Element el = document.createElement("myelement");
    el.setTextContent("howdy");
    document.appendChild(el);
    elementType.getAttribute().add(at);
    elementListType.getVocabularyElement().add(document.getDocumentElement());
    vt.setVocabularyElementList(elementListType);
    vl.getVocabulary().add(vt);
    body.setVocabularyList(vl);
    results.setResultsBody(body);

    QueryResultsWrapper wrapper = new QueryResultsWrapper();
    wrapper.setResults(results);
    return wrapper;
View Full Code Here


  static public  void processSpppQueryCommand(SpppQueryRequest rqst, ApplicationContext appContext, SpppQueryResponse response){
    // could be singleton
    SoapCommandFactory factory = new SoapCommandFactory();
    factory.setAppContext(appContext);
   
    BasicQueryRqstType queryRqst = rqst.getRqst();
   
    SpppCommand command = factory.getQueryCommand(queryRqst);
     
    ResultSetResult res = (ResultSetResult) command.execute();
View Full Code Here

  public void dtoToResultSet(List<BasicObjType> dstGrpTypeList) {
    // TODO Auto-generated method stub
  if(dtoList != null && dtoList.size() > 0 ){
   
    for(DestinationGroup dg : dtoList){
      DestGrpType dgType = new DestGrpType();
      if(dg.getOrganizationName() != null)
        dgType.setRant(dg.getOrganizationName());
      if(dg.getDestGrpName() != null)
        dgType.setDgName(dg.getDestGrpName());
      if(dg.getCreatedDateTime()!= null){
        Date cDate = dg.getCreatedDateTime();
        dgType.setCDate(asXMLGregorianCalendar(cDate));
      }
      if(dg.getModifiedDateTime() != null){
        Date mDate = dg.getModifiedDateTime();
        dgType.setMDate(asXMLGregorianCalendar(mDate));
      }
      dstGrpTypeList.add(dgType);
    }
     
    return;
View Full Code Here

public class DelDestGrpMediator extends CommandMediator<DelDestGrpRqstType, DestinationGroup> {
 
  public void convertOriginalToDTO() {
    DestinationGroup destGrp = new DestinationGroup();
    ObjKeyType objKey = originalDataObject.getObjKey();

   
    destGrp.setOrganizationName(objKey.getRant());   
    destGrp.setDestGrpName(objKey.getName());
   
    command.setDto(destGrp);
  }
View Full Code Here

    List<BasicUpdateRqstType> rqstList = rqst.getRqst();
   
    // set up response
    List<RqstObjResultCodeType> rqstObjResultCodeList = response.getRqstObjResult();
    // set default to success
    ResultCodeType resultCode = new ResultCodeType();
    resultCode.setCode(CommandResultCodes.REQUESTSUCCEEDED.getResultCode());
    resultCode.setMsg(succeededOverallMsgStr);
   
    response.setOverallResult(resultCode);
 
    // process the list of requests
   
View Full Code Here

   
    SpppCommand command = factory.getQueryCommand(queryRqst);
     
    ResultSetResult res = (ResultSetResult) command.execute();

    ResultCodeType resultCode = new ResultCodeType();
 
    resultCode.setCode(res.getResultCode());
    resultCode.setMsg(res.getStrMessage());

   
    // use mediator
    //
    ResultMediator resMediator = factory.getResultMediator(queryRqst);
View Full Code Here

     
      OverallResult res = command.execute();
     
      // response has a list List<RqstObjResultCodeType>
      // construct RqstObjResultCodeType and add the result
      RqstObjResultCodeType reqObjResultCode = new RqstObjResultCodeType();
      reqObjResultCode.setCode(res.getResultCode());
      reqObjResultCode.setMsg(res.getStrMessage());
      reqObjResultCode.setRqstObj(updateRqst);
         

      rqstObjResultCodeList.add(reqObjResultCode);
     
      // if the command did not succeed
View Full Code Here

        Map<String, TemplateDto> requiredByVSs = new HashMap<String, TemplateDto>();
        DiskSectionType diskSectionType;

        try
        {
            ContentType contentType = OVFEnvelopeUtils.getTopLevelVirtualSystemContent(envelope);

            ProductSectionType product =
                OVFEnvelopeUtils.getSection(contentType, ProductSectionType.class);
            OperatingSystemSectionType ossection = null;
            try
View Full Code Here

                diskIdToDiskFormat.put(virtualDiskDescType.getDiskId(), virtualDiskDescType);
            }

            // /

            ContentType content = OVFEnvelopeUtils.getTopLevelVirtualSystemContent(envelope);

            if (content instanceof VirtualSystemCollectionType)
            {
                throw new EmptyEnvelopeException(
                    "Current OVF description document includes a VirtualSystemCollection, "
View Full Code Here

     */
    private static EnvelopeType fixMissingProductSection(final EnvelopeType envelope)
        throws InvalidSectionException, EmptyEnvelopeException
    {

        ContentType contentType = OVFEnvelopeUtils.getTopLevelVirtualSystemContent(envelope);

        if (!(contentType instanceof VirtualSystemType))
        {
            throw new InvalidSectionException(
                "abicloud only suport single virtual system definition,"
View Full Code Here

TOP

Related Classes of ietf.params.xml.ns.sppp.base._1.SpppUpdateResponse

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.