Expects a "subsystem" child resource. Modeled as a static helper method to make it usable from both
deployments and subdeployments.
778846
static void parseSubsystems(ModelNode node, List<Subsystem> subsystems) {
        List<Property> properties = node.get("subsystem").asPropertyList();
        for (Property property : properties) {
            Subsystem subsystem = new Subsystem(property.getName(), property.getValue());
            subsystems.add(subsystem);
        }
    }
719124
protected final Object buildChildModel(Object parentModel, AbstractCommand command, int level)
    {
        return buildChildComponent((JComponent) parentModel, command, level);
    }
297261
def prepareSystem(cls):
        
        try:
            resourceRootDirPath = os.environ[cls.rootDirPathEnvName]
        except KeyError:
            # Create directory holding local copies of requested resources ...
            resourceRootDirPath = mkdtemp()
            # .. and register its location in an environment variable such that child processes
            # can find it.
            os.environ[cls.rootDirPathEnvName] = resourceRootDirPath
        assert os.path.isdir(resourceRootDirPath)
342948
def add_from_child(self, resource, **kwargs):
        

        new_resource = self.add(
            resource.member_name, resource.collection_name, **kwargs)
        for child in resource.children:
            new_resource.add_from_child(child, **kwargs)
910943
public void addAllSubsystemFileSourcesFromModule(FeaturePack.Module module, ArtifactFileResolver artifactFileResolver, boolean transitive) throws IOException {
        // the subsystem templates are included in module artifacts files
        for (ModuleParseResult.ArtifactName artifactName : module.getModuleParseResult().getArtifacts()) {
            // resolve the artifact
            Artifact artifact = module.getFeaturePack().getArtifactResolver().getArtifact(artifactName.getArtifact());
            if (artifact == null) {
                throw new RuntimeException("Could not resolve module resource artifact " + artifactName.getArtifactCoords() + " for feature pack " + module.getFeaturePack().getFeaturePackFile());
            }
            // resolve the artifact file
            File artifactFile = artifactFileResolver.getArtifactFile(artifact);
            // get the subsystem templates
            addAllSubsystemFileSourcesFromZipFile(artifactFile);
        }
        if (transitive) {
            for (FeaturePack.Module dependency : module.getDependencies().values()) {
                addAllSubsystemFileSourcesFromModule(dependency, artifactFileResolver, false);
            }
        }
    }
1121935
private void createSubMenu(
        CmsContextMenuItemWidget parentWidget,
        ContextMenuItemState childState,
        CmsContextMenuConnector connector) {

        CmsContextMenuItemWidget childWidget = createEmptyItemWidget(
            childState.getId(),
            childState.getCaption(),
            childState.getDescription(),
            connector);
        childWidget.setEnabled(childState.isEnabled());
        childWidget.setSeparatorVisible(childState.isSeparator());
        setStyleNames(childWidget, childState.getStyles());
        parentWidget.addSubMenuItem(childWidget);

        for (ContextMenuItemState child : childState.getChildren()) {
            createSubMenu(childWidget, child, connector);
        }
    }
903249
public URL getResource(String resourceName, BeanContextChild child)
	{
		if (resourceName == null || child == null)
		{
			throw new NullPointerException();
		}
		if (!contains(child))
		{
			throw new IllegalArgumentException(Messages.getString("beans.6D"));
		}

		return ClassLoader.getSystemResource(resourceName);
	}
683605
@Provides
	List<? extends DataSource> provideContainerChildDataSources(final Configuration configuration, final Map<String, DataSource> availableDataSources) {

		List<DataSource> dataSources = newArrayListWithExpectedSize(3);
		String key = "dataSource.container.dsref";

		for (int i = 1;; ++i) {
			String dsKey = key + i;
			String dsName = configuration.get(dsKey);
			if (dsName == null) {
				break;
			}
			DataSource ds = availableDataSources.get(dsName);
			if (ds == null) {
				throw new ProvisionException("DataSource with name '" + dsName + "' not available. Check your configuration.");
			}
			dataSources.add(ds);
		}

		return dataSources;
	}
1339909
public static ServiceName deploymentUnitName(String parent, String name, Phase phase) {
        return JBOSS_DEPLOYMENT_SUB_UNIT.append(parent, name, phase.name());
    }
1025699
def save_subresource(self, subresource):
        
        data = deepcopy(subresource._resource)
        data.pop('id', None)
        data.pop(self.resource_type + '_id', None)

        subresources = getattr(self, subresource.parent_key, {})
        subresources[subresource.id] = data
        setattr(self, subresource.parent_key, subresources)

        yield self._save()
272391
def child_static(self, context):
        
        offeringTech = IOfferingTechnician(self.siteStore)
        installedOfferings = offeringTech.getInstalledOfferings()
        offeringsWithContent = dict([
                (offering.name, offering.staticContentPath)
                for offering
                in installedOfferings.itervalues()
                if offering.staticContentPath])

        # If you wanted to do CSS rewriting for all CSS files served beneath
        # /static/, you could do it by passing a processor for ".css" here.
        # eg:
        #
        # website = IResource(self.store)
        # factory = StylesheetFactory(
        #     offeringsWithContent.keys(), website.rootURL)
        # StaticContent(offeringsWithContent, {
        #               ".css": factory.makeStylesheetResource})
        return StaticContent(offeringsWithContent, {})
554149
def pipeline(*subschemas)
      subschemas = subschemas.map { |ss| inconvenience(ss) }
      Schemas::Pipeline.new(subschemas)
    end
744172
@Override
	public List<Component> findComponentChildren( String applicationName, String componentName ) {

		if( componentName == null )
			this.logger.fine( "Request: list root components in " + applicationName + "." );
		else
			this.logger.fine( "Request: find components that can be deployed under a " + componentName + " component in " + applicationName + "." );

		List<Component> result = new ArrayList<> ();
		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );
		if( app != null ) {
			Component comp;
			if( componentName == null )
				result.addAll( app.getTemplate().getGraphs().getRootComponents());
			else if(( comp = ComponentHelpers.findComponent( app, componentName )) != null )
				result.addAll( ComponentHelpers.findAllChildren( comp ));
			else
				this.logger.fine( "No component called " + componentName + " was found in " + applicationName + "." );
		}

		return result;
	}
477068
public static String child(Resource base, String path) {
        Resource child = base.getChild(path);
        return child != null ? child.getPath() : path;
    }
1216893
function subCreate (req) {
  return [ req.params.service + '/' + req.params.subresources, req.body ];
}
608660
def _migrate_subresource(subresource, parent, migrations):
    
    for key, doc in getattr(parent, subresource.parent_key, {}).items():
        for migration in migrations['migrations']:
            instance = migration(subresource(id=key, **doc))
            parent._resource['doc_version'] = unicode(migration.version)

            instance = _migrate_subresources(
                instance,
                migrations['subresources']
            )

        doc = instance._resource
        doc.pop('id', None)
        doc.pop(instance.resource_type + '_id', None)

        getattr(parent, subresource.parent_key)[key] = doc

    return parent
975773
public SubProcessBuilder subProcessDone() {
    BpmnModelElementInstance lastSubProcess = element.getScope();
    if (lastSubProcess != null && lastSubProcess instanceof SubProcess) {
      return ((SubProcess) lastSubProcess).builder();
    }
    else {
      throw new BpmnModelException("Unable to find a parent subProcess.");
    }
  }