Package org.apache.stratos.cloud.controller.util

Examples of org.apache.stratos.cloud.controller.util.Cartridge


                                                                     CloudControllerConstants.VERSION_ATTR));

          boolean multiTenant = Boolean.valueOf(cartridgeElement.getAttributeValue(new QName(
              CloudControllerConstants.MULTI_TENANT_ATTR)));

          Cartridge aCartridge;

          if ((aCartridge = dataHolder.getCartridge(type)) == null) {

            aCartridge = new Cartridge(type, host, provider, version, multiTenant);
          }
         
          // read displayName
          Iterator<?> itName =
                           cartridgeElement.getChildrenWithName(new QName(
                                                                          CloudControllerConstants.DISPLAY_NAME_ELEMENT));

          if (itName.hasNext()) {
            OMElement name = (OMElement) itName.next();

            aCartridge.setDisplayName(name.getText());
          }
         
          // read description
          Iterator<?> it =
                           cartridgeElement.getChildrenWithName(new QName(
                                                                          CloudControllerConstants.DESCRIPTION_ELEMENT));

          if (it.hasNext()) {
            OMElement desc = (OMElement) it.next();

            aCartridge.setDescription(desc.getText());
          }

          // load properties of this cartridge
          loadProperties(cartridgeElement, aCartridge.getProperties());

          // retrieve the list of IaaS providers
          List<?> iaasProviderNodes = getMatchingNodes(xpath + CloudControllerConstants.IAAS_PROVIDER_ELEMENT_XPATH,
                                                       cartridgeElement);
View Full Code Here


  }

  @Override
  public CartridgeInfo getCartridgeInfo(String cartridgeType)
      throws UnregisteredCartridgeException {
    Cartridge cartridge = dataHolder
        .getCartridge(cartridgeType);

    if (cartridge != null) {

      return CloudControllerUtil.toCartridgeInfo(cartridge);
View Full Code Here

TOP

Related Classes of org.apache.stratos.cloud.controller.util.Cartridge

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.