Package com.microsoft.windowsazure.management.scheduler.models

Examples of com.microsoft.windowsazure.management.scheduler.models.CloudServiceGetResponse$Resource


                }
                throw ex;
            }
           
            // Create Result
            CloudServiceGetResponse result = null;
            // Deserialize Response
            InputStream responseContent = httpResponse.getEntity().getContent();
            result = new CloudServiceGetResponse();
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
            Document responseDoc = documentBuilder.parse(new BOMInputStream(responseContent));
           
            Element cloudServiceElement = XmlUtility.getElementByTagNameNS(responseDoc, "http://schemas.microsoft.com/windowsazure", "CloudService");
            if (cloudServiceElement != null) {
                Element geoLocationElement = XmlUtility.getElementByTagNameNS(cloudServiceElement, "http://schemas.microsoft.com/windowsazure", "GeoLocation");
                if (geoLocationElement != null) {
                    String geoLocationInstance;
                    geoLocationInstance = geoLocationElement.getTextContent();
                    result.setGeoLocation(geoLocationInstance);
                }
               
                Element resourcesSequenceElement = XmlUtility.getElementByTagNameNS(cloudServiceElement, "http://schemas.microsoft.com/windowsazure", "Resources");
                if (resourcesSequenceElement != null) {
                    for (int i1 = 0; i1 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(resourcesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Resource").size(); i1 = i1 + 1) {
                        org.w3c.dom.Element resourcesElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(resourcesSequenceElement, "http://schemas.microsoft.com/windowsazure", "Resource").get(i1));
                        CloudServiceGetResponse.Resource resourceInstance = new CloudServiceGetResponse.Resource();
                        result.getResources().add(resourceInstance);
                       
                        Element resourceProviderNamespaceElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "ResourceProviderNamespace");
                        if (resourceProviderNamespaceElement != null) {
                            String resourceProviderNamespaceInstance;
                            resourceProviderNamespaceInstance = resourceProviderNamespaceElement.getTextContent();
                            resourceInstance.setResourceProviderNamespace(resourceProviderNamespaceInstance);
                        }
                       
                        Element typeElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "Type");
                        if (typeElement != null) {
                            String typeInstance;
                            typeInstance = typeElement.getTextContent();
                            resourceInstance.setType(typeInstance);
                        }
                       
                        Element eTagElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "ETag");
                        if (eTagElement != null) {
                            String eTagInstance;
                            eTagInstance = eTagElement.getTextContent();
                            resourceInstance.setETag(eTagInstance);
                        }
                       
                        Element schemaVersionElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "SchemaVersion");
                        if (schemaVersionElement != null) {
                            String schemaVersionInstance;
                            schemaVersionInstance = schemaVersionElement.getTextContent();
                            resourceInstance.setSchemaVersion(schemaVersionInstance);
                        }
                       
                        Element nameElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "Name");
                        if (nameElement != null) {
                            String nameInstance;
                            nameInstance = nameElement.getTextContent();
                            resourceInstance.setName(nameInstance);
                        }
                       
                        Element planElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "Plan");
                        if (planElement != null) {
                            String planInstance;
                            planInstance = planElement.getTextContent();
                            resourceInstance.setPlan(planInstance);
                        }
                       
                        Element outputItemsSequenceElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "OutputItems");
                        if (outputItemsSequenceElement != null) {
                            for (int i2 = 0; i2 < com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(outputItemsSequenceElement, "http://schemas.microsoft.com/windowsazure", "OutputItem").size(); i2 = i2 + 1) {
                                org.w3c.dom.Element outputItemsElement = ((org.w3c.dom.Element) com.microsoft.windowsazure.core.utils.XmlUtility.getElementsByTagNameNS(outputItemsSequenceElement, "http://schemas.microsoft.com/windowsazure", "OutputItem").get(i2));
                                String outputItemsKey = XmlUtility.getElementByTagNameNS(outputItemsElement, "http://schemas.microsoft.com/windowsazure", "Key").getTextContent();
                                String outputItemsValue = XmlUtility.getElementByTagNameNS(outputItemsElement, "http://schemas.microsoft.com/windowsazure", "Value").getTextContent();
                                resourceInstance.getOutputItems().put(outputItemsKey, outputItemsValue);
                            }
                        }
                       
                        Element stateElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "State");
                        if (stateElement != null) {
                            String stateInstance;
                            stateInstance = stateElement.getTextContent();
                            resourceInstance.setState(stateInstance);
                        }
                       
                        Element subStateElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "SubState");
                        if (subStateElement != null) {
                            String subStateInstance;
                            subStateInstance = subStateElement.getTextContent();
                            resourceInstance.setSubState(subStateInstance);
                        }
                       
                        Element labelElement = XmlUtility.getElementByTagNameNS(resourcesElement, "http://schemas.microsoft.com/windowsazure", "Label");
                        if (labelElement != null) {
                            String labelInstance;
                            labelInstance = labelElement.getTextContent();
                            resourceInstance.setLabel(labelInstance);
                        }
                    }
                }
            }
           
            result.setStatusCode(statusCode);
           
            if (shouldTrace) {
                CloudTracing.exit(invocationId, result);
            }
            return result;
