Get a reference to the root <deployment> element from the deployment.xml file.
@param deployIS
@return Returns a reference to the root <deployment> element.
15673
@SuppressWarnings("unchecked")
    public static DeploymentType getDeployment(InputStream deployIS) {
        try {
            if (m_jc == null || m_schema == null) {
                throw new RuntimeException("Error schema validation.");
            }
            Unmarshaller unmarshaller = m_jc.createUnmarshaller();
            unmarshaller.setSchema(m_schema);
            JAXBElement<DeploymentType> result =
                (JAXBElement<DeploymentType>) unmarshaller.unmarshal(deployIS);
            DeploymentType deployment = result.getValue();
            populateDefaultDeployment(deployment);
            return deployment;
        } catch (JAXBException e) {
            // Convert some linked exceptions to more friendly errors.
            if (e.getLinkedException() instanceof java.io.FileNotFoundException) {
                hostLog.error(e.getLinkedException().getMessage());
                return null;
            } else if (e.getLinkedException() instanceof org.xml.sax.SAXParseException) {
                hostLog.error("Error schema validating deployment.xml file. " + e.getLinkedException().getMessage());
                return null;
            } else {
                throw new RuntimeException(e);
            }
        }
    }
1016877
public void setDeployments(java.util.Collection<Deployment> deployments) {
        if (deployments == null) {
            this.deployments = null;
            return;
        }

        this.deployments = new java.util.ArrayList<Deployment>(deployments);
    }
1101343
def get_deployment_id(deployment_name,
                      token_manager=None,
                      app_url=defaults.APP_URL):
    

    headers = token_manager.get_access_token_headers()
    deployment_url = environment.get_deployment_url(app_url=app_url)
    response = requests.get('%s/api/v1/deployments' % deployment_url,
                            headers=headers)

    if response.status_code == 200:
        deployments = response.json()

        for deployment in deployments:
            if deployment['name'] == deployment_name:
                return deployment['deployment_id']

        raise JutException('Unable to find deployment with name %s' % deployment_name)
    else:
        raise JutException('Error %s: %s' % (response.status_code, response.text))
1312625
static public String getRootNodeName(String xml)
    {
        String rootNodeName = null;
        try {
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setExpandEntityReferences(false);
            DocumentBuilder dBuilder = dbf.newDocumentBuilder();
            InputSource inputSource = new InputSource(new StringReader(xml));
            Document doc = dBuilder.parse(inputSource);
            doc.getDocumentElement().normalize();
            rootNodeName = doc.getDocumentElement().getNodeName();
        } catch (SAXException e) {
            System.out.println("SAX exception: " + e);
        } catch (IOException e) {
            System.out.println("IO exception: " + e);
        } catch (ParserConfigurationException e) {
            System.out.println("ParserConfiguration exception: " + e);
        }
        return rootNodeName;
    }
1322794
public java.util.List<DeploymentInfo> getDeploymentsInfo() {
        if (deploymentsInfo == null) {
            deploymentsInfo = new com.amazonaws.internal.SdkInternalList<DeploymentInfo>();
        }
        return deploymentsInfo;
    }
1206880
public ModelNode getDeploymentSubsystemModel(final String subsystemName) {
        assert subsystemName != null : "The subsystemName cannot be null";
        return getDeploymentSubModel(subsystemName, PathAddress.EMPTY_ADDRESS, null, deploymentUnit);
    }
421673
public DeploymentCache deployments(long applicationId)
    {
        DeploymentCache cache = deployments.get(applicationId);
        if(cache == null)
            deployments.put(applicationId, cache = new DeploymentCache(applicationId));
        return cache;
    }
313438
public java.util.List<String> getDeploymentGroupNames() {
        if (deploymentGroupNames == null) {
            deploymentGroupNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return deploymentGroupNames;
    }
574663
public java.lang.String getRootElement() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.rootElement);

    }
442789
protected Set<String> resumePreviousByDeploymentName(CommandContext commandContext, DeploymentEntity deployment) {
    List<Deployment> previousDeployments = new DeploymentQueryImpl().deploymentName(deployment.getName()).list();
    Set<String> deploymentIds = new HashSet<String>(previousDeployments.size());
    for (Deployment d : previousDeployments) {
      deploymentIds.add(d.getId());
    }
    return deploymentIds;
  }
715753
private CmsObject getRootCms() {

        if (m_cms == null) {
            m_cms = A_CmsUI.getCmsObject();
            m_cms.getRequestContext().setSiteRoot("");
        }
        return m_cms;
    }
802587
@Override
    public String getRootFolderId() {
        if (rootNodeId == null) {
            Document layout = getUserLayoutDOM();

            Element rootNode =
                    this.xpathOperations.evaluate("//layout/folder", layout, XPathConstants.NODE);
            if (rootNode == null
                    || !rootNode.getAttribute(Constants.ATT_TYPE)
                            .equals(Constants.ROOT_FOLDER_ID)) {
                LOG.error(
                        "Unable to locate root node in layout of "
                                + owner.getUserName()
                                + ". Resetting corrupted layout.");
                resetLayout((String) null);

                rootNode =
                        this.xpathOperations.evaluate(
                                "//layout/folder", layout, XPathConstants.NODE);
                if (rootNode == null
                        || !rootNode.getAttribute(Constants.ATT_TYPE)
                                .equals(Constants.ROOT_FOLDER_ID)) {
                    throw new PortalException(
                            "Corrupted layout detected for "
                                    + owner.getUserName()
                                    + " and resetting layout failed.");
                }
            }
            rootNodeId = rootNode.getAttribute("ID");
        }
        return rootNodeId;
    }
1341482
static String setupDefaultDeployment(VoltLogger logger, File voltdbroot) throws IOException {
        File configInfoDir = new VoltFile(voltdbroot, Constants.CONFIG_DIR);
        configInfoDir.mkdirs();

        File depFH = new VoltFile(configInfoDir, "deployment.xml");
        if (!depFH.exists()) {
            logger.info("Generating default deployment file \"" + depFH.getAbsolutePath() + "\"");

            try (BufferedWriter bw = new BufferedWriter(new FileWriter(depFH))) {
                for (String line : defaultDeploymentXML) {
                    bw.write(line);
                    bw.newLine();
                }
            } finally {
            }
        }

        return depFH.getAbsolutePath();
    }
427555
public Optional<Deployment> create(long applicationId, Deployment deployment)
    {
        return HTTP.POST(String.format("/v2/applications/%d/deployments.json", applicationId), deployment, DEPLOYMENT);
    }
711719
public java.util.List<String> getDeploymentConfigsList() {
        if (deploymentConfigsList == null) {
            deploymentConfigsList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return deploymentConfigsList;
    }
594799
@Override
    public DeploymentPlanBuilder andDeploy() {
        String addedKey = getAddedContentKey();
        DeploymentActionImpl deployMod = DeploymentActionImpl.getDeployAction(addedKey);
        return new DeploymentPlanBuilderImpl(this, deployMod);
    }
125446
public Deployment deployment(DeploymentTargetDescription target) {
        Validate.notNull(target, "Target must be specified");
        if (DeploymentTargetDescription.DEFAULT.equals(target)) {
            return findDefaultDeployment();
        }
        return findMatchingDeployment(target);
    }