当前位置: 首页>>代码示例>>Java>>正文


Java ConcordionExtender类代码示例

本文整理汇总了Java中org.concordion.api.extension.ConcordionExtender的典型用法代码示例。如果您正苦于以下问题:Java ConcordionExtender类的具体用法?Java ConcordionExtender怎么用?Java ConcordionExtender使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ConcordionExtender类属于org.concordion.api.extension包,在下文中一共展示了ConcordionExtender类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addTo

import org.concordion.api.extension.ConcordionExtender; //导入依赖的package包/类
@Override
public void addTo(ConcordionExtender concordionExtender) {
  if (styleToReplace != null) {
    concordionExtender.withLinkedCSS(styleToReplace, new Resource("/concordion.css"));
  }
  concordionExtender.withDocumentParsingListener(document -> {
    Element html = document.getRootElement();
    Element head = html.getFirstChildElement("head");
    if (head != null) {
      Elements styles = head.getChildElements("style");
      for (int i = 0; i < styles.size(); i++) {
        Element style = styles.get(i);
        if (styleToRemove.equals(style.getValue())) {
          head.removeChild(style);
        }
      }
    }
  });
}
 
开发者ID:HuygensING,项目名称:timbuctoo,代码行数:20,代码来源:ReplaceEmbeddedStylesheetExtension.java

示例2: addTo

import org.concordion.api.extension.ConcordionExtender; //导入依赖的package包/类
@Override
public void addTo(ConcordionExtender concordionExtender) {
  concordionExtender.withCommand(NAMESPACE, httpCommand.getName(), httpCommand);
  concordionExtender.withCommand(NAMESPACE, requestCommand.getName(), requestCommand);
  concordionExtender.withCommand(NAMESPACE, responseCommand.getName(), responseCommand);
  if (embedCss) {
    concordionExtender.withEmbeddedCSS(".defaultValue {\n" +
      "  color: gray;\n" +
      "}\n" +
      ".requestCaption, .responseCaption {\n" +
      "  margin-top: 1em;\n" +
      "  font-weight: bold;\n" +
      "  font-size: 0.8em;\n" +
      "}\n" +
      ".requestContent, .responseContent {\n" +
      "  background: #f6f9fc;\n" +
      "  padding: 10px;\n" +
      "  border: 1px solid #d0d4d9;\n" +
      "  font-family: monospace;\n" +
      "  border-radius: 3px;\n" +
      "}");
  }
}
 
开发者ID:HuygensING,项目名称:timbuctoo,代码行数:24,代码来源:HttpCommandExtension.java

示例3: addTo

import org.concordion.api.extension.ConcordionExtender; //导入依赖的package包/类
@Override
public void addTo(final ConcordionExtender concordionExtender) {
    concordionExtender.withSpecificationLocator(new ClassNameAndTypeBasedSpecificationLocator() {
        @Override
        public Resource locateSpecification(final Object fixtureObject, final String typeSuffix) {
            String slashedClassName = fixtureObject.getClass().getName().replaceAll("\\.", "/");
            slashedClassName = slashedClassName.substring(0, slashedClassName.indexOf("$$"));
            String fixturePath = slashedClassName.replace(CdiEnabledNewDepositorFixture.class.getSimpleName(),
                    NewDepositorFixture.class.getSimpleName());
            fixturePath = fixturePath.replaceAll("(Fixture|Test)$", "");
            return new Resource("/" + fixturePath + "." + typeSuffix);
        }
    });
}
 
开发者ID:dadrus,项目名称:jpa-unit,代码行数:15,代码来源:CdiEnabledNewDepositorFixture.java

示例4: addTo

import org.concordion.api.extension.ConcordionExtender; //导入依赖的package包/类
public void addTo(ConcordionExtender concordionExtender) {

		concordionExtender.withDocumentParsingListener(new DocumentParsingListener() {

			public void beforeParsing(Document document) {

				initEvaluator();

				evaluator.evaluateChildrenOf(document);
			}
		});
	}
 
开发者ID:codesandnotes,项目名称:dyneval,代码行数:13,代码来源:DynEval.java


注:本文中的org.concordion.api.extension.ConcordionExtender类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。