gpt4 book ai didi

ro.isdc.wro.model.WroModel.addGroup()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 15:43:05 28 4
gpt4 key购买 nike

本文整理了Java中ro.isdc.wro.model.WroModel.addGroup()方法的一些代码示例,展示了WroModel.addGroup()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WroModel.addGroup()方法的具体详情如下:
包路径:ro.isdc.wro.model.WroModel
类名称:WroModel
方法名:addGroup

WroModel.addGroup介绍

[英]Add a single group to the model.
[中]将单个组添加到模型中。

代码示例

代码示例来源:origin: alexo/wro4j

if (!isAbstractGroup) {
 model.addGroup(group);

代码示例来源:origin: ro.isdc.wro4j/wro4j-core

if (!isAbstractGroup) {
 model.addGroup(group);

代码示例来源:origin: org.nuiton.js/nuiton-js-wro

if (!isAbstractGroup) {
 model.addGroup(group);

代码示例来源:origin: org.nuiton.js/nuiton-js-wro

/**
 * Merge master model with another model. This is useful for supporting model imports.
 *
 * @param master master modele where we put imported model
 * @param importedModel model to import.
 */
protected void merge(WroModel master, WroModel importedModel) {
 Validate.notNull(importedModel, "imported model cannot be null!");
 LOG.debug("merging importedModel: {}", importedModel);
 for (final String groupName : new WroModelInspector(importedModel).getGroupNames()) {
  if (!new WroModelInspector(master).getGroupNames().contains(groupName)) {
    // si les deux modeles contiennent le meme groupe, on garde celui du master
    final Group importedGroup = new WroModelInspector(importedModel).getGroupByName(groupName);
    master.addGroup(importedGroup);
  }
 }
}

代码示例来源:origin: ro.isdc.wro4j/wro4j-core

/**
 * Merge this model with another model. This is useful for supporting model imports.
 *
 * @param importedModel model to import.
 */
public void merge(final WroModel importedModel) {
 Validate.notNull(importedModel, "imported model cannot be null!");
 LOG.debug("merging importedModel: {}", importedModel);
 for (final String groupName : new WroModelInspector(importedModel).getGroupNames()) {
  if (new WroModelInspector(this).getGroupNames().contains(groupName)) {
   throw new WroRuntimeException("Duplicate group name detected: " + groupName);
  }
  final Group importedGroup = new WroModelInspector(importedModel).getGroupByName(groupName);
  addGroup(importedGroup);
 }
}

代码示例来源:origin: alexo/wro4j

/**
  * Merge this model with another model. This is useful for supporting model imports.
  *
  * @param importedModel model to import.
  */
 public void merge(final WroModel importedModel) {
  Validate.notNull(importedModel, "imported model cannot be null!");
  LOG.debug("merging importedModel: {}", importedModel);
  for (final String groupName : new WroModelInspector(importedModel).getGroupNames()) {
   if (new WroModelInspector(this).getGroupNames().contains(groupName)) {
    throw new WroRuntimeException("Duplicate group name detected: " + groupName);
   }
   final Group importedGroup = new WroModelInspector(importedModel).getGroupByName(groupName);
   addGroup(importedGroup);
  }
 }

代码示例来源:origin: dragome/dragome-sdk

public WroModel create()
{
  Group dragomeGroup= new Group("dragome");
  dragomeGroup.addResource(Resource.create("/dragome-resources/js/hashtable.js", ResourceType.JS));
  dragomeGroup.addResource(Resource.create("/dragome-resources/js/deflate.js", ResourceType.JS));
  dragomeGroup.addResource(Resource.create("/dragome-resources/js/helpers.js", ResourceType.JS));
  dragomeGroup.addResource(Resource.create("/dragome-resources/js/string.js", ResourceType.JS));
  dragomeGroup.addResource(Resource.create("/dragome-resources/js/qx-oo-5.0.1.min.js", ResourceType.JS));
  dragomeGroup.addResource(Resource.create("/compiled-js/webapp.js", ResourceType.JS));
  dragomeGroup.addResource(Resource.create("/dragome-resources/css/dragome.css", ResourceType.CSS));
  Group compiledGroup= new Group("compiled");
  compiledGroup.addResource(Resource.create("/compiled-js/webapp.js", ResourceType.JS));
  WroModel wroModel= new WroModel();
  wroModel.addGroup(dragomeGroup);
  wroModel.addGroup(compiledGroup);
  return wroModel;
}
public void destroy()

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-web-resources-wro

@Override
public WroModel create() {
  WroModel model = new WroModel();
  WebResourceManager service = Framework.getService(WebResourceManager.class);
  ResourceContextImpl rcontext = new ResourceContextImpl();
  List<ResourceBundle> bundles = service.getResourceBundles();
  for (ResourceBundle bundle : bundles) {
    String groupName = bundle.getName();
    Group group = new Group(groupName);
    List<Resource> resources = service.getResources(rcontext, groupName, ResourceType.any.name());
    if (resources != null) {
      for (Resource resource : resources) {
        ro.isdc.wro.model.resource.Resource wr = toWroResource(groupName, resource);
        if (wr != null) {
          group.addResource(wr);
        }
      }
    }
    model.addGroup(group);
  }
  return model;
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-web-resources-wro

@Override
public WroModel create() {
  WroModel model = new WroModel();
  ThemeStylingService ts = Framework.getService(ThemeStylingService.class);
  WebResourceManager ws = Framework.getService(WebResourceManager.class);
  ResourceContextImpl rcontext = new ResourceContextImpl();
  List<PageDescriptor> pages = ts.getPages();
  for (PageDescriptor page : pages) {
    String groupName = page.getName();
    Group group = new Group(groupName);
    List<String> bundleNames = page.getResourceBundles();
    for (String bundleName : bundleNames) {
      List<Resource> resources = ws.getResources(rcontext, bundleName, ResourceType.any.name());
      if (resources != null) {
        for (Resource resource : resources) {
          ro.isdc.wro.model.resource.Resource wr = toWroResource(bundleName, resource);
          if (wr != null) {
            group.addResource(wr);
          }
        }
      }
    }
    model.addGroup(group);
  }
  return model;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com