本文整理汇总了Java中org.jboss.arquillian.config.descriptor.api.ExtensionDef类的典型用法代码示例。如果您正苦于以下问题:Java ExtensionDef类的具体用法?Java ExtensionDef怎么用?Java ExtensionDef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExtensionDef类属于org.jboss.arquillian.config.descriptor.api包,在下文中一共展示了ExtensionDef类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onGovernorExtensionConfigured
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void onGovernorExtensionConfigured(@Observes GovernorExtensionConfigured event, ArquillianDescriptor arquillianDescriptor) throws Exception {
final RedmineGovernorConfiguration redmineGovernorConfiguration = new RedmineGovernorConfiguration();
for (final ExtensionDef extension : arquillianDescriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
redmineGovernorConfiguration.setConfiguration(extension.getExtensionProperties());
break;
}
}
redmineGovernorConfiguration.validate();
this.redmineGovernorConfiguration.set(redmineGovernorConfiguration);
final RedmineGovernorClient redmineGovernorClient = new RedmineGovernorClientFactory().build(this.redmineGovernorConfiguration.get());
this.redmineGovernorClient.set(redmineGovernorClient);
this.redmineManager.set(redmineGovernorClient.getRedmineManager());
logger.log(Level.CONFIG, "Configuration of Arquillian Redmine extension:");
logger.log(Level.CONFIG, this.redmineGovernorConfiguration.get().toString());
}
示例2: onGovernorExtensionConfigured
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void onGovernorExtensionConfigured(@Observes GovernorExtensionConfigured event, ArquillianDescriptor arquillianDescriptor) throws Exception {
final SkipperConfiguration skipperConfiguration = new SkipperConfiguration();
for (final ExtensionDef extension : arquillianDescriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
skipperConfiguration.setConfiguration(extension.getExtensionProperties());
skipperConfiguration.validate();
break;
}
}
this.skipperReportHolder.set(new SkipperReportHolder());
this.skipperConfiguration.set(skipperConfiguration);
logger.log(Level.CONFIG, "Configuration of Arquillian Skipper extension:");
logger.log(Level.CONFIG, skipperConfiguration.toString());
}
示例3: onGovernorExtensionConfigured
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void onGovernorExtensionConfigured(@Observes GovernorExtensionConfigured event, ArquillianDescriptor arquillianDescriptor) throws Exception {
final JiraGovernorConfiguration jiraGovernorConfiguration = new JiraGovernorConfiguration();
for (final ExtensionDef extension : arquillianDescriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
jiraGovernorConfiguration.setConfiguration(extension.getExtensionProperties());
jiraGovernorConfiguration.validate();
break;
}
}
this.jiraGovernorConfiguration.set(jiraGovernorConfiguration);
final JiraGovernorClient jiraGovernorClient = new JiraGovernorClientFactory().build(this.jiraGovernorConfiguration.get());
this.jiraGovernorClient.set(jiraGovernorClient);
logger.log(Level.CONFIG, "Configuration of Arquillian JIRA extension:");
logger.log(Level.CONFIG, jiraGovernorConfiguration.toString());
}
示例4: onGovernorExtensionConfigured
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void onGovernorExtensionConfigured(@Observes GovernorExtensionConfigured event, ArquillianDescriptor arquillianDescriptor) throws Exception {
final GitHubGovernorConfiguration gitHubGovernorConfiguration = new GitHubGovernorConfiguration();
for (final ExtensionDef extension : arquillianDescriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
gitHubGovernorConfiguration.setConfiguration(extension.getExtensionProperties());
gitHubGovernorConfiguration.validate();
break;
}
}
this.gitHubGovernorConfiguration.set(gitHubGovernorConfiguration);
final GitHubGovernorClient gitHubGovernorClient = new GitHubGovernorClientFactory().build(this.gitHubGovernorConfiguration.get());
this.gitHubGovernorClient.set(gitHubGovernorClient);
this.gitHubClient.set(gitHubGovernorClient.getGitHubClient());
logger.log(Level.CONFIG, "Configuration of Arquillian GitHub extension:");
logger.log(Level.CONFIG, gitHubGovernorConfiguration.toString());
}
示例5: readMethodsFromConfiguration
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private Set<String> readMethodsFromConfiguration() {
final Set<String> set = new HashSet<String>();
final ArquillianDescriptor descriptor = desciptorInst.get();
for (final ExtensionDef def : descriptor.getExtensions()) {
if (def.getExtensionName().equalsIgnoreCase(EXTENSION_NAME)) {
final Map<String, String> properties = def.getExtensionProperties();
final String exp = properties.get(EXTENSION_PROPERTY_METHODS);
if (exp != null) {
set.addAll(Arrays.asList(exp.split(",")));
}
for (final Map.Entry<String, String> entry : properties.entrySet()) {
if (entry.getKey().startsWith(EXTENSION_PROPERTY_METHODS + "_")) {
set.add(entry.getValue());
}
}
}
}
return set;
}
示例6: onArquillianDescriptor
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void onArquillianDescriptor(@Observes ArquillianDescriptor arquillianDescriptor) throws GovernorConfigurationException {
final GovernorConfiguration governorConfiguration = new GovernorConfiguration();
for (final ExtensionDef extension : arquillianDescriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
governorConfiguration.setConfiguration(extension.getExtensionProperties());
governorConfiguration.validate();
break;
}
}
this.governorConfiguration.set(governorConfiguration);
logger.log(Level.CONFIG, "Configuration of Arquillian Governor extension:");
logger.log(Level.CONFIG, governorConfiguration.toString());
governorExtensionConfiguredEvent.fire(new GovernorExtensionConfigured());
}
示例7: configureExtension
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void configureExtension(@Observes ArquillianDescriptor descriptor) {
ReporterConfiguration configuration = new ReporterConfiguration();
for (ExtensionDef extension : descriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
configuration.setConfiguration(extension.getExtensionProperties());
break;
}
}
configuration.validate();
this.configuration.set(configuration);
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("Configuration of Arquillian Reporting extension:");
LOGGER.info(this.configuration.get().toString());
}
extensionConfigured.fire(new ReportingExtensionConfigured());
}
示例8: getBrowser
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private String getBrowser(ArquillianDescriptor arquillianDescriptor) {
final ExtensionDef extension = arquillianDescriptor.extension("webdriver");
if (extension == null) {
return DEFAULT_BROWSER;
}
final Map<String, String> extensionProperties = extension.getExtensionProperties();
if (extensionProperties == null) {
return DEFAULT_BROWSER;
}
if (extensionProperties.containsKey("browser")) {
return extensionProperties.get("browser");
} else {
return DEFAULT_BROWSER;
}
}
示例9: getDeploymentClass
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private Class<?> getDeploymentClass(ArquillianDescriptor descriptor) {
if (descriptor == null) {
throw new IllegalArgumentException("Descriptor must be specified");
}
ExtensionDef suite = descriptor.extension("suite");
if (suite == null) {
throw new IllegalArgumentException("Missing suite extension in arquillian.xml");
}
String className = suite.getExtensionProperties().get("deploymentClass");
if (className == null) {
throw new IllegalArgumentException("A extension element with property deploymentClass must be specified in arquillian.xml");
}
try {
return Class.forName(className);
} catch (ClassNotFoundException e) {
throw new RuntimeException("Could not load defined deploymentClass: " + className, e);
}
}
示例10: initAsciidoctor
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private void initAsciidoctor(ArquillianDescriptor arquillianDescriptor) {
for (final ExtensionDef extensionDef : arquillianDescriptor.getExtensions()) {
if (extensionDef.getExtensionName().startsWith("asciidoctor")) {
String gemPath = get(extensionDef.getExtensionProperties(), "gemPath", "");
Asciidoctor asciidoctor = asciidoctorMap.get(gemPath);
if(asciidoctor == null){
asciidoctor = Asciidoctor.Factory.create((File.separatorChar == '\\') ? gemPath.replaceAll("\\\\", "/") : gemPath);
asciidoctorMap.put(gemPath,asciidoctor);
}
}
}
}
示例11: renderAll
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private void renderAll(final ArquillianDescriptor descriptor) {
for (final ExtensionDef extensionDef : descriptor.getExtensions()) {
if (extensionDef.getExtensionName().startsWith("asciidoctor")) {
long initialTime = System.currentTimeMillis();
try {
render(extensionDef.getExtensionName(), extensionDef.getExtensionProperties());
}finally {
getLogger().info(String.format("Execution time for extension %s: %d milliseconds", extensionDef.getExtensionName(), System.currentTimeMillis() - initialTime));
}
}
}
}
示例12: getConfiguration
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private Map<String, String> getConfiguration() {
for (ExtensionDef def : descriptor.get().getExtensions()) {
if (SystemProperties.EXTENSION_NAME.equalsIgnoreCase(def
.getExtensionName())) {
return def.getExtensionProperties();
}
}
return new HashMap<String, String>();
}
示例13: readExpressionFromConfiguration
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private String readExpressionFromConfiguration() {
final ArquillianDescriptor descriptor = desciptorInst.get();
for (final ExtensionDef def : descriptor.getExtensions()) {
if (def.getExtensionName().equalsIgnoreCase(EXTENSION_NAME)) {
final String exp = def.getExtensionProperties().get(EXTENSION_PROPERTY_EXP);
if (exp != null) {
return exp;
}
}
}
return null;
}
示例14: getExtensionReports
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
private Collection<? extends ExtensionReport> getExtensionReports(ArquillianDescriptor descriptor) {
List<ExtensionReport> extensionReports = new ArrayList<ExtensionReport>();
for (ExtensionDef extensionDef : descriptor.getExtensions()) {
ExtensionReport extensionReport = new ExtensionReport();
extensionReport.setQualifier(extensionDef.getExtensionName());
extensionReport.setConfiguration(extensionDef.getExtensionProperties());
extensionReports.add(extensionReport);
}
return extensionReports;
}
示例15: afterVideoExtensionConfigured
import org.jboss.arquillian.config.descriptor.api.ExtensionDef; //导入依赖的package包/类
public void afterVideoExtensionConfigured(@Observes VideoExtensionConfigured event, ArquillianDescriptor descriptor) {
VideoConfiguration configuration = new DesktopVideoConfiguration(reporterConfiguration.get());
for (ExtensionDef extension : descriptor.getExtensions()) {
if (extension.getExtensionName().equals(EXTENSION_NAME)) {
configuration.setConfiguration(extension.getExtensionProperties());
break;
}
}
configuration.validate();
this.configuration.set(configuration);
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info("Configuration of Arquillian Desktop Video Recorder:");
LOGGER.info(this.configuration.get().toString());
}
// there will be 2 strategies in this list at least - SkippingVideoStrategy and DefaultVideoStrategy
// if this extension is not on the class path, SkippingVideoStrategy was already produced hence
// the extension will work in a "dummy" mode where nothing will be ever recorded. If this is on the class path,
// we have recorder implementation hence we will use at least DefaultVideoStrategy if no other strategy is used
List<VideoStrategy> strategies = new ArrayList<VideoStrategy>(serviceLoader.get().all(VideoStrategy.class));
strategy.set(resolveVideoStrategy(strategies));
strategy.get().setConfiguration(this.configuration.get());
setup();
}