View Full Code Here


        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addResource(resource, "json""format=json",  mashup, "application/json");
        addResource(resource, "xml",   "format=xml",   mashup, "application/xml");
        addResource(resource, "jsonp", "format=jsonp", mashup, "application/javascript");
       
View Full Code Here

        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addMethod(resource.addNewMethod(), "json", mashup, "application/json");
       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
    }
View Full Code Here

       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
    }
   
    private static void addResource(Resource resource, String format, String path, Mashup mashup, String mediaType) {
        Resource resource3 = resource.addNewResource();
        resource3.setPath(path);
        addMethod(resource3.addNewMethod(), format, mashup, mediaType);
    }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.RESOURCE: {
            Resource resource = (Resource) theEObject;
            T result = caseResource(resource);
            if (result == null)
                result = caseRootElement(resource);
            if (result == null)
                result = caseBaseElement(resource);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setResourceRef(Resource newResourceRef) {
        Resource oldResourceRef = resourceRef;
        resourceRef = newResourceRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.RESOURCE_ROLE__RESOURCE_REF, oldResourceRef, resourceRef));
    }
View Full Code Here

   {
      public Resource apply(V1Resource from)
      {
         if (from != null)
         {
            Resource result = WSRPTypeFactory.createResource(from.getResourceName(), WSRPUtils.transform(from.getValues(), RESOURCEVALUE));
            return result;
         }
         else
         {
            return null;
View Full Code Here

   }

   public static Resource createResource(String resourceName, List<ResourceValue> resourceValue)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(resourceName, "ResourceName");
      Resource resource = new Resource();
      resource.setResourceName(resourceName);

      if (resourceValue != null && !resourceValue.isEmpty())
      {
         resource.getValues().addAll(resourceValue);
      }

      return resource;
   }
View Full Code Here

   }

   public static Resource createResource(String resourceName, List<ResourceValue> resourceValue)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(resourceName, "ResourceName");
      Resource resource = new Resource();
      resource.setResourceName(resourceName);

      if (resourceValue != null && !resourceValue.isEmpty())
      {
         resource.getValues().addAll(resourceValue);
      }

      return resource;
   }
View Full Code Here

   }

   public static Resource createResource(String resourceName, List<ResourceValue> resourceValue)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(resourceName, "ResourceName");
      Resource resource = new Resource();
      resource.setResourceName(resourceName);

      if (resourceValue != null && !resourceValue.isEmpty())
      {
         resource.getValues().addAll(resourceValue);
      }

      return resource;
   }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.management.scheduler.models.CloudServiceGetResponse$Resource

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.